2017-02-13 76 views
0

運行「重置本地集羣」,使用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

+0

實際上,一位同事指出本地服務架構集羣是一種開發工具,與生產環境中部署的服務架構無關,所以這真的是一個開發者問題基礎設施問題。因此我在這裏重新打開它並刪除了serverfault副本。 –

+0

張貼爲反饋:https://feedback.azure.com/forums/293901-service-fabric/suggestions/18240553-fix-object-is-closed-error-after-local-cluster-r –

回答

1

這是一個known問題。

集羣連接失敗「時關閉對象的」溶液關閉 當前PowerShell窗口並打開新的PowerShell窗口作爲 管理員。你現在應該能夠成功連接

+0

感謝您找到授權書參考,非常感謝。 –