猎户座不通知天鹅座(超时错误)

时间:2016-03-03 14:09:21

标签: fiware-orion fiware-cygnus

猎户座似乎无法到达天鹅座,并发出以下警告(我隐藏了IP')

WARNING@13:33:21  AlarmManager.cpp[303]: Raising alarm NotificationError Y.Y.Y.Y:5050/notify: (curl_easy_perform failed: Timeout was reached)

我首先创建了一个实体,然后进行了订阅,随后更新了该实体。有关信息,以下是contextBroker启动时的整个调试日志记录:

INFO@13:31:51  contextBroker.cpp[1808]: Startup completed
INFO@13:32:51  connectionOperations.cpp[626]: Database Operation Successful (command: { listDatabases: 1 })
INFO@13:32:51  connectionOperations.cpp[79]: Database Operation Successful (query: { conditions.type: "ONCHANGE" })
INFO@13:33:16  logMsg.h[1803]: Starting transaction from X.X.X.X:45738/v1/updateContext
INFO@13:33:16  connectionOperations.cpp[79]: Database Operation Successful (query: { _id.id: "1", _id.type: "auto", _id.servicePath: /^\/$/ })
INFO@13:33:16  connectionOperations.cpp[401]: Database Operation Successful (update: <{ _id.id: "1", _id.type: "auto", _id.servicePath: /\// }, { $set: { attrs.kenteken: { value: "TEST", type: "string", creDate: 1457009737, modDate: 1457011996 }, modDate: 1457011996 }, $unset: { location: 1 } }>)
INFO@13:33:16  logMsg.h[1803]: Starting transaction to Y.Y.Y.Y:5050/notify
INFO@13:33:16  logMsg.h[1887]: Transaction ended
INFO@13:33:20  logMsg.h[1803]: Starting transaction from X.X.X.X:45738/v1/subscribeContext
INFO@13:33:20  connectionOperations.cpp[153]: Database Operation Successful (query: { query: { $or: [ { _id.id: "1", _id.type: "auto" } ], _id.servicePath: { $in: [ null, /^$/, /^/.*/ ] }, attrNames: { $in: [ "kenteken", "timestamp" ] } }, orderby: { creDate: 1 } })
INFO@13:33:20  connectionOperations.cpp[153]: Database Operation Successful (query: { query: { $or: [ { _id.id: "1", _id.type: "auto" } ], _id.servicePath: { $in: [ null, /^$/, /^/.*/ ] } }, orderby: { creDate: 1 } })
INFO@13:33:20  logMsg.h[1803]: Starting transaction to Y.Y.Y.Y:5050/notify
INFO@13:33:20  connectionOperations.cpp[336]: Database Operation Successful (insert: { _id: ObjectId('56d83d2070c15b679240ebd6'), expiration: 1459604000, reference: "http://Y.Y.Y.Y:5050/notify", throttling: 1, servicePath: "/#", entities: [ { id: "1", type: "auto", isPattern: "false" } ], attrs: [ "kenteken", "timestamp" ], conditions: [ { type: "ONCHANGE", value: [ "kenteken" ] } ], expression: { q: "", geometry: "", coords: "", georel: "" }, lastNotification: 1457012000, count: 1, format: "JSON" })
INFO@13:33:20  logMsg.h[1887]: Transaction ended
WARNING@13:33:21  AlarmManager.cpp[303]: Raising alarm NotificationError Y.Y.Y.Y:5050/notify: (curl_easy_perform failed: Timeout was reached)
INFO@13:33:21  logMsg.h[1887]: Transaction ended
INFO@13:33:25  logMsg.h[1887]: Transaction ended
INFO@13:33:32  logMsg.h[1803]: Starting transaction from X.X.X.X:45738/v1/updateContext
INFO@13:33:32  connectionOperations.cpp[79]: Database Operation Successful (query: { _id.id: "1", _id.type: "auto", _id.servicePath: /^\/$/ })
INFO@13:33:32  connectionOperations.cpp[401]: Database Operation Successful (update: <{ _id.id: "1", _id.type: "auto", _id.servicePath: /\// }, { $set: { attrs.kenteken: { value: "93XBV4", type: "string", creDate: 1457009737, modDate: 1457012012 }, modDate: 1457012012 }, $unset: { location: 1 } }>)
INFO@13:33:32  logMsg.h[1803]: Starting transaction to Y.Y.Y.Y:5050/notify
INFO@13:33:32  logMsg.h[1887]: Transaction ended
INFO@13:33:32  logMsg.h[1803]: Starting transaction to Y.Y.Y.Y:5050/notify
INFO@13:33:37  logMsg.h[1887]: Transaction ended

超时的原因是什么?

N.B。:我可以看到在MongoDB中创建的实体(Orion的dbhost),因此假设请求是正确的。官方文档使用相同格式的事实证实了这一点。 Cygnus也按官方文档配置,似乎正常工作(日志中没有错误,只是没有从Orion接收数据)。

2 个答案:

答案 0 :(得分:0)

不确定此问题的原因,因为我需要有关Y.Y.Y.Y中安全组配置的更多信息(如问题帖子的评论中所述)。

但是,此问题最可能的原因是:

  • 天鹅座未在Y.Y.Y.Y主机中启动。
  • Cygnus是在Y.Y.Y.Y主机中启动的,但在不同于5050的端口
  • Y.Y.Y.Y主机中的某些内容(例如防火墙或安全组)阻止了传入通知。
  • 主机中的某些东西是Orion正在运行(例如防火墙)阻止了外出通知。
  • 还有一些其他网络问题导致连接问题。

答案 1 :(得分:0)

我遇到了同样的问题,但是使用猎户座 - &gt;质子通讯。我的Proton实例没有收到猎户座通知。

由于我正在为Orion和Proton使用Docker,我解决了在订阅中插入Proton docker IP的问题。

使用Array<String>查找容器泊坞窗IP。我的Proton容器IP为enum class

然后,当您订阅上下文时,请在contextSubscription有效内容中使用该IP。就我而言,它是sudo docker network inspect bridge

在你的情况下,使用Cygnus,应该是172.17.0.4