Docker中的Orion无法与accumulator-server通信:localhost的通知失败

时间:2016-01-17 21:31:09

标签: fiware-orion

我正在使用docker-compose来运行Orion + Mongo。

然后,我开始accumulator-server

drasko@Lenin:~/fiware/fiware-orion/scripts$ ./accumulator-server.py 1028 /accumulate on
verbose mode is on
* Running on http://0.0.0.0:1028/ (Press CTRL+C to quit)

但是,运行a会出错:

orion_1 | WARNING@21:27:21  httpRequestSend.cpp[438]: Notification failure for localhost:1028 (curl_easy_perform failed: Couldn't connect to server)

可能是因为Orion在Docker中运行以及如何解决这个问题?

1 个答案:

答案 0 :(得分:1)

您的问题是您的猎户座主机无法到达累加器。

在订阅中,您正在使用值为" localhost"的引用字段,因此Orion正在查找相对于docker容器的localhost。

要解决这个问题,你应该在docker镜像中运行累加器,或者让Orion能够以除了" localhost"之外的其他方式联系累加器。 (也许在不同的容器中运行累加器并使用docker compose链接它。)