I've tried to connect to a cluster that I've just created via powershell and ARM template using the command (replaced ip numbers with z):
sfctl cluster select --endpoint http://z.z.z.z:19000
This is the error that occurs shortly afterwards:
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>
I have read answers about checking the load balancer to ensure it has rules. The load balancer doesn't have rules:
I've scratching my head here to try and understand why it's not working. I'm trying to create a VSTS release that deploys to this service fabric cluster, and am testing that it's available as I'm getting an error in the release:
##[error]No cluster endpoint is reachable, please check if there is connectivity/firewall/DNS issue.
You're using the wrong port. sfctl uses Service Fabric's HTTP API, which is typically port 19080 on your cluster (confirmed by the LBHttpRule in your load balancer settings screenshot). Port 19000 on your cluster is typically the binary connection port.