由于Test-ServiceFabricClusterConnection,发布到Service Fabric Cluster失败

Ken*_*539 7 powershell-3.0 azure-service-fabric

我正在使用在创建Service Fabric项目以部署我的应用程序时生成的Deploy-FabricApplication.ps1脚本.

部署到Service Fabric群集时,如果我首先使用连接到本地群集,则可以在本地部署Connect-ServiceFabricCluster.但是,我的构建服务器不运行本地群集实例,因此我无法首先连接到本地实例.当我连接时,Connect-ServiceFabricCluster @ClusterConnectionParameters我在连接上获得数据,表示它已成功.当它到达发布并运行Test-ServiceFabricClusterConnection命令时,我收到以下错误.

WARNING: Unable to Verify connection to Service Fabric cluster.
Test-ServiceFabricClusterConnection : Cluster connection instance is null
At C:\ProgramFiles\MicrosoftSDKs\ServiceFabric\Tools\PSModule\ServiceFabricSDK\Publish-NewServiceFabricApplication.ps1:129 char:16
+         [void](Test-ServiceFabricClusterConnection)
+                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ResourceUnavailable: (:) [Test-ServiceFabricClusterConnection], NullReferenceException
    + FullyQualifiedErrorId : GetClusterConnectionErrorId,Microsoft.ServiceFabric.Powershell.TestClusterConnection
Run Code Online (Sandbox Code Playgroud)

我尝试从Publish-NewServiceFabricApplication.ps1模块中删除Test-ServiceFabricClusterConnection,我得到一组不同的错误.无论我在这一点上尝试过什么,如果我首先连接到一个集群,它可以工作,但如果我通过powershell脚本连接则不行.

更新!解决了使用点源解决这个问题:如何从VSTS版本管道部署服务架构应用程序?

Uma*_*bar 0

请检查您的计算机上是否正确安装了证书。我遇到了类似的问题并安装了证书并且它有效。另请验证商店位置是否正确设置为

商店位置=“本地机器”

如果您在本地计算机上安装了证书,则将其设置为 StoreLocation="CurrentUser"