telefonicaid / fiware-orion

Context Broker and CEF building block for context data management, providing NGSI interfaces.
https://github.com/telefonicaid/fiware-orion/blob/master/doc/manuals/orion-api.md
GNU Affero General Public License v3.0
210 stars 265 forks source link

in POST v2/subscriptions with some "notification-http-url" values, CB is stopped #2092

Closed iariasleon closed 8 years ago

iariasleon commented 8 years ago

in POST v2/subscriptions with some "notification-http-url" values, CB is stopped, but does not show any extra info in console or log

dataset

  | url                        |
  |----------------------------|
  | //                         |
  | ///                        |
  | http:///a                  |

subscription request

POST http://localhost:1026/v2/subscriptions
Content-Type: application/json
Fiware-Service: test_notification_http_url_error
Fiware-ServicePath: /test
{"notification": {"http": {"url": "//"}, "attrs": ["temperature"]}, "expires": "2016-04-05T14:00:00.00Z", "subject": {"entities": [{"idPattern": ".*"}], "condition": {"attrs": ["temperature"]}}}

log

time=2016-04-27T10:04:08.632CEST | lvl=DEBUG | corr=N/A | trans=N/A | srv=N/A | subsrv=N/A | from=N/A | function=connectionTreat | comp=Orion | msg=rest.cpp[955]:
time=2016-04-27T10:04:08.632CEST | lvl=DEBUG | corr=N/A | trans=N/A | srv=N/A | subsrv=N/A | from=N/A | function=connectionTreat | comp=Orion | msg=rest.cpp[956]: --------------------- Serving request POST /v2/subscriptions/ -----------------
time=2016-04-27T10:04:08.632CEST | lvl=DEBUG | corr=N/A | trans=N/A | srv=N/A | subsrv=N/A | from=N/A | function=httpHeaderGet | comp=Orion | msg=rest.cpp[274]: HTTP Header:   HOST: qa-orion-fe-02:1026
time=2016-04-27T10:04:08.632CEST | lvl=DEBUG | corr=N/A | trans=N/A | srv=N/A | subsrv=N/A | from=N/A | function=httpHeaderGet | comp=Orion | msg=rest.cpp[274]: HTTP Header:   fiware-service: test_update_happy_path
time=2016-04-27T10:04:08.632CEST | lvl=DEBUG | corr=N/A | trans=N/A | srv=N/A | subsrv=N/A | from=N/A | function=httpHeaderGet | comp=Orion | msg=rest.cpp[274]: HTTP Header:   fiware-servicepath: /test
time=2016-04-27T10:04:08.632CEST | lvl=DEBUG | corr=N/A | trans=N/A | srv=N/A | subsrv=N/A | from=N/A | function=httpHeaderGet | comp=Orion | msg=rest.cpp[274]: HTTP Header:   content-type: application/json
time=2016-04-27T10:04:08.632CEST | lvl=DEBUG | corr=N/A | trans=N/A | srv=N/A | subsrv=N/A | from=N/A | function=httpHeaderGet | comp=Orion | msg=rest.cpp[274]: HTTP Header:   content-length: 198
time=2016-04-27T10:04:08.633CEST | lvl=DEBUG | corr=9e6d4fe4-0c4e-11e6-b405-005056a20feb | trans=N/A | srv=N/A | subsrv=N/A | from=N/A | function=transSemTake | comp=Orion | msg=sem.cpp[276]: transactionIdSet taking the 'trans' semaphore for 'changing the transaction id'
time=2016-04-27T10:04:08.633CEST | lvl=DEBUG | corr=9e6d4fe4-0c4e-11e6-b405-005056a20feb | trans=N/A | srv=N/A | subsrv=N/A | from=N/A | function=transSemTake | comp=Orion | msg=sem.cpp[297]: transactionIdSet has the 'trans' semaphore
time=2016-04-27T10:04:08.633CEST | lvl=DEBUG | corr=9e6d4fe4-0c4e-11e6-b405-005056a20feb | trans=1461744234-431-00000000001 | srv=N/A | subsrv=N/A | from=N/A | function=transSemGive | comp=Orion | msg=sem.cpp[373]: transactionIdSet gives the 'trans' semaphore for 'changing the transaction id'
time=2016-04-27T10:04:08.633CEST | lvl=INFO | corr=9e6d4fe4-0c4e-11e6-b405-005056a20feb | trans=1461744234-431-00000000001 | srv=pending | subsrv=pending | from=pending | function=lmTransactionStart | comp=Orion | msg=logMsg.h[1805]: Starting transaction from 10.95.232.173:62772/v2/subscriptions/
time=2016-04-27T10:04:08.633CEST | lvl=DEBUG | corr=9e6d4fe4-0c4e-11e6-b405-005056a20feb | trans=1461744234-431-00000000001 | srv=pending | subsrv=pending | from=10.95.232.173 | function=connectionTreat | comp=Orion | msg=rest.cpp[1059]: Got 198 of payload of 198 bytes
time=2016-04-27T10:04:08.633CEST | lvl=DEBUG | corr=9e6d4fe4-0c4e-11e6-b405-005056a20feb | trans=1461744234-431-00000000001 | srv=pending | subsrv=/test | from=10.95.232.173 | function=servicePathSplit | comp=Orion | msg=rest.cpp[698]: Service Path 0: '/test'
time=2016-04-27T10:04:08.633CEST | lvl=DEBUG | corr=9e6d4fe4-0c4e-11e6-b405-005056a20feb | trans=1461744234-431-00000000001 | srv=pending | subsrv=/test | from=10.95.232.173 | function=ContextAttribute | comp=Orion | msg=ContextAttribute.cpp[259]: Creating a ContextAttribute 1
time=2016-04-27T10:04:08.633CEST | lvl=DEBUG | corr=9e6d4fe4-0c4e-11e6-b405-005056a20feb | trans=1461744234-431-00000000001 | srv=pending | subsrv=/test | from=10.95.232.173 | function=ContextAttribute | comp=Orion | msg=ContextAttribute.cpp[259]: Creating a ContextAttribute 1
time=2016-04-27T10:04:08.633CEST | lvl=DEBUG | corr=9e6d4fe4-0c4e-11e6-b405-005056a20feb | trans=1461744234-431-00000000001 | srv=pending | subsrv=/test | from=10.95.232.173 | function=ContextAttribute | comp=Orion | msg=ContextAttribute.cpp[259]: Creating a ContextAttribute 1
time=2016-04-27T10:04:08.634CEST | lvl=DEBUG | corr=9e6d4fe4-0c4e-11e6-b405-005056a20feb | trans=1461744234-431-00000000001 | srv=pending | subsrv=/test | from=10.95.232.173 | function=restService | comp=Orion | msg=RestService.cpp[411]: Parsing payload for URL '/v2/subscriptions', method 'POST', service vector index: 25
time=2016-04-27T10:04:08.634CEST | lvl=DEBUG | corr=9e6d4fe4-0c4e-11e6-b405-005056a20feb | trans=1461744234-431-00000000001 | srv=pending | subsrv=/test | from=10.95.232.173 | function=restService | comp=Orion | msg=RestService.cpp[413]: Parsing payload '{"notification": {"http": {"url": "//"}, "attrs": ["temperature"]}, "expires": "2016-04-05T14:00:00.00Z", "subject": {"entities": [{"idPattern": ".*"}], "condition": {"attrs": ["temperature"]}}}

'
time=2016-04-27T10:04:08.634CEST | lvl=DEBUG | corr=9e6d4fe4-0c4e-11e6-b405-005056a20feb | trans=1461744234-431-00000000001 | srv=pending | subsrv=/test | from=10.95.232.173 | function=payloadParse | comp=Orion | msg=RestService.cpp[101]: parsing data for service 'SubscriptionsRequest'. Method: 'POST'
time=2016-04-27T10:04:08.634CEST | lvl=DEBUG | corr=9e6d4fe4-0c4e-11e6-b405-005056a20feb | trans=1461744234-431-00000000001 | srv=pending | subsrv=/test | from=10.95.232.173 | function=payloadParse | comp=Orion | msg=RestService.cpp[102]: outFormat: JSON
fgalan commented 8 years ago

Fixed in PR #2094. Please @iariasleon have a look and close if everygint is correct.

iariasleon commented 8 years ago

LGTM

http code: 400
date: Wed, 27 Apr 2016 11:31:28 GMT
fiware-correlator: 955f0da8-0c6b-11e6-8399-005056a20feb
connection: Keep-Alive
content-type: application/json
content-length: 75
{"error":"BadRequest","description":"Invalid URL parsing notification url"}