service fabric集群为什么连接不上?

Why can't service fabric cluster be connected to?

我尝试连接到我刚刚使用以下命令通过 powershell 和 ARM 模板创建的集群(用 z 替换了 ip 号码):

sfctl 集群select --端点http://z.z.z.z:19000

这是不久之后发生的错误:

C:\Program Files (x86)\Microsoft Visual Studio17\Enterprise>sfctl cluster select --endpoint http://z.z.z.z:19000
Error occurred in request., ConnectionError: HTTPConnectionPool(host='z.z.z.z', port=19000): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x05F39F90>: Failed to establish a new connection: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond',))
Traceback (most recent call last):
  File "c:\users\user\appdata\local\programs\python\python36-32\lib\site-packages\urllib3\connection.py", line 141, in _new_conn
(self.host, self.port), self.timeout, **extra_kw)
  File "c:\users\user\appdata\local\programs\python\python36-32\lib\site-packages\urllib3\util\connection.py", line 83, in create_connection
raise err
  File "c:\users\user\appdata\local\programs\python\python36-32\lib\site-packages\urllib3\util\connection.py", line 73, in create_connection
sock.connect(sa)
TimeoutError: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "c:\users\user\appdata\local\programs\python\python36-32\lib\site-packages\urllib3\connectionpool.py", line 601, in urlopen
chunked=chunked)
  File "c:\users\user\appdata\local\programs\python\python36-32\lib\site-packages\urllib3\connectionpool.py", line 357, in _make_request
conn.request(method, url, **httplib_request_kw)
  File "c:\users\user\appdata\local\programs\python\python36-32\lib\http\client.py", line 1239, in request
self._send_request(method, url, body, headers, encode_chunked)
  File "c:\users\user\appdata\local\programs\python\python36-32\lib\http\client.py", line 1285, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
  File "c:\users\user\appdata\local\programs\python\python36-32\lib\http\client.py", line 1234, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
  File "c:\users\user\appdata\local\programs\python\python36-32\lib\http\client.py", line 1026, in _send_output
self.send(msg)
  File "c:\users\user\appdata\local\programs\python\python36-32\lib\http\client.py", line 964, in send
self.connect()
  File "c:\users\user\appdata\local\programs\python\python36-32\lib\site-packages\urllib3\connection.py", line 166, in connect
conn = self._new_conn()
  File "c:\users\user\appdata\local\programs\python\python36-32\lib\site-packages\urllib3\connection.py", line 150, in _new_conn
self, "Failed to establish a new connection: %s" % e)
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x05F39F90>: Failed to establish a new connection: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "c:\users\user\appdata\local\programs\python\python36-32\lib\site-packages\requests\adapters.py", line 440, in send
timeout=timeout
  File "c:\users\user\appdata\local\programs\python\python36-32\lib\site-packages\urllib3\connectionpool.py", line 668, in urlopen
**response_kw)
  File "c:\users\user\appdata\local\programs\python\python36-32\lib\site-packages\urllib3\connectionpool.py", line 668, in urlopen
**response_kw)
  File "c:\users\user\appdata\local\programs\python\python36-32\lib\site-packages\urllib3\connectionpool.py", line 668, in urlopen
**response_kw)
  File "c:\users\user\appdata\local\programs\python\python36-32\lib\site-packages\urllib3\connectionpool.py", line 639, in urlopen
_stacktrace=sys.exc_info()[2])
  File "c:\users\user\appdata\local\programs\python\python36-32\lib\site-packages\urllib3\util\retry.py", line 388, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='51.145.27.4', port=19000): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x05F39F90>: Failed to establish a new connection: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond',))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "c:\users\user\appdata\local\programs\python\python36-32\lib\site-packages\msrest\service_client.py", line 201, in send
**kwargs)
  File "c:\users\user\appdata\local\programs\python\python36-32\lib\site-packages\requests\sessions.py", line 508, in request
resp = self.send(prep, **send_kwargs)
  File "c:\users\user\appdata\local\programs\python\python36-32\lib\site-packages\requests\sessions.py", line 618, in send
r = adapter.send(request, **kwargs)
  File "c:\users\user\appdata\local\programs\python\python36-32\lib\site-packages\requests\adapters.py", line 508, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPConnectionPool(host='51.145.27.4', port=19000): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x05F39F90>: Failed to establish a new connection: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond',))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "c:\users\user\appdata\local\programs\python\python36-32\lib\site-packages\knack\cli.py", line 125, in invoke
cmd_result = self.invocation.execute(args)
  File "c:\users\user\appdata\local\programs\python\python36-32\lib\site-packages\knack\invocation.py", line 85, in execute
cmd_result = parsed_args.func(params)
  File "c:\users\user\appdata\local\programs\python\python36-32\lib\site-packages\knack\commands.py", line 67, in __call__
return self.handler(*args, **kwargs)
  File "c:\users\user\appdata\local\programs\python\python36-32\lib\site-packages\knack\commands.py", line 123, in _command_handler
result = op(client, **command_args) if client else op(**command_args)
  File "c:\users\user\appdata\local\programs\python\python36-32\lib\site-packages\sfctl\custom_cluster.py", line 95, in select
rest_client.send(rest_client.get('/')).raise_for_status()
  File "c:\users\user\appdata\local\programs\python\python36-32\lib\site-packages\msrest\service_client.py", line 227, in send
raise_with_traceback(ClientRequestError, msg, err)
  File "c:\users\user\appdata\local\programs\python\python36-32\lib\site-packages\msrest\exceptions.py", line 45, in raise_with_traceback
raise error.with_traceback(exc_traceback)
  File "c:\users\user\appdata\local\programs\python\python36-32\lib\site-packages\msrest\service_client.py", line 201, in send
**kwargs)
  File "c:\users\user\appdata\local\programs\python\python36-32\lib\site-packages\requests\sessions.py", line 508, in request
resp = self.send(prep, **send_kwargs)
  File "c:\users\user\appdata\local\programs\python\python36-32\lib\site-packages\requests\sessions.py", line 618, in send
r = adapter.send(request, **kwargs)
  File "c:\users\user\appdata\local\programs\python\python36-32\lib\site-packages\requests\adapters.py", line 508, in send
raise ConnectionError(e, request=request)
msrest.exceptions.ClientRequestError: Error occurred in request., ConnectionError: HTTPConnectionPool(host='51.145.27.4', port=19000): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x05F39F90>: Failed to establish a new connection: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond',))

C:\Program Files (x86)\Microsoft Visual Studio17\Enterprise>

我已阅读有关检查负载均衡器以确保其具有规则的答案。负载均衡器没有规则:

我在这里挠头试图理解为什么它不起作用。我正在尝试创建一个部署到此服务结构集群的 VSTS 版本,并正在测试它是否可用,因为我在版本中遇到错误:

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

您使用了错误的端口。 sfctl 使用 Service Fabric 的 HTTP API,它通常是集群上的端口 19080(由负载均衡器设置屏幕截图中的 LBHttpRule 确认)。群集上的端口 19000 通常是二进制连接端口。