为什么不能连接服务结构集群?

时间:2018-03-30 07:55:44

标签: azure-devops azure-service-fabric azure-pipelines-release-pipeline

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

sfctl cluster select --endpoint http://z.z.z.z:19000

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



C:\Program Files (x86)\Microsoft Visual Studio\2017\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 Studio\2017\Enterprise>
&#13;
&#13;
&#13;

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

load balancer rules

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

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

1 个答案:

答案 0 :(得分:1)

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