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
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 "
"
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" -v
Then, please share the output by removing your API token from the output.