Powershell 启动服务:无法启动服务';Microsoft服务结构主机服务(FabricHostSvc)和#x27;

Powershell 启动服务:无法启动服务';Microsoft服务结构主机服务(FabricHostSvc)和#x27;,powershell,azure,azure-service-fabric,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" # .\DevClusterS

我想开始使用Azure Service Fabric技术

我正在根据和安装最新的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分钟后,此输出将打印到屏幕上

我已经尝试过的事情:

  • 重新启动计算机几次(我在某个地方读到这可以解决问题)
  • 关闭我的防病毒\防火墙软件 附加的PowerShell命令行屏幕截图。 我正在使用:

    • Visual studio 2015企业版
    • Windows 8.1
    • Azure服务结构SDK v1.0.328

    更新2:这是一个非常古老的问题,自2015年11月以来,我从未见过这种情况再次发生。(为了使这篇文章不再被否决而添加:-/)

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

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

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

    有一次,我发现了一个表明注册表损坏的跟踪。有关找不到性能计数器的信息


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

    就在今天早上,我还与这个问题作了斗争。我不必重新安装Windows

    我在事件日志中也发现了有关性能计数器损坏的事件。我不确定它是否相关,但我以管理员身份从cmd windows运行此命令以重建性能计数器并清除错误:

    lodctr/r

    然后我转到程序和功能,卸载了任何提到服务结构的内容


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

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

    可能值得尝试从“服务”窗口(运行>服务)启动该服务,以查看是否收到任何错误消息。它被称为“Microsoft服务结构主机服务”。此服务的状态为“正在启动…”。看起来好像卡住了。你试过停止并重新启动吗?事件日志中可能有一些错误。daustinash的想法是正确的。你可以在这里读到更多关于它的信息:“注册表损坏”-这是我在我的电脑中也发现的。这是一些缺少的性能计数器。重新安装Windows不是我的选择。谢谢分享。