node.jsibm-watsonretrieve-and-rank

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

Solution

  • EDIT

    After some investigations I've found that there was a bug in the Solr-client so it is currently impossible to make it work. More info here on this github issue.