本文介绍了Connect-ServiceFabricCluster无法联系远程Azure Service Fabric群集上的命名服务器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在美国中北部配置了一个Azure Service Fabric群集.我最初能够使用Visual Studio将Service Fabric应用程序发布到群集,并且一切运行良好.我现在正尝试通过另一个Visual Studio发布来升级应用程序,但是发布升级总是失败,并显示操作超时"错误.

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 everything was running fine. I am now trying to upgrade the application via another Visual Studio publish, but the publish upgrade always fails with an Operation Timed Out error.

或者,我尝试仅使用Powershell连接到Service Fabric群集.由于出现以下无法连接到命名服务的故障,我似乎也无法做到这一点.

Alternatively, I tried to just connect to the Service Fabric cluster using Powershell. I can't seem to do that either as I get the following failure to connect to the Naming Service.

我如何使事情恢复正常?

How do I get things working again?

PS C:\ WINDOWS \ system32> Connect-ServiceFabricCluster @connectArgs警告:无法联系命名服务.尝试联系故障转移管理器服务...警告:无法联系故障转移管理器服务,试图联系FMM ...错误的Connect-ServiceFabricCluster:发生一个或多个错误.在第1行:char:1+ Connect-ServiceFabricCluster @connectArgs+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo:未指定:(:) [Connect-ServiceFabricCluster],AggregateException + FullyQualifiedErrorId:CreateClusterConnectionErrorId,Microsoft.ServiceFabric.Powershell.ConnectCluster

PS C:\WINDOWS\system32> Connect-ServiceFabricCluster @connectArgsWARNING: Failed to contact Naming Service. Attempting to contact Failover Manager Service...WARNING: Failed to contact Failover Manager Service, Attempting to contact FMM...FalseConnect-ServiceFabricCluster : One or more errors occurred.At line:1 char:1+ Connect-ServiceFabricCluster @connectArgs+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [Connect-ServiceFabricCluster], AggregateException + FullyQualifiedErrorId : CreateClusterConnectionErrorId,Microsoft.ServiceFabric.Powershell.ConnectCluster

推荐答案

我在PowerShell中遇到了相同的错误,这对我有用:(基于 https://blogs.msdn.microsoft.com/ncdevguy/2016/12/25/connecting-to-a-remote-azure-service-fabric-cluster-using-powershell/)

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 = <your_cluster_FQDN>
$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

注意:KeepAliveIntervalInSec参数是可选的,但其余参数是必需的.

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

注意:这假定您的管理证书已安装在CurrentUser \ My(当前用户"->证书MMC"管理单元中的个人)中.

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

由于OP没有指定@connectArgs是什么,因此无法确定OP是否尝试过我的答案.

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

这篇关于Connect-ServiceFabricCluster无法联系远程Azure Service Fabric群集上的命名服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-24 09:41