简体   繁体   中英

Orion: Not receiving notifications in Accumulator server

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

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM