FIWARE - Orion Context Broker - Cannot create subscription - Callback is missing -


i'm working orion context broker , i'm trying add new subscription i'm getting error callback missing though have provided one.

here entities have

$ curl localhost:1026/v2/entities -s -s --header 'accept: application/json' | python -mjson.tool [     {         "id": "room1",         "pressure": {             "metadata": {},             "type": "integer",             "value": 720         },         "temperature": {             "metadata": {},             "type": "float",             "value": 23         },         "type": "room"     },     {         "id": "room2",         "pressure": {             "metadata": {},             "type": "integer",             "value": 711         },         "temperature": {             "metadata": {},             "type": "float",             "value": 21         },         "type": "room"     } ] 

and here call create new subscription , subsequent error:

$ curl -v localhost:1026/v2/subscriptions -s -s --header 'content-type: application/json' \ >     -d @- <<eof > { >   "description": "a subscription info room1", >   "subject": { >     "entities": [ >       { >         "id": "room1", >         "type": "room" >       } >     ], >     "condition": { >       "attributes": ["temperature"] >     } >   }, >   "notification": { >     "http": { >       "url": "http://localhost:1028/accumulate" >     }, >     "attrs": [ >       "temperature", >       "pressure" >     ] >   }, >   "expires": "2040-01-01t14:00:00.00z", >   "throttling": 5 > } > eof * hostname not found in dns cache *   trying 127.0.0.1... * connected localhost (127.0.0.1) port 1026 (#0) > post /v2/subscriptions http/1.1 > user-agent: curl/7.35.0 > host: localhost:1026 > accept: */* > content-type: application/json > content-length: 417 >  * upload sent off: 417 out of 417 bytes < http/1.1 400 bad request < connection: keep-alive < content-length: 58 < content-type: application/json < date: mon, 08 aug 2016 10:11:39 gmt <  * connection #0 host localhost left intact {"error":"badrequest","description":"callback missing"} 

first of all, request create entities (post /v2/entities) not accept vector of entities, 1 single object. request should give error (unfortunately broker responds json parse error not 100% correct). change request create room1, , add request if want create room2 well.
now, creation of subscription looks good. ran test exact request , worked fine.
now, try understand problem, ask add information description of question:

  • what version of orion context broker using? (use: curl localhost:1026/version) - might want update newer version, in case old (1.2.0 latest release).
  • the traces broker produces @ receiving request create subscription. (use: cat /tmp/contextbroker.log). if start broker yourself, start traces on (use options: -t 0-255 -loglevel debug)

lastly, sorry delay, vacation times ...


Comments

Popular posts from this blog

Spring Boot + JPA + Hibernate: Unable to locate persister -

go - Golang: panic: runtime error: invalid memory address or nil pointer dereference using bufio.Scanner -

c - double free or corruption (fasttop) -