无法访问集群端点,请检查是否存在 connectivity/firewall/DNS 问题

No cluster endpoint is reachable, please check if there is connectivity/firewall/DNS issue

我目前从事云技术方面的工作。在我当前的一个项目中,我在 Azure 中创建了服务结构集群。然后我尝试通过 Windows PowerShell 连接到集群。我收到错误

No cluster endpoint is reachable, please check if there is connectivity/firewall/DNS issue.

请告诉我如何解决上述问题。

此致,

普拉迪普

经过大量研究后,我使用以下链接找到了上述问题的解决方案。

准备开发环境

https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-get-started

使用 Azure 门户在 Azure 中创建 Service Fabric 集群

https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-cluster-creation-via-portal

我在使用 PowerShell 连接安全集群时犯的错误是在我编写上述命令之前忘记启用 PowerShell 脚本执行。

所以,首先我使用以下命令启用了强大的 shell 脚本执行。

Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Force -Scope CurrentUser

之后我使用下面的命令连接到我的安全集群,现在它工作正常。

Connect-serviceFabricCluster

No cluster endpoint is reachable, please check if there is connectivity/firewall/DNS issue


情况一:

我在尝试部署到 Azure 时遇到上述错误。当我尝试从 Visual Studio 部署时,连接端点无法解析:

解决方案 1:

原来我必须先在 Azure 中打开端口 (19000)!

详情见Tutorial: Filter network traffic with a network security group using the Azure Portal


情况二:

在尝试部署第二个应用程序之前,我已经停止了我的本地集群!

解决方案 2:

我从托盘菜单重新启动了我的本地集群。一个相关的解决方案是重置并重启本地集群。

我花了一天的时间才弄明白哪里出了问题。升级或从头开始安装后,我也遇到了这个问题!

使用以下项目稍微更改此文件 C:\Program Files\Microsoft SDKs\Service Fabric\ClusterSetup\NonSecure\OneNode\ClusterManifestTemplate.json:

  • 如果您尝试在本地主机上进行调试,请将 iPAddress 更改为 localhost

    { "name": "DevCluster", "clusterConfigurationVersion": "1.0.0", "apiVersion": "10-2017", "nodes":[ { "nodeName": "_Node_0", "iPAddress": "localhost", "nodeTypeRef": "NodeType0", "faultDomain": "fd:/0", "upgradeDomain": "0" } ], }

  • 将以下参数添加到主机部分:-

    "name": "Hosting", "parameters": [ .... { "name": "FabricContainerAppsEnabled", "value": "false" } ]

本周早些时候我遇到了这个错误,在花了几个小时与 Microsoft 合作后,我们发现我使用的是 $connections 而不是 @connections。

$connections = @{ ConnectionEndpoint='something.eastus.cloudapp.azure.com:19000'; X509Credential=$true; ServerCertThumbprint='4DC09A1212617326E2080EFE7E1022C6554AAEB9'; FindType='FindByThumbprint'; FindValue='71e5d31e7cbb0d10edb9c62e4d1be6e19de22eae'; StoreLocation='CurrentUser'; StoreName='My' }
# Incorrect:
Connect-ServiceFabricCluster $connections
# Correct:
Connect-ServiceFabricCluster @connections

请注意,您传递给 Connect-ServiceFabricCluster cmdlet 的变量应该是@connections。