You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When CB is notifying in ngsiv2 several entities in the same fiware-servicepath (like /)
i.e.:
time=2021-05-20T13:37:25.092Z | lvl=INFO | corr=83099026-b970-11eb-a32f-0242ac110011 | trans=d66f89f2-81b3-450b-8353-f6cc68bafbc5 | srv=smartcity | subsrv=/ | comp=cygnus-ngsi | op=getEvents | msg=com.telefonica.iot.cygnus.handlers.NGSIRestHandler[324] : [NGSIRestHandler] Received data ({"subscriptionId":"60a661256bbc23164e62d6fb","data":[{"id":"estacion1","type":"WeatherObserved","dateObserved":{"type":"DateTime","value":"2021-02-18T06:00:45.145Z","metadata":{}},"illuminance":{"type":"Number","value":3,"metadata":{}},"solarRadiation":{"type":"Number","value":2,"metadata":{}}},{"id":"WeatherObserved:disp1234bc","type":"WeatherObserved","TimeInstant":{"type":"DateTime","value":"2021-05-20T13:33:07.068Z","metadata":{}},"dateObserved":{"type":"DateTime","value":"2021-05-20T13:32:43.772Z","metadata":{}}}]})
time=2021-05-20T13:37:25.094Z | lvl=WARN | corr=83099026-b970-11eb-a32f-0242ac110011 | trans=d66f89f2-81b3-450b-8353-f6cc68bafbc5 | srv=smartcity | subsrv=/ | comp=cygnus-ngsi | op=getEvents | msg=com.telefonica.iot.cygnus.handlers.NGSIRestHandler[363] : [NGSIRestHandler] Bad HTTP notification ('fiware-servicepath' header value does not match the number of notified context responses
time=2021-05-20T13:37:25.102Z | lvl=WARN | corr=83099026-b970-11eb-a32f-0242ac110011 | trans=d66f89f2-81b3-450b-8353-f6cc68bafbc5 | srv=smartcity | subsrv=/ | comp=cygnus-ngsi | op=doPost | msg=org.apache.flume.source.http.HTTPSource$FlumeHTTPServlet[237] : Received bad request from client.
org.apache.flume.source.http.HTTPBadRequestException: 'fiware-servicepath' header value does not match the number of notified context responses
at com.telefonica.iot.cygnus.handlers.NGSIRestHandler.getEvents(NGSIRestHandler.java:366)
at org.apache.flume.source.http.HTTPSource$FlumeHTTPServlet.doPost(HTTPSource.java:235)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:841)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:535)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:190)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595)
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1253)
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564)
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1155)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
at org.eclipse.jetty.server.Server.handle(Server.java:564)
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:317)
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251)
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:279)
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:110)
at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:124)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:673)
at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:591)
at java.lang.Thread.run(Thread.java:748)
As happens with non-initial notification, the Fiware-ServicePath header is included in initial notification. However, note that an initial notification potentially includes several (more than one) entities, which may belong to different service paths. Thus, a list of comma separated values is used (the first element in the Fiware-ServicePath list corresponding to the first entity, etc.).
IMHO which may belong to different service paths or the same service path
The text was updated successfully, but these errors were encountered:
AlvaroVega
changed the title
initial subscription in ngsiv2 is procesed as Bad HTTP notification
initial notification in ngsiv2 is procesed as Bad HTTP notification
May 20, 2021
When CB is notifying in ngsiv2 several entities in the same fiware-servicepath (like /)
i.e.:
time=2021-05-20T13:37:25.092Z | lvl=INFO | corr=83099026-b970-11eb-a32f-0242ac110011 | trans=d66f89f2-81b3-450b-8353-f6cc68bafbc5 | srv=smartcity | subsrv=/ | comp=cygnus-ngsi | op=getEvents | msg=com.telefonica.iot.cygnus.handlers.NGSIRestHandler[324] : [NGSIRestHandler] Received data ({"subscriptionId":"60a661256bbc23164e62d6fb","data":[{"id":"estacion1","type":"WeatherObserved","dateObserved":{"type":"DateTime","value":"2021-02-18T06:00:45.145Z","metadata":{}},"illuminance":{"type":"Number","value":3,"metadata":{}},"solarRadiation":{"type":"Number","value":2,"metadata":{}}},{"id":"WeatherObserved:disp1234bc","type":"WeatherObserved","TimeInstant":{"type":"DateTime","value":"2021-05-20T13:33:07.068Z","metadata":{}},"dateObserved":{"type":"DateTime","value":"2021-05-20T13:32:43.772Z","metadata":{}}}]})
time=2021-05-20T13:37:25.094Z | lvl=WARN | corr=83099026-b970-11eb-a32f-0242ac110011 | trans=d66f89f2-81b3-450b-8353-f6cc68bafbc5 | srv=smartcity | subsrv=/ | comp=cygnus-ngsi | op=getEvents | msg=com.telefonica.iot.cygnus.handlers.NGSIRestHandler[363] : [NGSIRestHandler] Bad HTTP notification ('fiware-servicepath' header value does not match the number of notified context responses
time=2021-05-20T13:37:25.102Z | lvl=WARN | corr=83099026-b970-11eb-a32f-0242ac110011 | trans=d66f89f2-81b3-450b-8353-f6cc68bafbc5 | srv=smartcity | subsrv=/ | comp=cygnus-ngsi | op=doPost | msg=org.apache.flume.source.http.HTTPSource$FlumeHTTPServlet[237] : Received bad request from client.
org.apache.flume.source.http.HTTPBadRequestException: 'fiware-servicepath' header value does not match the number of notified context responses
at com.telefonica.iot.cygnus.handlers.NGSIRestHandler.getEvents(NGSIRestHandler.java:366)
at org.apache.flume.source.http.HTTPSource$FlumeHTTPServlet.doPost(HTTPSource.java:235)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:841)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:535)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:190)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595)
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1253)
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564)
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1155)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
at org.eclipse.jetty.server.Server.handle(Server.java:564)
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:317)
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251)
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:279)
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:110)
at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:124)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:673)
at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:591)
at java.lang.Thread.run(Thread.java:748)
done in
fiware-cygnus/cygnus-ngsi/src/main/java/com/telefonica/iot/cygnus/handlers/NGSIRestHandler.java
Lines 361 to 369 in 3b93df3
According with NGSv2 spec:
https://fiware-orion.readthedocs.io/en/master/user/initial_notification/index.html
IMHO
which may belong to different service paths
or the same service pathThe text was updated successfully, but these errors were encountered: