Max retries exceed with url (Failed to establish a new connection: [Errno 110] Connection timed out)

Viewed 27130
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='mycompanyurl.in',     
port=443): Max retries exceeded with url: /api/v1/issues.json (Caused by 
NewConnectionError('<requests.packages.urllib3.connection.VerifiedHTTPSConnection object 
at 0x51047d0>: Failed to establish a new connection: [Errno 110] Connection timed out',))

However, mycompanyurl.in is fine & I can open it in a browser as well. I'm using Python 2.7.5.

2 Answers

I faced this issue earlier and in my case the IP address of our server was not allowed to access the APIs by the APIs provider. So maybe you should contact with your API's provider to whitelist your server IP.

I don't know exactly about your infrastructure, but I resolved the same issue.

For example, assuming you have AWS EC2 (internal IP:150.150.150.150 and external IP: 10.10.10.10) and a second one for any API (internal IP:x.x.x.x and external IP: y.y.y.y). Now, you want to call API on the second EC2.

If in you a security group of the second EC2 allow, for example, port 5000 on HTTP protocol for internal IP (150.150.150.150) of the first EC2 you will have this issue. When you write down the external IP (10.10.10.10) you will be successful.

To be close to your case, I would like to suggest check the security group/policy on the instance where 'mycompanyurl.in' is located. Maybe, there, something is wrong

Related