运行" 重置本地群集"使用local Service Fabric cluster https://stackoverflow.com/a/38104087/10245 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模块,所以不是最容易理解的。
相关:{{3}}
答案 0 :(得分:1)
那是known问题。
群集连接失败,"对象已关闭"解决方案关闭 当前的PowerShell窗口并打开一个新的PowerShell窗口 管理员。您现在应该能够成功连接