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

No1*_*ver 6 powershell azure azure-service-fabric

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

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

# Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Force -Scope CurrentUser
# cd "$env:ProgramW6432\Microsoft SDKs\Service Fabric\ClusterSetup"
# .\DevClusterSetup.ps1
Run Code Online (Sandbox Code Playgroud)

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

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
Run Code Online (Sandbox Code Playgroud)

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

我已经尝试过的事情:

  1. 重启计算机几次(我正在阅读这个解决问题的地方).
  2. 关闭我的防病毒\防火墙软件.

随附PowerShell命令行的屏幕截图. 在此输入图像描述 我正在使用:

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

Mar*_*rkD 0

UPDATE2:这是一个非常老的问题,自 2015 年 11 月以来我还没有看到这个问题再次发生。(添加只是为了让这篇文章不再被否决:-/ )。

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

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

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

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

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