ConstantD ConstantD -4 years ago 173
Node.js Question

Access watson retrieve and rank behind a proxy in Node

I need to know if the R&R service can be used behind a proxy.
Take a look at the next part to see my investigations.
The code I'm using was working at my home. (No firewall/No Proxy, only a router)




I started from the following code.
https://console.eu-gb.bluemix.net/catalog/starters/personality-insights-nodejs-web-starter

I try to execute it locally and it was working using the following configuration to be able to install the modules.

npm config set registry http://registry.npmjs.org
npm config set proxy http://x.x.x.x:xx
npm config set https-proxy http://x.x.x.x:xx
npm config set strict-ssl false
set http_proxy=http://x.x.x.x:xx
set https_proxy=http://x.x.x.x:xx
set HTTP_PROXY=http://x.x.x.x:xx
set HTTPS_PROXY=http://x.x.x.x:xx


As it was working I started playing around with R&R. But I'm only having an error.

Error searching for documents: Error: connect ETIMEDOUT 158.85.132.88:443


Where the ip address corresponds gateway.watsonplatform.net

ping gateway.watsonplatform.net
PING gateway.watsonplatform.net (158.85.132.88) 56(84) bytes of data.


Because of the firewall the ping are blocked

During my investigations I found that when executing my test for the R&R service every time two ICMP request are send.

packet listening

Probably because of the firewall. But why this service would need to send ICMP packets ?

Just to recap:


  1. The code is working when there is no firewall/no proxy

  2. The personnality Insight service is working behind proxy/firewall

  3. The R&R isn't


Answer Source

This is the answer given by the Watson support team.

I checked with development. There isn't anything special that RNR does with proxy's it's just REST API calls.

I finally found that it was a problem with my company proxy. Although I still don't know why it only affects some services and not all of them.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download