Error Connecting for most websites (Failed to establish a new connection: [Errno -2] Name or service not known' in urllib3
See original GitHub issueI believe this might be a partial duplicate of #230, however, because of lack of information and error output I made my own issue just to be safe.
With the latest python3.7.3 and the correct requirements I constantly run into the issue of websites not connecting. Specifically this happens after trying to connect to Bandcamp, subsequently, all other urls following bandcamp fail as well.
I printed the requests.exceptions.ConnectionError
at line 128 as well as the future object class.
For some reason, urllib3 seems to fail finding the name or service (so this might be a DNS issue?).
Further details below (snippet from e.g. YouTube):
[-] Error Connecting: YouTube
[-] YouTube: Error!
{'errorType': 'response_url', 'errorUrl': 'https://www.zhihu.com/people/{}', 'rank': 0, 'url': 'https://www.zhihu.com/people/{}', 'urlMain': 'https://www.zhihu.com/', 'username_claimed': 'blue', 'username_unclaimed': 'noonewouldeverusethis7', 'request_future': <Future at 0x7f318072ce80 state=finished raised ConnectionError>}
<Future at 0x7f318072ce80 state=finished raised ConnectionError>
HTTPSConnectionPool(host='www.zhihu.com', port=443): Max retries exceeded with url: /people/berghopper (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f318070c2e8>: Failed to establish a new connection: [Errno -2] Name or service not known'))
<Future at 0x7f318072ce80 state=finished raised ConnectionError>
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:6 (2 by maintainers)
Top Results From Across the Web
MinIO | Failed to establish a new connection: [Errno -2] ...
The error message: socket.gaierror: [Errno -2] Name or service not known. implies that DNS resolution on the host name ( foo.bar.foo.bar.com ) ...
Read more >Failed to establish a new connection: [Errno 111 ...
It looks like to be a network issue. I got the same error 111 when trying to connect to that host via IP...
Read more >Error while trying to run make prepare-venv for RA Cisco
I am getting below error on running "sudo make prepare-venv" under ... Failed to establish a new connection: [Errno -2] Name or service...
Read more >Error while installing Python modules like requests | AIX ...
_vendor.urllib3.connection.HTTPSConnection object at 0x30b05e80>: Failed to establish a new connection: [Errno 8] Hostname and service name ...
Read more >Impossible to renew certificate with certbot 0.10.2-1 - Help
urllib3.connection.VerifiedHTTPSConnection object at 0x7f7ff3b6c590>: Failed to establish a new connection: [Errno -2] Name or service not known ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It seems to work fine now, albeit very slow because of the insane amount of DNS requests (I don’t think our home router likes me).
Can you try it now with the latest content on master (version 0.10.0)? In #471, I placed a limit on the number of threads that can be allocated. And, it did not seem to make any difference on performance.
Other people have been having other symptoms, but I wonder if this bug may have been what you have been seeing.