3

我已经在固件映像 CentOS-7-x64 上安装了 cygnus 0.8.2,我使用以下方式订阅了 orion 上下文代理:

(curl 193.48.247.246:1026/v1/subscribeContext -s -S --header 'Content-Type: application/json' --header 'Accept: application/json' --header 'Fiware-Service: egmmqtt' --header 'Fiware-ServicePath: /egmmqttpath' -d @- | python -mjson.tool) <<EOF
{
    "entities": [
        {
            "type": "sensors",
            "isPattern": "false",
            "id": "sensors:switch2A"
        }
    ],
    "attributes": [
        "switch2A"
    ],
    "reference": "http://193.48.247.223:5050/notify",
    "duration": "P1M",
    "notifyConditions": [
        {
            "type": "ONCHANGE",
            "condValues": [
                "switch2A"
            ]
        }
    ],
    "throttling": "PT1S"
}
EOF

没有通知到达 cygnus,我在 orionContextBroker 日志中收到此错误:

time=2015-10-06T17:43:37.898CEST | lvl=WARNING | trans=1443447780-161-00000000423 | function=sendHttpSocket | comp=Orion | msg=clientSocketHttp.cpp[358]: Notification failure for 193.48.247.223:5050 (curl_easy_perform failed: Couldn't connect to server)

我不知道为什么在关联的公共 IP 地址下无法访问 cygnus 实例。事实上,我无法从 Orion 实例 ping cygnus 机器实例。关于我错过了什么的任何想法?谢谢!

4

1 回答 1

2

在 cygnus 实例的安全规则中,必须打开 cygnus 正在侦听的端口(在我的情况下为 5050),以便猎户座可以访问 cygnus 实例。

于 2015-10-07T08:33:25.400 回答