2016-05-30 382 views
5

Azure服務結構存在問題。Azure服務結構:無法運行本地服務結構簇

我已經在https://azure.microsoft.com/en-gb/documentation/articles/service-fabric-get-started/中安裝了它(在Windows 7上)。

然後我嘗試從Visual Studio 2015運行Service Fabric應用程序。我收到錯誤「Connect-ServiceFabricCluster:沒有集羣端點可到達,請檢查是否存在連接/防火牆/ DNS問題」。

下面是運行的填充日誌:

1>------ Build started: Project: Application2, Configuration: Debug x64 ------ 
2>------ Deploy started: Project: Application2, Configuration: Debug x64 ------ 
-------- Package started: Project: Application2, Configuration: Debug x64 ------ 
    Application2 -> c:\temp\Application2\Application2\pkg\Debug 
-------- Package: Project: Application2 succeeded, Time elapsed: 00:00:01.7361084 -------- 
2>Started executing script 'Set-LocalClusterReady'. 
2>Import-Module 'C:\Program Files\Microsoft SDKs\Service Fabric\Tools\Scripts\DefaultLocalClusterSetup.psm1'; Set-LocalClusterReady 
2>-------------------------------------------- 
2>Local Service Fabric Cluster is not setup... 
2>Please wait while we setup the Local Service Fabric Cluster. This may take few minutes... 
2> 
2>Using Cluster Data Root: C:\SfDevCluster\Data 
2>Using Cluster Log Root: C:\SfDevCluster\Log 
2> 
2>Create node configuration succeeded 
2>Starting service FabricHostSvc. This may take a few minutes... 
2> 
2>Waiting for Service Fabric Cluster to be ready. This may take a few minutes... 
2>Local Cluster ready status: 4% completed. 
2>Local Cluster ready status: 8% completed. 
2>Local Cluster ready status: 12% completed. 
2>Local Cluster ready status: 17% completed. 
2>Local Cluster ready status: 21% completed. 
2>Local Cluster ready status: 25% completed. 
2>Local Cluster ready status: 29% completed. 
2>Local Cluster ready status: 33% completed. 
2>Local Cluster ready status: 38% completed. 
2>Local Cluster ready status: 42% completed. 
2>Local Cluster ready status: 46% completed. 
2>Local Cluster ready status: 50% completed. 
2>Local Cluster ready status: 54% completed. 
2>Local Cluster ready status: 58% completed. 
2>Local Cluster ready status: 62% completed. 
2>Local Cluster ready status: 67% completed. 
2>Local Cluster ready status: 71% completed. 
2>Local Cluster ready status: 75% completed. 
2>Local Cluster ready status: 79% completed. 
2>Local Cluster ready status: 83% completed. 
2>Local Cluster ready status: 88% completed. 
2>Local Cluster ready status: 92% completed. 
2>Local Cluster ready status: 96% completed. 
2>Local Cluster ready status: 100% completed. 
2>WARNING: Service Fabric Cluster is taking longer than expected to connect. 
2> 
2>Waiting for Naming Service to be ready. This may take a few minutes... 
2>Connect-ServiceFabricCluster : **No cluster endpoint is reachable, please check 
2>if there is connectivity/firewall/DNS issue.** 
2>At C:\Program Files\Microsoft SDKs\Service 
2>Fabric\Tools\Scripts\ClusterSetupUtilities.psm1:521 char:12 
2>+  [void](Connect-ServiceFabricCluster @connParams) 
2>+   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
2> + CategoryInfo   : InvalidOperation: (:) [Connect-ServiceFabricClus 
2> ter], FabricException 
2> + FullyQualifiedErrorId : TestClusterConnectionErrorId,Microsoft.ServiceFa 
2> bric.Powershell.ConnectCluster 
2> 
2>Naming Service ready status: 8% completed. 
2>Naming Service ready status: 17% completed. 
2>Naming Service ready status: 25% completed. 
2>Naming Service ready status: 33% completed. 
2>Naming Service ready status: 42% completed. 
2>Naming Service ready status: 50% completed. 
2>Naming Service ready status: 58% completed. 
2>Naming Service ready status: 67% completed. 
2>Naming Service ready status: 75% completed. 
2>Naming Service ready status: 83% completed. 
2>Naming Service ready status: 92% completed. 
2>Naming Service ready status: 100% completed. 
2>WARNING: Naming Service is taking longer than expected to be ready... 
2>Local Service Fabric Cluster created successfully. 
2>-------------------------------------------------- 
2>Launching Service Fabric Local Cluster Manager... 
2>You can use Service Fabric Local Cluster Manager (system tray application) to manage your local dev cluster. 
2>Finished executing script 'Set-LocalClusterReady'. 
2>Time elapsed: 00:07:01.8147993 
2>The PowerShell script failed to execute. 
========== Build: 1 succeeded, 0 failed, 1 up-to-date, 0 skipped ========== 
========== Deploy: 0 succeeded, 1 failed, 0 skipped ========== 
+0

您是否嘗試過使用瀏覽器訪問端點? – cassandrad

+0

是的,我有。我試圖去Windows托盤\ Service Fabric本地集羣管理器並打開資源管理器工具(這是http:// localhost:19080 /資源管理器)。 當然,我得到了錯誤。 嘗試在眉毛中打開http:// localhost:19080/Explorer時帶來了「此站點無法到達」消息。這是可以預料的 - 我發現Fabric.exe或FabricGateway等程序尚未啓動。 換句話說 - 我的本地Fabric Fabric已創建(作爲C :)上的文件夾,但其程序尚未啓動。 –

+2

是FabricHostSvc服務啓動? – cassandrad

回答

5

這爲我工作,我偶然發現上MSDN論壇的解決方案。

很可能您的C++運行時已損壞,需要重新安裝。 您必須手動執行vcredist_x64.exe可在

C:\Program Files\Microsoft Service Fabric\bin\Fabric\Fabric.Code\vcredist_x64.exe

發現一旦做到這一點,你可以選擇重新啓動計算機或沒有,我選擇重新啓動,然後運行下面的命令

 C:\Program Files\Microsoft SDKs\Service Fabric\ClusterSetup\CleanCluster.ps1
C:\Program Files\Microsoft SDKs\Service Fabric\ClusterSetup\DevClusterSetup.ps1

我希望這有助於!

+0

您是如何知道這一點的?謝謝! –

+1

@Nate-Wilkins偶然發現MSDN上的一篇文章!我沒有任何線索可以解決這個問題,但是我的智慧已經結束了,不得不嘗試一下,並且它剛剛起作用! –

+0

你碰巧有一個鏈接到MSDN的帖子? – konkked

0

我不得不斷開我的VPN與我的辦公室以及Varun上面顯示的指示。

感謝@Varun分享此!

一旦我連接我的VPN,我無法再次運行系統。

希望這可以幫助別人。

0

如果C++運行時無法解決您的問題,則可以將解決方案縮小到防火牆問題。網絡不允許用戶運行FabricHostSvc服務,您可以在services.msc中檢查這是由於安全問題。如果您只是能夠禁用防火牆/無限制地更改網絡,則問題應該自行解決。

如果您能夠獲得FabrciHostSvn啓動,您的問題將得到解決。

希望這會有所幫助..