无法使用Powershell连接到服务结构

时间:2018-11-03 04:55:30

标签: azure-service-fabric azure-powershell

尝试连接到Azure服务结构时,出现以下错误。我能够部署并连接到应用程序,也可以在Web浏览器中连接到服务结构浏览器。但是当我尝试使用Powershell进行连接时,它会失败。

$ConnectArgs = @{  ConnectionEndpoint = 'tktdestsfsdsd.westus.cloudapp.azure.com:19000';  X509Credential = $True;  StoreLocation = 'CurrentUser';  StoreName = "MY"; ServerCommonName = "westus.cloudapp.azure.com"; FindType = 'FindByThumbprint';  FindValue = "9C2D2DC3F29DFBA8E7F3C92B2C27155A327573E"   }
Connect-ServiceFabricCluster @ConnectArgs 


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 : Failed to authenticate server identity
At line:3 char:1
+ Connect-ServiceFabricCluster @ConnectArgs
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [Connect-ServiceFabricCluster], FabricServerAuthenticationFailedException
    + FullyQualifiedErrorId : TestClusterConnectionErrorId,Microsoft.ServiceFabric.Powershell.ConnectCluster

2 个答案:

答案 0 :(得分:0)

您是否为此关注任何特定的Azure文档? 如果没有,我建议您阅读以下有关使用PowerShell连接到Service Fabric的文档:https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-connect-to-secure-cluster

如果您仍然遇到问题,请告诉我。谢谢。

答案 1 :(得分:0)

我相信您缺少ServerCertThumbprint参数值。

Connect-ServiceFabricCluster -ConnectionEndpoint`                     
 tktdestsfsdsd.westus.cloudapp.azure.com:19000`  
 -X509Credential -ServerCertThumbprint 9C2D2DC3F29DFBA8E7F3C92B2C27155A327573E`  
 -FindType FindByThumbprint -FindValue 9C2D2DC3F29DFBA8E7F3C92B2C27155A327573E`  
 -StoreLocation CurrentUser -StoreName My