Service Fabric群集无法启动

时间:2019-09-09 09:43:22

标签: azure azure-service-fabric

1我们以前曾经使Service Fabric正常运行,但是,现在我们无法启动群集,并且会立即收到错误消息。集群创建本身有错误。

enter image description here

当我在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 Event Viewer中进行了查看,从不同区域看到了以下与Service Fabric相关的事件:

enter image description here

enter image description here

此外,当我查看“(应用程序和服务日志==> 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(字符串serviceName,字符串machineName)处

错误,因为System.InvalidOperationException:无法在计算机“。”上启动服务FabricHostSvc,所以无法启动结构主机服务。 ---> System.ComponentModel.Win32Exception:服务未及时响应启动或控制请求    ---内部异常堆栈跟踪的结尾---    在System.ServiceProcess.ServiceController.Start(String [] args)    在System.Fabric.FabricDeployer.FabricDeployerServiceController.StartHostSvc(String machineName)处

错误:清除隔离的网络设置异常System.ArgumentNullException时发生错误:值不能为null。 参数名称:格式    在System.String.FormatHelper(IFormatProvider提供程序,字符串格式,ParamsArray args)    在System.Fabric.FabricDeployer.RemoveOperation.RemoveNetworks(DeploymentParameters参数)处

警告 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中的此问题:https://github.com/Azure/service-fabric-issues/issues/1056

2 个答案:

答案 0 :(得分:0)

如果端口被阻塞,则可能发生这种情况。我建议您检查并使用哪些端口。您是否更改了默认端口?

答案 1 :(得分:0)

我有办法工作 我打开目录上的命令行:%programfiles%\ Microsoft Service Fabric \ bin 我试图运行Service Fabric可执行文件FabricHost.exe -c 当我尝试运行Service Fabric可执行文件时,由于操作系统中的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