gpt4 book ai didi

powershell - Connect-ServiceFabricCluster 在 "Reset local cluster"之后不起作用

转载 作者:行者123 更新时间:2023-12-03 00:35:25 25 4
gpt4 key购买 nike

在使用 local Service Fabric cluster 的任务托盘图标运行“ Reset local 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

新 window

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

我无法弄清楚它在哪里隐藏了它用来记住断开连接的状态。

我尝试删除 $ClusterConnection 变量无效。
Remove-Variable ClusterConnection

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

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

最佳答案

那是 known问题。

Cluster connection fails with "Object is closed" Solution Close the current PowerShell window and open a new PowerShell window as an administrator. You should now be able to successfully connect

关于powershell - Connect-ServiceFabricCluster 在 "Reset local cluster"之后不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42202524/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com