【问题标题】:Connect-ServiceFabricCluster doesn't work after "Reset local cluster"“重置本地群集”后 Connect-ServiceFabricCluster 不起作用
【发布时间】:2017-07-01 08:21:20
【问题描述】:

使用local Service Fabric cluster 的任务托盘图标运行“重置本地集群”后,Connect-ServiceFabricCluster powershell 命令不再能够在之前该命令的 powershell 窗口中连接到集群成功了。

重置前

连接工作正常:

PS C:\Users\Administrator> Connect-ServiceFabricCluster
True
WARNING: Cluster connection with the same name already existed, the old connection will be deleted


ConnectionEndpoint   :
FabricClientSettings : {
                       ClientFriendlyName                   : PowerShell-46eba43f-9981-4a04-93ce-dcc8bc707059
                       PartitionLocationCacheLimit          : 100000
                       PartitionLocationCacheBucketCount    : 1024
                       ServiceChangePollInterval            : 00:02:00
                       ConnectionInitializationTimeout      : 00:00:02
                       KeepAliveInterval                    : 00:00:20
                       ConnectionIdleTimeout                : 00:00:00
                       HealthOperationTimeout               : 00:02:00
                       HealthReportSendInterval             : 00:00:00
                       HealthReportRetrySendInterval        : 00:00:30
                       NotificationGatewayConnectionTimeout : 00:00:30
                       NotificationCacheUpdateTimeout       : 00:00:30
                       AuthTokenBufferSize                  : 4096
                       }
GatewayInformation   : {
                       NodeAddress                          : localhost:19000
                       NodeId                               : bf865279ba277deb864a976fbf4c200e
                       NodeInstanceId                       : 131314568099152528
                       NodeName                             : _Node_0
                       }

重置

使用托盘图标右键单击“手动重置本地集群”,然后:

重置后

如果在同一 powershell 窗口中再次运行,连接失败:

PS C:\Users\Administrator> Connect-ServiceFabricCluster
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 : The object is closed.
At line:1 char:1
+ Connect-ServiceFabricCluster
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [Connect-ServiceFabricCluster], FabricObjectClosedException
    + FullyQualifiedErrorId : TestClusterConnectionErrorId,Microsoft.ServiceFabric.Powershell.ConnectCluster

新窗口

启动一个新的 powershell 窗口,Connect-ServiceFabricCluster 在那里工作,但原来的 powershell 窗口永远不会恢复。


我不知道它在哪里隐藏了它用来记住断开连接的状态。

我尝试删除 $ClusterConnection 变量,但没有效果。

Remove-Variable ClusterConnection

我查看了C:\Windows\System32\WindowsPowerShell\v1.0\Modules\ServiceFabric\,但它是一个已编译的 .net 模块,因此不是最容易理解的。


相关:https://stackoverflow.com/a/38104087/10245

【问题讨论】:

  • 其实有同事指出,本地的Service Fabric集群是一个开发工具,与部署在生产环境中的Service-Fabric无关,所以这确实是开发者的问题而不是基础设施的问题。因此,我在这里重新打开它并删除了 serverfault 副本。

标签: powershell azure-service-fabric


【解决方案1】:

这是一个known 问题。

群集连接失败并显示“对象已关闭”解决方法关闭 当前 PowerShell 窗口并打开一个新的 PowerShell 窗口作为 行政人员。您现在应该能够成功连接

【讨论】:

  • 感谢您找到权威参考,非常感谢。
  • 自从被问到这个问题以来,我遇到了这 4 年,解决方案仍然有效。
猜你喜欢
  • 2019-11-17
  • 2017-09-07
  • 2016-12-21
  • 1970-01-01
  • 2019-09-20
  • 2017-05-06
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多