Failed to establish a new connection: [Errno 111] Connection refused

I have a python component to make HTTP requests towards host='select.datascopeapi.extranet.reuters.biz', port=443.
But I get: Max retries exceeded with url: /RestApi/v1/Extractions/ExtractRaw (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f98af0f7940>: Failed to establish a new connection: [Errno 111] Connection refused',))

Best Answer

Answers

  • Jirapongse
    Jirapongse ✭✭✭✭✭

    @Beera.Rajesh

    It looks like to be a network issue. I got the same error 111 when trying to connect to that host via IP Address (159.43.7.35).

    requests.exceptions.ConnectionError: HTTPSConnectionPool(host='159.43.7.35', port=443): Max retries exceeded with url: /RestApi/v1/Authentication/RequestToken (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7fafc90b7d68>: Failed to establish a new connection: [Errno 111] Connection refused',))

    The client can use the following curl command to verify the connection.

    curl -v -H "Content-Type: application/json" -H "Prefer: respond-async" -X POST -d "{\"Credentials\": {\"Username\": \"ClientUsername\",\"Password\": \"ClientPassword\"}}" https://select.datascopeapi.extranet.reuters.biz/RestApi/v1/Authentication/RequestToken

    If it requires a proxy to connect to the server, the client needs to configure a proxy in Python.