konstantin
konstantin

Reputation: 893

Max retries exceeded with url REST Python

I am performing a REST post request using python code. I am trying to communicate with an external server. I am performing several REST calls but a specific one fails. That specific request is the following:

 r = requests.post(url, json=item[1], headers=headers)

I am getting the following error:

requests.exceptions.ConnectionError: HTTPSConnectionPool(host='....euapi', port= ...): 
Max retries exceeded with url: ...(Caused by NewConnectionError
('<requests.packages.urllib3.connection.VerifiedHTTPSConnection object at: ... 
Failed to establish a new connection: [Errno 11004] getaddrinfo failed',))

It seems that the server is blocking the connection to me because of the number of connction with it. However, I just perform only one call. Does that make sense? Any idea of how can I overcome this issue?

Upvotes: 0

Views: 10752

Answers (1)

Roman Mindlin
Roman Mindlin

Reputation: 842

It seems that your 'url' value is not correct (address cannot be resolved). Please check it carefully

Similar question here

Upvotes: 1

Related Questions