Search code examples
fiwarefiware-orion

FIWARE Orion Docker container: problems in notification subscriptions


I'm using Orion on my own server (through the provided Docker container (container Orion at version 1.14.0-next)). Everything works except the subscriptions. I found a lot of possible contents to send to Orion to submit a subscription but I continue to see "status": "failed" when I query the list of subscriptions (and, in any case, no data is received). Do you have any idea on how to solve such a problem?

In the following you can find the links to the different versions I tried:

and also (even though it is for a different purpose):

and finally one of the submitted subscriptions:

(curl localhost:1026/v2/subscriptions -s -S --header 'Content-Type: application/json' -d @-) <<EOF
{
  "description": "A subscription to get info about Compartment",
  "subject": {
    "entities": [
      {
        "id": "Compartment",
        "type": "Compartment"
      }
    ],
    "condition": {
      "attrs": [
        "lastUpdate"
      ]
    }
  },
  "notification": {
    "http": {
      "url": "http://0.0.0.0:1028/accumulate"
    },
    "attrs": [
    ]
  },
  "expires": "2040-01-01T14:00:00.00Z",
  "throttling": 1
}
EOF

Solution

  • A failed status means that Orion has tried to send the notification but it hasn't be delivered. This is typically due to a connection problem between Orion and the receiver.

    You are using http://0.0.0.0:1028/accumulate as receiver. This points to the local machine, i.e. the same machine where Orion is running. In other words, the process that listen to port 1028 to receive notifications has to run in the same system where Orion runs.

    I assume you are running Orion in a container and your receiver process in another container. That migth be the cause of the probem. You should use in url the IP of the receiver not 0.0.0.0.