启动服务:无法启动服务'Microsoft Service Fabric Host Service(FabricHostSvc)'

时间:2015-11-04 11:10:02

标签: powershell azure azure-service-fabric

我想开始使用Azure Service Fabric技术。

我正在根据this document工作并安装最新的SDK。 安装完成后,我打开了PowerShell(“以管理员身份运行”)命令行窗口并写下这些行:

# Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Force -Scope CurrentUser
# cd "$env:ProgramW6432\Microsoft SDKs\Service Fabric\ClusterSetup"
# .\DevClusterSetup.ps1

作为答案,得到了这个错误:

Cleaning existing cluster ...

  NOTE: If this powershell command window exits, please re-run the script in a new powershell command window.


Stopping service FabricHostSvc. This may take a few minutes...
Removing cluster configuration
Remove node configuration succeeded
Cleaning existing certificates
Stopping all logman sessions
Cleaning log and data folder, the powershell window may close automatically.
ClusterPath not provided, will use C:\SfDevCluster
FabricDataRoot not provided, will use C:\SfDevCluster\Data
FabricLogRoot not provided, will use C:\SfDevCluster\Log


    Directory: C:\


Mode                LastWriteTime     Length Name
----                -------------     ------ ----
d----         4/11/2015  12:47 PM            SfDevCluster


    Directory: C:\SfDevCluster


Mode                LastWriteTime     Length Name
----                -------------     ------ ----
d----         4/11/2015  12:47 PM            Manifests
True
Create node configuration succeeded
Starting service FabricHostSvc. This may take a few minutes...
Start-Service : Failed to start service 'Microsoft Service Fabric Host Service (FabricHostSvc)'.
At C:\Program Files\Microsoft SDKs\Service Fabric\ClusterSetup\DevClusterSetup.ps1:167 char:1
+ Start-Service FabricHostSvc -WarningAction SilentlyContinue
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OpenError: (System.ServiceProcess.ServiceController:ServiceController) [Start-Service],
   ServiceCommandException
    + FullyQualifiedErrorId : StartServiceFailed,Microsoft.PowerShell.Commands.StartServiceCommand

WARNING: Could not start FabricHostSvc

底线是“无法启动服务”。等待3分钟后,此输出将打印到屏幕上。

我已经尝试过的事情:

  1. 重启计算机几次(我正在读某处解决问题)。
  2. 关闭我的防病毒\防火墙软件。
  3. PowerShell命令行的附加屏幕截图。 enter image description here 我正在使用:

    • Visual Studio 2015企业版
    • Windows 8.1
    • Azure Service Fabric SDK v1.0.328

3 个答案:

答案 0 :(得分:3)

我今天早上也在解决这个问题。我没有必要重新安装Windows。

我也在事件日志中发现有关腐败性能计数器的事件。我不确定它是否相关,但是我从管理员的cmd窗口运行此命令来重建性能计数器并清除错误:

lodctr / r

然后我去了程序和功能并卸载了任何提到Service Fabric的内容。

然后我重新安装了Service Fabric SDK并按照Azure Service Fabric environment setup page here上的说明进行操作,我的群集开始正常工作。

答案 1 :(得分:1)

我遇到了同样的问题,并且在一个晚上和第二天早上多次尝试我得到了答案。答案是“确保防火墙已开启”。

答案 2 :(得分:0)

UPDATE2:这是一个非常古老的问题,我从2015年11月开始没有看到这种情况再次发生。(补充一下,所以这篇文章不再被拒绝投票了: - /)。

更新:自11月更新以来,我没有遇到过这个问题。

原文:前几天我遇到了这个问题,并尝试了一切。我已经卸载,重新启动,重新安装从Service Fabric到Azure SDK和Visual Studio的所有内容。

修复 - 非常糟糕。重新安装Windows。

有一次,我发现了一条表明注册表损坏的痕迹。无法找到性能计数器的东西。

现在我有一个新问题(我将单独发布),但只是重复一遍,让人们知道现在这个服务下有一些错误的基础设施....我的有状态/无状态应用程序部署。无状态应用程序部署并运行。有状态服务部署但不会复制。如果我在另一台机器上运行完全相同的代码(我的意思是复制/粘贴到其他机器然后运行它),它一切正常。