Connect-ServiceFabricCluster fails to contact naming server on remote Azure Service Fabric cluster

前端 未结 2 1832
感情败类
感情败类 2021-02-14 06:04

I provisioned an Azure Service Fabric cluster in North Central US. I was able to initially publish my Service Fabric application to the cluster using Visual Studio and everythin

2条回答
  •  心在旅途
    2021-02-14 06:51

    I was getting the same error in PowerShell and this is what worked for me: (based on https://blogs.msdn.microsoft.com/ncdevguy/2016/12/25/connecting-to-a-remote-azure-service-fabric-cluster-using-powershell/)

    $clusterFQDN = 
    $clusterEndpoint = $clusterFQDN+':19000'
    $certThumbprint = (Get-ChildItem -Path Cert:\CurrentUser\My | where {$_.Subject -like "*$clusterFQDN*" }).Thumbprint
    Connect-ServiceFabricCluster -ConnectionEndpoint $clusterEndpoint -KeepAliveIntervalInSec 10 -X509Credential -ServerCertThumbprint $certThumbprint -FindType FindByThumbprint -FindValue $certThumbprint -StoreLocation CurrentUser -StoreName My
    

    NOTE: The KeepAliveIntervalInSec parameter is optional but the rest are mandatory.

    NOTE: This assumes your management cert is installed in CurrentUser\My (Current User->Personal in Certificates MMC Snap-in).

    Since the OP didn't specify what @connectArgs was, cannot be sure if my answer has been tried by the OP or not.

提交回复
热议问题