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

[Errno -3] Temporary failure in name resolution #3677

Closed
kalyanakannan opened this issue Nov 14, 2016 · 13 comments
Closed

[Errno -3] Temporary failure in name resolution #3677

kalyanakannan opened this issue Nov 14, 2016 · 13 comments

Comments

@kalyanakannan
Copy link

While trying to get access token from api I getting the follwoing error,

ConnectionError: HTTPSConnectionPool(host='', port=443): Max retries exceeded with url: /oauth2/access_token/ (Caused by <class 'socket.gaierror'>: [Errno -3] Temporary failure in name resolution)

Is there any way I can resolve this error?

Thanks.

@Lukasa
Copy link
Member

Lukasa commented Nov 14, 2016

This error means that a DNS problem occurred and we couldn't resolve the IP address. If you see this problem you should simply retry the request.

@Lukasa Lukasa closed this as completed Nov 14, 2016
@kalyanakannan
Copy link
Author

Already I have tried that, but it's not working for me. Shall I try with IP address Or is there any other solution for this?

@Lukasa
Copy link
Member

Lukasa commented Nov 14, 2016

Can you print the URL you're trying to reach?

@kalyanakannan
Copy link
Author

I tried the same API URL in postman, its working fine. But in my request method, it throws the above error.

@Lukasa
Copy link
Member

Lukasa commented Nov 14, 2016

So this strongly suggests you have a problem with your OS or Python configuration, or possibly your URL, because it seems like the Python code cannot resolve the domain name.

@kalyanakannan
Copy link
Author

I am getting the right URL from requests. Following warning error message is displayed while running the script. Is there any issues?

/usr/local/lib/python2.7/dist-packages/requests/packages/urllib3/util/ssl_.py:315: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#snimissingwarning.
SNIMissingWarning
/usr/local/lib/python2.7/dist-packages/requests/packages/urllib3/util/ssl_.py:120: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
InsecurePlatformWarning

@Lukasa
Copy link
Member

Lukasa commented Nov 14, 2016

Those error messages aren't going to be relevant, no. Can you set allow_redirects=False to see if you're being redirected away?

@kalyanakannan
Copy link
Author

kalyanakannan commented Nov 16, 2016

it's working now. problem from dns system. thank you

@syedn
Copy link

syedn commented Oct 30, 2017

how did u resolve dns problem???

@ibgithub
Copy link

ibgithub commented Dec 9, 2017

I face the same problem, and solved by restart computer

@andre-cavalheiro
Copy link

I fixed this by disabling my VPN

@netdesign
Copy link

You have issues with your DNS. Check on your system that public interface is configured to use correct DNS servers.

@georgesamy
Copy link

For me, it was the firewall that was blocking the connection. I'm using ufw .. the following command fixed it for me.
sudo ufw allow out to any port 53
don't forget to reload ufw
sudo ufw reload

@psf psf locked as resolved and limited conversation to collaborators Oct 6, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants