尝试在FIWARE Orion上创建订阅以通知Cygnus实例。但是无论我尝试什么还是订阅状态都失败。

主要问题似乎是我用于通知的Cygnus URL,但是Cygnus已启动并正在运行,没有任何问题,并且此问题仍然存在。

FIWARE Orion版本:

"orion" : {
"version" : "1.15.0-next",
"uptime" : "0 d, 0 h, 24 m, 24 s",
"git_hash" : "9cf2ea8243e4757a52c9019d197112abcf715dbe",
"compile_time" : "Mon Sep 24 08:22:30 UTC 2018",
"compiled_by" : "root",
"compiled_in" : "ea5d2e530912",
"release_date" : "Mon Sep 24 08:22:30 UTC 2018",
"doc" : "https://fiware-orion.readthedocs.org/en/master/"
}

FIWARE Cygnus版本:
version 1.9.0_SNAPSHOT.887d615a9dfc2c09c99e511f8cefb148aa54809e

FIWARE Orion错误日志:
time=Thursday 27 Sep 13:33:09 2018.712Z | lvl=WARN | corr=N/A |
trans=1538055058-177-00000000002 | from=pending | srv=pending |
subsrv=pending | comp=Orion |
op=AlarmManager.cpp[328]:notificationError | msg=Raising alarm
NotificationError http://172.20.0.2:5050/notify: (curl_easy_perform
failed: Timeout was reached)

订阅主体:
{
"description": "A subscription to get info about Room entity",
"subject": {
"entities": [
  {
    "idPattern": ".*",
    "type": "Room"
  }
],
"condition": {
  "attrs": [

  ]
}
},
"notification": {
"http": {
  "url": "http://172.20.0.2:5050/notify"
},
"attrs": [

]
},
"expires": "2040-01-01T14:00:00.00Z",
"throttling": 5
}

我发现了大量类似的问题,它们都指出了Cygnus的网址问题,因为它作为docker容器运行。
但是,您可以在日志和示例中看到我使用了容器的IP地址(而不是localhost等),并且问题一直存在。

我在这里错过了什么,因为与订阅创建没有多大关系,它看起来非常简单,但是由于我上面描述的状态和问题,所有订阅仍以失败告终。

谢谢。

最佳答案

这似乎是连接问题。

您提到您正在使用Docker,并且我了解Orion和Cygnus在不同的Docker容器中运行。因此,之间可能存在某种连通性问题,您在预订中使用的IP不正确,或者Cygnus容器未将端口5050暴露给其他人。

关于docker - FIWARE Orion订阅创建失败,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/52538387/

10-12 20:41