6

我想开始使用 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 分钟后,此输出将打印到屏幕上。

我已经尝试过的事情:

  1. 重新启动计算机几次(我在某处读到这可以解决问题)。
  2. 关闭我的防病毒\防火墙软件。

随附 PowerShell 命令行的屏幕截图。 在此处输入图像描述 我在用着:

  • Visual Studio 2015 企业版
  • 视窗 8.1
  • Azure Service Fabric SDK v1.0.328
4

3 回答 3

3

就在今天早上,我也解决了这个问题。我不必重新安装 Windows。

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

lodctr /r

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

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

于 2015-11-17T16:30:58.710 回答
1

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

于 2016-05-18T05:10:43.750 回答
0

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

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

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

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

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

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

于 2015-11-05T07:57:27.307 回答