簡體   English   中英

Service Fabric 群集未啟動

[英]Service Fabric cluster does not start

1我們以前曾經讓 Service Fabric 正常工作,但是,現在我們無法啟動集群,並且立即出現錯誤。 集群創建本身有錯誤。

在此處輸入圖片說明

當我檢查 C:\\SFDevCluster 中的 Service Fabric日志時,我看到

Host Application: PowerShell.exe -WindowStyle Hidden -NonInteractive -ExecutionPolicy RemoteSigned -Command & 'C:\Program Files\Microsoft SDKs\Service Fabric\ClusterSetup\DevClusterSetup.ps1' -Auto -PathToClusterLogRoot C:\SFDevCluster\Log -SetupLogFileName DevClusterSetup.log -CreateOneNodeCluster
Transcript started, output file is C:\SFDevCluster\Log\DevClusterSetup.log
Performing Stop-Service on: FabricHostSvc . This may take a few minutes...
Create node configuration succeeded
Performing Start-Service on: FabricHostSvc . This may take a few minutes...

當我檢查 Service Fabric跟蹤時,我看到 FabricDeployer-XXXXXX(longnumber).trace,其中包含以下內容

2019/09/09-09:06:06.239,Info,10844,FabricDeployer.FabricDeployer,Running deployer with Configure /fabricBinRoot:C:\Program Files\Microsoft Service Fabric\bin /fabricDataRoot:C:\SfDevCluster\Data /fabricLogRoot:C:\SFDevCluster\Log /cm:C:\Users\100659\AppData\Local\Temp\SEPC0T2R18-Server-ScaleMin.xml /oldClusterManifestString: /im: /instanceId: /targetVersion: /nodeName: /nodeTypeName: /runAsType: /runAsAccountName: /runAsPassword: /serviceStartupType:Manual /output: /currentVersion: /error: /bootstrapMSIPath: /machineName: /fabricPackageRoot: /jsonClusterConfigLocation: /enableCircularTraceSession:True /continueIfContainersFeatureNotInstalled: /skipDeleteData:
2019/09/09-09:06:06.241,Info,10844,ImageStoreClient.ManagedFileLock,Obtained writer lock for C:\SfDevCluster\Data\lock
2019/09/09-09:06:06.241,Info,10844,FabricDeployer.FabricDeployer,Executing Configure /fabricBinRoot:C:\Program Files\Microsoft Service Fabric\bin /fabricDataRoot:C:\SfDevCluster\Data /fabricLogRoot:C:\SFDevCluster\Log /cm:C:\Users\100659\AppData\Local\Temp\SEPC0T2R18-Server-ScaleMin.xml /oldClusterManifestString: /im: /instanceId: /targetVersion: /nodeName: /nodeTypeName: /runAsType: /runAsAccountName: /runAsPassword: /serviceStartupType:Manual /output: /currentVersion: /error: /bootstrapMSIPath: /machineName: /fabricPackageRoot: /jsonClusterConfigLocation: /enableCircularTraceSession:True /continueIfContainersFeatureNotInstalled: /skipDeleteData:
2019/09/09-09:06:06.249,Info,10844,FabricDeployer.FabricDeployer,Running operation System.Fabric.FabricDeployer.ConfigureOperation
2019/09/09-09:06:06.253,Info,10844,FabricDeployer.FabricDeployer,Creating FabricDataRoot C:\SfDevCluster\Data, if it doesn't exist on machine 
2019/09/09-09:06:06.254,Info,10844,FabricDeployer.FabricDeployer,Creating FabricLogRoot C:\SFDevCluster\Log, if it doesn't exist on machine 
2019/09/09-09:06:06.287,Info,10844,ImageBuilder.FabricDeployer,DnsService feature enabled : True.
2019/09/09-09:06:06.287,Info,10844,ImageBuilder.FabricDeployer,PartitionPrefix setting overriden in DnsService section, Overriden Value: --.
2019/09/09-09:06:06.287,Info,10844,ImageBuilder.FabricDeployer,PartitionSuffix setting overriden in DnsService section, Overriden Value: .
2019/09/09-09:06:06.287,Warning,10844,ImageBuilder.FabricDeployer,Current profile will be disabled by default for firewall rule
2019/09/09-09:06:06.297,Info,10844,FabricDeployer.FabricDeployer,Setting FabricDataRoot to C:\SfDevCluster\Data on machine 
2019/09/09-09:06:06.297,Info,10844,FabricDeployer.FabricDeployer,Setting FabricLogRoot to C:\SFDevCluster\Log on machine 
2019/09/09-09:06:06.297,Info,10844,FabricDeployer.FabricDeployer,Setting EnableCircularTraceSession to True on machine 
2019/09/09-09:06:06.297,Info,10844,FabricDeployer.FabricDeployer,Setting EnableUnsupportedPreviewFeatures to False on machine 
2019/09/09-09:06:06.297,Info,10844,FabricDeployer.FabricDeployer,Setting IsSFVolumeDiskServiceEnabled to False on machine 
2019/09/09-09:06:06.298,Info,10844,FabricDeployer.FabricDeployer,Setup section, parameter FabricDataRoot, has value C:\SfDevCluster\Data
2019/09/09-09:06:06.298,Info,10844,FabricDeployer.FabricDeployer,Setup section, parameter FabricLogRoot, has value C:\SFDevCluster\Log
2019/09/09-09:06:06.298,Info,10844,FabricDeployer.FabricDeployer,Setup section, parameter ServiceRunAsAccountName, has value 
2019/09/09-09:06:06.298,Info,10844,FabricDeployer.FabricDeployer,Setup section, parameter ServiceRunAsPassword, has value 
2019/09/09-09:06:06.298,Info,10844,FabricDeployer.FabricDeployer,Setup section, parameter SkipFirewallConfiguration, has value true
2019/09/09-09:06:06.298,Info,10844,FabricDeployer.FabricDeployer,Setup section, parameter ServiceStartupType, has value 
2019/09/09-09:06:06.298,Info,10844,FabricDeployer.FabricDeployer,Setup section, parameter ContainerNetworkName, has value 
2019/09/09-09:06:06.298,Info,10844,FabricDeployer.FabricDeployer,Setup section, parameter ContainerNetworkSetup, has value 
2019/09/09-09:06:06.298,Info,10844,FabricDeployer.FabricDeployer,Setup section, parameter SkipContainerNetworkResetOnReboot, has value 
2019/09/09-09:06:06.298,Info,10844,FabricDeployer.FabricDeployer,Setup section, parameter SkipIsolatedNetworkResetOnReboot, has value 
2019/09/09-09:06:06.298,Info,10844,FabricDeployer.FabricDeployer,Setup section, parameter IsolatedNetworkName, has value 
2019/09/09-09:06:06.298,Info,10844,FabricDeployer.FabricDeployer,Setup section, parameter IsolatedNetworkSetup, has value 
2019/09/09-09:06:06.298,Info,10844,FabricDeployer.FabricDeployer,Setup section, parameter IsolatedNetworkInterfaceName, has value 
2019/09/09-09:06:06.299,Info,10844,FabricDeployer.FabricDeployer,Setup section, parameter EnableCircularTraceSession, has value true
2019/09/09-09:06:06.299,Info,10844,FabricDeployer.FabricDeployer,Setup section, parameter ContainerDnsSetup, has value 
2019/09/09-09:06:06.299,Info,10844,FabricDeployer.FabricDeployer,Setup section, parameter: ContainerDnsSetup, value: <null>, interpreted value: Allow
2019/09/09-09:06:06.299,Info,10844,FabricDeployer.FabricDeployer,Setup section, parameter EnableUnsupportedPreviewFeatures, has value 
2019/09/09-09:06:06.299,Info,10844,FabricDeployer.FabricDeployer,Setup section, parameter IsSFVolumeDiskServiceEnabled, has value 
2019/09/09-09:06:06.299,Info,10844,FabricDeployer.FabricDeployer,Setup section, parameter SfCnsNetworkPluginCnsUrlPort, has value 
2019/09/09-09:06:06.299,Info,10844,FabricDeployer.FabricDeployer,Setup section, parameter SfCnsNetworkPluginCnmUrlPort, has value 
2019/09/09-09:06:06.299,Info,10844,FabricDeployer.FabricDeployer,Setup section, parameter IsolatedNetworkPluginParams, has value 
2019/09/09-09:06:06.299,Info,10844,FabricDeployer.FabricDeployer,Setup section, parameter UseContainerServiceArguments, has value 
2019/09/09-09:06:06.299,Info,10844,FabricDeployer.FabricDeployer,Setup section, parameter ContainerServiceArguments, has value 
2019/09/09-09:06:06.299,Info,10844,FabricDeployer.FabricDeployer,Setup section, parameter EnableContainerServiceDebugMode, has value 
2019/09/09-09:06:06.299,Info,10844,FabricDeployer.FabricDeployer,Setup section, parameter DisableContainers, has value 
2019/09/09-09:06:06.299,Info,10844,FabricDeployer.FabricDeployer,Copying ClusterManifest to C:\SfDevCluster\Data\clusterManifest.xml
2019/09/09-09:06:06.308,Info,10844,FabricDeployer.FabricDeployer,Set Service Fabric Host Service to start up type to Manual
2019/09/09-09:06:06.310,Info,10844,FabricDeployer.FabricDeployer,TargetInformationFileName is C:\SfDevCluster\Data\TargetInformation.xml
2019/09/09-09:06:06.317,Info,10844,FabricDeployer.FabricDeployer,Target information file C:\SfDevCluster\Data\TargetInformation.xml written on machine: 
2019/09/09-09:06:06.323,Info,10844,FabricDeployer.FabricDeployer,Host Settings file generated at C:\SfDevCluster\Data\FabricHostSettings.xml
2019/09/09-09:06:06.327,Info,10844,ImageStoreClient.ManagedFileLock,Released writer lock on C:\SfDevCluster\Data\lock

上一篇有趣的一行是:

2019/09/09-09:06:06.287,Warning,10844,ImageBuilder.FabricDeployer,Current profile will be disabled by default for firewall rule

這讓我覺得可能有一些防火牆規則阻止了我,但我無法確定到底發生了什么。

我在 Windows 事件查看器中查看了以下來自不同領域的與 Service Fabric 相關的事件:

在此處輸入圖片說明

在此處輸入圖片說明

此外,當我查看(應用程序和服務日志 ==> Microsoft-Service Fabric ==> Admin)時,我看到以下內容:

錯誤FileChangeMonitor 因 E_ACCESSDENIED 失敗

警告FileChangeMonitor 文件 C:\\SfDevCluster \\Data\\FabricHostSettings.xml 失敗,錯誤代碼為 E_ACCESSDENIED。

錯誤GetFileAttributesEx 失敗,出現以下錯誤 5

錯誤無法停止 FabricHostSvc 服務,因為 System.InvalidOperationException: 無法停止計算機“.”上的 FabricHostSvc 服務。 ---> System.ComponentModel.Win32Exception: 服務尚未啟動 --- 內部異常堆棧跟蹤結束 --- 在 System.ServiceProcess.ServiceController.Stop() 在 System.Fabric.FabricDeployer.FabricDeployerServiceController.Stop(String服務名稱,字符串機器名稱)

錯誤無法啟動結構主機服務,因為 System.InvalidOperationException: 無法在計算機“.”上啟動服務 FabricHostSvc。 ---> System.ComponentModel.Win32Exception: 服務沒有及時響應啟動或控制請求 --- 內部異常堆棧跟蹤結束 --- 在 System.ServiceProcess.ServiceController.Start(String[] args ) 在 System.Fabric.FabricDeployer.FabricDeployerServiceController.StartHostSvc(String machineName)

錯誤清除隔離網絡設置異常 System.ArgumentNullException 時發生錯誤:值不能為空。 參數名稱:System.String.FormatHelper(IFormatProvider provider, String format, ParamsArray args) 的格式 System.Fabric.FabricDeployer.RemoveOperation.RemoveNetworks(DeploymentParameters parameters)

警告ParseConfigSettings: ErrorCode=E_FAIL, FileName=C:\\SfDevCluster\\Data\\FabricHostSettings.xml

警告CreateFileW 失敗:file=\\?\\C:\\SfDevCluster\\Data\\FabricHostSettings.xml error=32

我們已經嘗試了以下所有解決方案,但沒有奏效:

  • 確保 Window 防火牆服務已啟動並正在運行
  • 從提升的 powershell 會話運行:Unregister-ScheduledTask FabricCounters(有趣的是,我們甚至沒有計數器!)
  • 添加 { "name": "FabricContainerAppsEnabled", "value": "false"} 到集群配置
  • 授予對 C:\\ProgramData\\Microsoft\\Crypto\\RSA\\MachineKeys 的網絡服務訪問權限
  • 移除集群並刪除C:\\SfDevCluster並嘗試再次部署(仍然有錯誤)
  • 將 IP 地址從 MACHINENAME 更改為 127.0.0.1 並確保 IPOrFQDN 與我的機器名稱相同

以上大部分嘗試來自 Github 中的這個 issue: https : //github.com/Azure/service-fabric-issues/issues/1056

如果您的端口被阻止,就會發生這種情況。 我建議您查看可用的端口並使用它們。 您是否更改了默認端口?

我讓它工作了我打開了目錄上的命令行:%programfiles%\\Microsoft Service Fabric\\bin 我嘗試運行 Service Fabric 可執行文件 FabricHost.exe -c 當我嘗試運行 Service Fabric 可執行文件時,它由於損壞而失敗OS 中的 DLL(很可能是由於我公司的組策略更新),我得到了損壞的 DLL,我還使用了 TestConfiguration 腳本,現在它可以工作了。

要閱讀有關測試配置腳本的更多信息,請轉到https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-cluster-standalone-deployment-preparation 中的(使用 TestConfiguration 腳本驗證環境)。

我得到提示的問題的另一個參考: https : //github.com/microsoft/service-fabric/issues/382

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM