简体   繁体   English

Orion:在Accumulator服务器中未收到通知

[英]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: 在使用以下命令运行累加器服务器之前,我已订阅Cosmos中的一个实体(ontimeinterval订阅):

# 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). 问题是我没有在服务器中收到任何通知(间隔为10秒和1个月)。

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. 您的Orion上下文代理中有一个活动的ONTIMEINTERVAL订阅,它将通知发送到启动累加器的主机以及端口1028。该通知的间隔为十秒,持续时间为一个月。 The accumulator starts correctly but you see no notifications, using curl localhost:1028/dump. 使用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). 现在,您应该做的第一件事就是确保代理正在运行,并向其发送“ curl localhost:1026 / version”(如果代理是在其默认端口1026中启动的)。 You should get a reply in XML, with some general info on the running broker. 您应该获得XML的回复,其中包含正在运行的代理的一些常规信息。 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(假设mongod正在运行!:-)),以确保您的订阅存在:

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

Among the subscriptions you should find yours, with 'reference' '[your host]:1028/accumulate'. 在订阅中,您应该找到自己的订阅,并带有“引用”“ [您的主机]:1028 /累计”。

Pay special attention to the 'expiration' field (its in unix seconds), perhaps your subscription has expired? 请特别注意“ expiration”字段(它以Unix秒为单位),也许您的订阅已过期? Also, 'throttling' might be interesting - make sure 'throttling' has a low value - 1-10. 另外,“调节”可能很有趣-确保“调节”的值较低-1-10。

OK, that's all I can think of for now. 好的,这就是我现在能想到的。 Good luck, and let me/us know what you find. 祝您好运,让我/我们知道您的发现。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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