node.js - 在 Node 中的代理后面访问 Watson 检索和排名

标签 node.js ibm-watson retrieve-and-rank

我需要知道 R&R 服务是否可以在代理后面使用。 请看下一部分,看看我的调查。 我正在使用的代码在我家里工作。 (没有防火墙/没有代理,只有路由器)


我从下面的代码开始。 https://console.eu-gb.bluemix.net/catalog/starters/personality-insights-nodejs-web-starter

我尝试在本地执行它,它正在使用以下配置来安装模块。

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

当它工作时,我开始玩 R&R。但我只是遇到了一个错误。

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

其中ip地址对应gateway.watsonplatform.net

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

由于防火墙,ping 被阻止

在我的调查过程中,我发现每次发送两个 ICMP 请求时执行 R&R 服务测试时。

packet listening

可能是因为防火墙的原因。但为什么这个服务需要发送 ICMP 数据包呢?

简单回顾一下:

  1. 代码在没有防火墙/没有代理的情况下工作
  2. 个性洞察服务在代理/防火墙后面运行
  3. R&R 不是

最佳答案

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.

关于node.js - 在 Node 中的代理后面访问 Watson 检索和排名,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42371823/

相关文章:

node.js - 为什么热重载不适用于 reactjs visual studio 2019 模板

python-3.x - 如何使用 python 发布curl命令

javascript - "msg":"Error parsing JSON field value. 意外的 OBJECT_START

node.js - node+mongo,除非在本地主机上,否则无法插入到 mongo

javascript - lodash在nodejs中将数组拆分为 block

ibm-watson - 使用watson-developer-cloud Node.js库的convert函数时,如何指定原文档的mime类型?

ibm-cloud - 如何在 Bluemix Retrieve and Rank Service 中导入训练数据?

ibm-cloud - 如何将 IBM bluemix Retrieve 和 Rank Web 界面集成到 IOS 应用程序中?

node.js - 如何在 MongoDB 中通过单个查询获取计数和最大日期?

python - 如何使用 Plotly 绘制 IBM Watson NLU API JSON 输出?