运行“重置本地集群”,使用local Service Fabric cluster的任务托盘图标powershell命令不再能够连接到PowerShell窗口中的集群该命令先前成功。Connect-ServiceFabricCluster在“重置本地集群”之后不起作用
复位
连接之前正常工作:
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
实际上,一位同事指出本地服务架构集群是一种开发工具,与生产环境中部署的服务架构无关,所以这真的是一个开发者问题基础设施问题。因此我在这里重新打开它并删除了serverfault副本。 –
张贴为反馈:https://feedback.azure.com/forums/293901-service-fabric/suggestions/18240553-fix-object-is-closed-error-after-local-cluster-r –