连接到 Azure Service Fabric 应用程序

Connecting to an azure Service Fabric App

我正在尝试调试为什么我的服务集群应用程序在升级会话期间卡住。 我查看了如何使用 powershell 执行此操作,并找到了命令:

Get-ServiceFabricApplicationUpgrade fabric:/My.Fabric.App.Name

此命令抛出错误:

Get-ServiceFabricApplicationUpgrade : Cluster connection instance is null

很自然地,我尝试连接到集群:

Connect-ServiceFabricCluster myfabric.westeurope.cloudapp.azure.com:19000

但是我得到了:

WARNING: Failed to contact Naming Service. Attempting to contact Failover Manager Service... WARNING: Failed to contact Failover Manager Service, Attempting to contact FMM... False Connect-ServiceFabricCluster : One or more errors occurred. At line:1 char:1 + Connect-ServiceFabricCluster myfabric.westeurope.cloudapp.azure.com:19000 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [Connect-ServiceFabricCluster], AggregateException + FullyQualifiedErrorId : CreateClusterConnectionErrorId,Microsoft.ServiceFabric.Powershell.ConnectCluster

服务结构很烦人..请帮忙? :\

更新

这可能是因为我的结构是安全的,并且我有一个必须用于连接的客户端证书。

我为命令尝试了以下配置:

$connectArgs = @{  ConnectionEndpoint = 'myfabric.westeurope.cloudapp.azure.com:19000';  X509Credential = $True;  StoreLocation = 'CurrentUser';  StoreName = "MY";  ServerCommonName = "myfabric.westeurope.cloudapp.azure.com";  FindType = 'FindByThumbprint';  FindValue = "DEADBEEFDEADBEEFDEADBEEFDEADBEEF"; SkipChecks = $True  }

但是Get-ServiceFabricApplicationUpgrade还是不行。

成功!

使用以下参数:

$connectArgs = @{  ConnectionEndpoint = 'myfabric.westeurope.cloudapp.azure.com:19000';  
                   X509Credential = $True;  
                   StoreLocation = "CurrentUser";  
                   StoreName = "My";  
                   ServerCommonName = "myfabric.westeurope.cloudapp.azure.com";  
                   FindType = 'FindByThumbprint';  
                   FindValue = "81EBFC23D456130C0CA99952484240EA2385F0C3"; 
                   ServerCertThumbprint = "DEADBEEFDEADBEEFDEADBEEFDEADBEEF" }

Connect-ServiceFabricCluster @connectArgs