OpenCalais: No connection could be made because the target machine actively refused it 159.220.24.17

I was trying out OpenCalais with Sitecore. I have tried this before and it worked at that time. However this time I am doing this on my Work PC. This time I got the error:

Exception: System.Net.Sockets.SocketException
Message: No connection could be made because the target machine actively refused it 159.220.24.176:443
Source: System
   at System.Net.Sockets.Socket.InternalEndConnect(IAsyncResult asyncResult)
   at System.Net.Sockets.Socket.EndConnect(IAsyncResult asyncResult)
   at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Exception& exception)

I thought it was due to firewall but when I looked up the IP 159.220.24.176, it is registered to Thomson Reuters. I have added the API key in my solution however the error is persistent.

Can someone help resolve this issue. Thanks

Answers

  • @xrisk

    I have used the curl command to verify the problem. It works fine if I use api.thomsonreuters.com instead of IP Address.

    curl -X POST --header "Content-Type: text/raw" --header "Accept: application/json" --header "x-ag-access-token: <token>" --header "outputFormat: xml/rdf" -d "test" "https://api.thomsonreuters.com/permid/calais"

    However, if I use IP address, I need to add the --insecure option and it returns 404 Not Found.

    curl -X POST --header "Content-Type: text/raw" --header "Accept: application/json" --header "x-ag-access-token: <token>" --header "outputFormat: xml/rdf" -d "test" --insecure "https://159.220.24.176/permid/calais" -v

    The output is:

    < HTTP/1.1 404 Not Found
    < Date: Tue, 22 Oct 2019 03:40:59 GMT
    < Content-Type: application/json
    < Content-Length: 182
    < Connection: keep-alive
    <
    {"fault":{"faultstring":"Unable to identify proxy for host: 159.220.24.176:9003 and url: \/permid\/calais","detail":{"errorcode":"messaging.adaptors.http.flow.ApplicationNotFound"}}}* Connection #0 to host 159.220.24.176 left intact

    Can you try with the hostname (api.thomsonreuters.com) instead of the IP address?


  • @""jirapongse.phuriphanvichai Sorry for late response. I tried with "api.thomsonreuters.com" but got this reponse "

    OpenCalais: No connection could be made because the target machine actively refused it 159.220.24.176:443

    "

  • Could you test with the following curl command?

    curl -X POST --header "Content-Type: text/raw" --header "Accept: application/json" --header "x-ag-access-token: <token>" --header "outputFormat: xml/rdf" -d "test" "https://api.thomsonreuters.com/permid/calais&quot; -v

    Then, please share the output by removing your API token from the output.

  • Got error: A parameter cannot be found that matches parameter name 'X'

  • You can remove -X option or find another option that sends HTTP POST to the server.

  • This error is a network-related error occurred while establishing a connection to the Server. It means that the error is occurring because there is no server listening at the hostname and port you assigned. It literally means that the machine exists but that it has no services listening on the specified port .


    Generally, it happens that something is preventing a connection to the port or hostname. Either there is a firewall blocking the connection or the process that is hosting the service is not listening on that specific port. This may be because it is not running at all or because it is listening on a different port. So, no connection can be established.