Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ConnectionError: HTTPConnectionPool(host='localhost', port=19080) #186

Open
oscarfuquen opened this issue Mar 2, 2019 · 5 comments
Open

Comments

@oscarfuquen
Copy link

My service fabric is not running. I am getting this error "ConnectionError: HTTPConnectionPool(host='localhost', port=19080)"

You can find all the info as per bellow:

  • [X ] sfctl version, can check this using pip show sfctl
    Metadata-Version: 2.1
    Name: sfctl
    Version: 7.1.0
    Summary: Azure Service Fabric command line
    Home-page: https://github.com/Azure/service-fabric-cli
    Author: Microsoft Corporation
    Author-email: sfpythoncli@microsoft.com
    Installer: pip
    License: MIT
    Location: /usr/local/lib/python2.7/dist-packages
    Requires: portalocker, msrestazure, adal, applicationinsights, knack, future, psutil, msrest, sfmergeutility, azure-servicefabric, requests
    Classifiers:
    Development Status :: 5 - Production/Stable
    Intended Audience :: Developers
    Topic :: Software Development :: Build Tools
    Environment :: Console
    License :: OSI Approved :: MIT License
    Natural Language :: English
    Programming Language :: Python :: 2.7
    Programming Language :: Python :: 3.5
    Programming Language :: Python :: 3.6
    Programming Language :: Python :: 3.7
    Entry-points:
    [console_scripts]
    sfctl = sfctl:launch

  • [ X] Service Fabric cluster runtime version
    sfctl : Commands for managing Service Fabric clusters and entities. This version is compatible
    with Service Fabric 6.4 runtime.
    Commands follow the noun-verb pattern. See subgroups for more information.

  • [X ] Service Fabric hosting location = on-premise Linux Ubuntu 16.04.5 x64

  • [ X] Debug log if an error is present (can be captured using --debug flag)
    sfctl cluster select --debug
    Command arguments: ['cluster', 'select', '--debug']
    Event: Cli.PreExecute []
    Event: CommandParser.OnGlobalArgumentsCreate [<function on_global_arguments at 0x7f7ff4ba4c80>, <function on_global_arguments at 0x7f7ff4b41f50>, <function on_global_arguments at 0x7f7ff48cb668>]
    Event: CommandInvoker.OnPreCommandTableCreate []
    Event: CommandLoader.OnLoadArguments []
    Event: CommandInvoker.OnPostCommandTableCreate []
    Event: CommandInvoker.OnCommandTableLoaded []
    Event: CommandInvoker.OnPreParseArgs []
    Event: CommandInvoker.OnPostParseArgs [<function handle_output_argument at 0x7f7ff48be050>, <function handle_query_parameter at 0x7f7ff48cb6e0>]
    msrest.universal_http.requests : Configuring retry: max_retries=3, backoff_factor=0.8, max_backoff=90
    msrest.service_client : Accept header absent and forced to application/json
    msrest.universal_http : Configuring redirects: allow=True, max=30
    msrest.universal_http : Configuring request: timeout=100, verify=True, cert=None
    msrest.universal_http : Configuring proxies: ''
    msrest.universal_http : Evaluate proxies against ENV settings: True
    urllib3.connectionpool : Starting new HTTP connection (1): localhost:19080
    urllib3.util.retry : Incremented Retry for (url='/'): Retry(total=2, connect=2, read=3, redirect=None, status=None)
    urllib3.connectionpool : Retrying (Retry(total=2, connect=2, read=3, redirect=None, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f7ff2d8c250>: Failed to establish a new connection: [Errno 111] Connection refused',)': /
    urllib3.connectionpool : Starting new HTTP connection (2): localhost:19080
    urllib3.util.retry : Incremented Retry for (url='/'): Retry(total=1, connect=1, read=3, redirect=None, status=None)
    urllib3.connectionpool : Retrying (Retry(total=1, connect=1, read=3, redirect=None, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f7ff2d8c310>: Failed to establish a new connection: [Errno 111] Connection refused',)': /
    urllib3.connectionpool : Starting new HTTP connection (3): localhost:19080
    urllib3.util.retry : Incremented Retry for (url='/'): Retry(total=0, connect=0, read=3, redirect=None, status=None)
    urllib3.connectionpool : Retrying (Retry(total=0, connect=0, read=3, redirect=None, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f7ff2de44d0>: Failed to establish a new connection: [Errno 111] Connection refused',)': /
    urllib3.connectionpool : Starting new HTTP connection (4): localhost:19080
    msrest.exceptions : Error occurred in request., ConnectionError: HTTPConnectionPool(host='localhost', port=19080): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f7ff2d8c490>: Failed to establish a new connection: [Errno 111] Connection refused',))
    Error occurred in request., ConnectionError: HTTPConnectionPool(host='localhost', port=19080): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f7ff2d8c490>: Failed to establish a new connection: [Errno 111] Connection refused',))
    Traceback (most recent call last):
    File "/usr/local/lib/python2.7/dist-packages/knack/cli.py", line 206, in invoke
    cmd_result = self.invocation.execute(args)
    File "/usr/local/lib/python2.7/dist-packages/sfctl/entry.py", line 81, in execute
    return super(SFInvoker, self).execute(args)
    File "/usr/local/lib/python2.7/dist-packages/knack/invocation.py", line 188, in execute
    cmd_result = parsed_args.func(params)
    File "/usr/local/lib/python2.7/dist-packages/knack/commands.py", line 105, in call
    return self.handler(*args, **kwargs)
    File "/usr/local/lib/python2.7/dist-packages/knack/commands.py", line 212, in _command_handler
    result = op(client, **command_args) if client else op(**command_args)
    File "/usr/local/lib/python2.7/dist-packages/sfctl/custom_cluster.py", line 156, in select
    rest_client.send(rest_client.get('/')).raise_for_status()
    File "/usr/local/lib/python2.7/dist-packages/msrest/service_client.py", line 336, in send
    pipeline_response = self.config.pipeline.run(request, **kwargs)
    File "/usr/local/lib/python2.7/dist-packages/msrest/pipeline/init.py", line 197, in run
    return first_node.send(pipeline_request, **kwargs) # type: ignore
    File "/usr/local/lib/python2.7/dist-packages/msrest/pipeline/init.py", line 150, in send
    response = self.next.send(request, **kwargs)
    File "/usr/local/lib/python2.7/dist-packages/msrest/pipeline/requests.py", line 72, in send
    return self.next.send(request, **kwargs)
    File "/usr/local/lib/python2.7/dist-packages/msrest/pipeline/requests.py", line 137, in send
    return self.next.send(request, **kwargs)
    File "/usr/local/lib/python2.7/dist-packages/msrest/pipeline/init.py", line 150, in send
    response = self.next.send(request, **kwargs)
    File "/usr/local/lib/python2.7/dist-packages/msrest/pipeline/requests.py", line 193, in send
    self.driver.send(request.http_request, **kwargs)
    File "/usr/local/lib/python2.7/dist-packages/msrest/universal_http/requests.py", line 328, in send
    return super(RequestsHTTPSender, self).send(request, **requests_kwargs)
    File "/usr/local/lib/python2.7/dist-packages/msrest/universal_http/requests.py", line 140, in send
    raise_with_traceback(ClientRequestError, msg, err)
    File "/usr/local/lib/python2.7/dist-packages/msrest/exceptions.py", line 54, in raise_with_traceback
    raise error
    ClientRequestError: Error occurred in request., ConnectionError: HTTPConnectionPool(host='localhost', port=19080): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f7ff2d8c490>: Failed to establish a new connection: [Errno 111] Connection refused',))
    msrest.universal_http.requests : Configuring retry: max_retries=3, backoff_factor=0.8, max_backoff=90
    Performing cluster version check
    msrest.universal_http : Configuring redirects: allow=True, max=30
    msrest.universal_http : Configuring request: timeout=100, verify=True, cert=None
    msrest.universal_http : Configuring proxies: ''
    msrest.universal_http : Evaluate proxies against ENV settings: True
    urllib3.connectionpool : Starting new HTTP connection (1): localhost:19080
    urllib3.util.retry : Incremented Retry for (url='/$/GetClusterVersion?api-version=6.4&timeout=60'): Retry(total=2, connect=2, read=3, redirect=None, status=None)
    urllib3.connectionpool : Retrying (Retry(total=2, connect=2, read=3, redirect=None, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f7ff2f67990>: Failed to establish a new connection: [Errno 111] Connection refused',)': /$/GetClusterVersion?api-version=6.4&timeout=60
    urllib3.connectionpool : Starting new HTTP connection (2): localhost:19080
    urllib3.util.retry : Incremented Retry for (url='/$/GetClusterVersion?api-version=6.4&timeout=60'): Retry(total=1, connect=1, read=3, redirect=None, status=None)
    urllib3.connectionpool : Retrying (Retry(total=1, connect=1, read=3, redirect=None, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f7ff2f67350>: Failed to establish a new connection: [Errno 111] Connection refused',)': /$/GetClusterVersion?api-version=6.4&timeout=60
    urllib3.connectionpool : Starting new HTTP connection (3): localhost:19080
    urllib3.util.retry : Incremented Retry for (url='/$/GetClusterVersion?api-version=6.4&timeout=60'): Retry(total=0, connect=0, read=3, redirect=None, status=None)
    urllib3.connectionpool : Retrying (Retry(total=0, connect=0, read=3, redirect=None, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f7ff2b4b110>: Failed to establish a new connection: [Errno 111] Connection refused',)': /$/GetClusterVersion?api-version=6.4&timeout=60
    urllib3.connectionpool : Starting new HTTP connection (4): localhost:19080
    msrest.exceptions : Error occurred in request., ConnectionError: HTTPConnectionPool(host='localhost', port=19080): Max retries exceeded with url: /$/GetClusterVersion?api-version=6.4&timeout=60 (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f7ff2b4b450>: Failed to establish a new connection: [Errno 111] Connection refused',))
    Check cluster version failed due to error: <class 'msrest.exceptions.ClientRequestError'>

Be sure to check if an issue already exists with your symptoms. If so, leave a :thumbsup: reaction to the original issue, rather than creating a duplicate.

@Christina-Kang
Copy link
Contributor

Hi @oscarfuquen , can you elaborate on what you mean by service fabric is not running? How did you set up the cluster, and can you access the cluster via the service fabric explorer?

Thanks!

@oscarfuquen
Copy link
Author

Hi @Christina-Kang ,

The dashboard does not load http:localhost:19080/Explorer/index.html#/

It shows an error in the bottom rigth corner - Error: Get cluster health failed

When I ran this command sfctl cluster select --debug. I got the error above.

@Christina-Kang
Copy link
Contributor

Hi @oscarfuquen,

Most likely, this is because your cluster isn't actually up. How are you setting up the cluster? Are you using any custom values, and if so, what are they? Is this your first time setting it up, or did you have a working cluster previously?

Thanks!

@oscarfuquen
Copy link
Author

Ho @Christina-Kang

The cluster was installed as described on the documentation at this link https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-get-started-linux#set-up-a-local-cluster.

No, custom values.

I used daily service fabric.

@Christina-Kang
Copy link
Contributor

Hi @oscarfuquen

Did you get any issues returned when you ran cluster set up? Did you machine sleep/hibernate since you set up the cluster? The easiest thing to do is probably just to delete the cluster and start a new one. What version of service fabric runtime are you using? If you are not able to create a new cluster after deleting the old one, can you share the traces? They should be located at etc/servicefabric/FabricDataRoot

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants