0

I'm subscribed to an entity in Cosmos (a ontimeinterval subscription), before that I ran the accumulator server using these commands:

# cd /usr/share/contextBroker/tests
# ./accumulator-server.py 1028 /accumulate on

This is the query I send:

curl orion.lab.fi-ware.org:1026/NGSI9/subscribeContextAvailability -s -S --header 'Content-Type: application/json' --header 'Accept: application/json' \--header "X-Auth-Token: $AUTH_TOKEN" -d @notificate.json

The problem is that I don't get any notification in the server (the interval is 10s and 1 month).

What am I doing wrong? Thanks

adrian
  • 317
  • 2
  • 4
  • 11

1 Answers1

0

It's a little bit hard to help here without some more details. Let's clarify a few things with a question:

You have an active ONTIMEINTERVAL subscription in your Orion Context Broker, sending notifications to the host where you start your accumulator, and to the port 1028. The subscription has an interval of ten seconds and the duration is one month. The accumulator starts correctly but you see no notifications, using curl localhost:1028/dump. Is this correct?

Now, the first thing you should do is to make sure the broker is running, sending it a 'curl localhost:1026/version' (if the broker is started in its default port 1026). You should get a reply in XML, with some general info on the running broker. The message content itself is not so interesting for now, just the fact that the broker is responding.

Next thing would be to make sure the subscription is there. Unfortunately the broker itself has no way of reporting back the list of active subscriptions.

You'll have to enter mongo (assuming mongod is running! :-)) to make sure your subscription is there:

% mongo
mongo> use orion
mongo> db.csubs.find()
mongo> quit()

Among the subscriptions you should find yours, with 'reference' '[your host]:1028/accumulate'.

Pay special attention to the 'expiration' field (its in unix seconds), perhaps your subscription has expired? Also, 'throttling' might be interesting - make sure 'throttling' has a low value - 1-10.

OK, that's all I can think of for now. Good luck, and let me/us know what you find.

kzangeli
  • 403
  • 2
  • 8
  • Hi! Thanks kzangeli for your response. I've edited my post with the query. As you can see I don't use localhost in my request, because I want a subscription of an entity that is currently in Cosmos. What I have in 'localhost' is the accumulator server. It's not running yet :( – adrian Sep 01 '14 at 07:17
  • @adrian, please edit your question to include also the content of the notificate.json file, as, after looking to your curl commant, it containst the actual subscription information. – fgalan Sep 08 '14 at 06:24