1
votes

Trying to create subscription on FIWARE Orion to notify Cygnus instance. But no matter what I try or do I get failed as subscription status.

Main problem seem to be Cygnus URL I am using for notification, but Cygnus is up and running without any issues and this problem still persist.

FIWARE Orion version:

"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:

version 1.9.0_SNAPSHOT.887d615a9dfc2c09c99e511f8cefb148aa54809e

FIWARE Orion error log:

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)

Subscription body:

{
"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
}

I found good amount of simmilar problems they all point out to url issues of Cygnus because it is run as docker container. But you can see in logs and example that I use IP address of containers (not localhost etc), and issue is constant.

What did I miss here since there is no much to do with subscription creation and it looks very simple but still all subscription are getting back with failed as status and issue I describe above.

Thanks.

1
I agree with @fgalan that it is probably a connectivity problem. When you create the cygnus subscription, for the URL field try to use the IP docker of the cygnus container. This should work if both containers are in the same docker network. Otherwise, try to use IP 172.17.0.1, which is the gateway between Docker and the host, but first make sure you have mapped the ports that your docker containers expose for each of the services (see here). In this case it would be port 5050 for the cygnus. - Emiliano Viotti

1 Answers

0
votes

It seems to be a connectivity problem.

You mention you are using Docker and I understand that Orion and Cygnus run in different docker containers. Thus, probably there is some kind of connectivity problem between, the IP you are using in the subscription is not the right one or Cygnus container is not exposing port 5050 to others.