1 | initial version |
I have created a Subscription at Orion Context Broker in order to send the data to Cygnus for persist the data in mongodb. When Orion receives and new event value send the notification to Cygnus and I get the following log info at console.
time=2017-08-31T10:10:56.130Z | lvl=INFO | corr=ad9caef6-8e34-11e7-885a-fa163e0d608a | trans=c08becae-0e14-4859-940c-32558dfec7f3 | srv=default | subsrv=/cygnusservicepath | comp=cygnusagent | op=getEvents | msg=com.telefonica.iot.cygnus.handlers.NGSIRestHandler[286] : [NGSIRestHandler] Starting internal transaction (c08becae-0e14-4859-940c-32558dfec7f3) time=2017-08-31T10:10:56.141Z | lvl=INFO | corr=ad9caef6-8e34-11e7-885a-fa163e0d608a | trans=c08becae-0e14-4859-940c-32558dfec7f3 | srv=default | subsrv=/cygnusservicepath | comp=cygnusagent | op=getEvents | msg=com.telefonica.iot.cygnus.handlers.NGSIRestHandler[304] : [NGSIRestHandler] Received data ({"subscriptionId":"xxxxxxxxx","data":[{"id":"id1","type":"type1,....) time=2017-08-31T10:10:56.239Z | lvl=WARN | corr=ad9caef6-8e34-11e7-885a-fa163e0d608a | trans=c08becae-0e14-4859-940c-32558dfec7f3 | srv=default | subsrv=/cygnusservicepath | comp=cygnusagent | op=getEvents | msg=com.telefonica.iot.cygnus.handlers.NGSIRestHandler[324] : [NGSIRestHandler] Bad HTTP notification ('fiware-servicepath' header value does not match the number of notified context responses time=2017-08-31T10:10:56.240Z | lvl=WARN | corr=ad9caef6-8e34-11e7-885a-fa163e0d608a | trans=c08becae-0e14-4859-940c-32558dfec7f3 | srv=default | subsrv=/cygnusservicepath | comp=cygnusagent | op=doPost | msg=org.apache.flume.source.http.HTTPSource$FlumeHTTPServlet[186] : 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:327) at org.apache.flume.source.http.HTTPSource$FlumeHTTPServlet.doPost(HTTPSource.java:184) at javax.servlet.http.HttpServlet.service(HttpServlet.java:725) at javax.servlet.http.HttpServlet.service(HttpServlet.java:814) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:401) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) at org.mortbay.jetty.Server.handle(Server.java:326) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542) at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:945) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:756) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404) at org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:228) at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
The header is sent from Orion Context Broker to Cygnus, show what can I do to solve the problem?
Maybe something is not properly configured?
cat /usr/cygnus/conf/agent_mongo.conf cygnusagent.sources = http-source cygnusagent.sinks = mongo-sink cygnusagent.channels = mongo-channel
cygnusagent.sources.http-source.channels = mongo-channel cygnusagent.sources.http-source.type = org.apache.flume.source.http.HTTPSource cygnusagent.sources.http-source.port = 5050 cygnusagent.sources.http-source.handler = com.telefonica.iot.cygnus.handlers.NGSIRestHandler cygnusagent.sources.http-source.handler.notificationtarget = /notify cygnusagent.sources.http-source.handler.defaultservice = default cygnusagent.sources.http-source.handler.defaultservicepath = /cygnusservicepath cygnusagent.sources.http-source.handler.eventsttl = 10 cygnusagent.sources.http-source.interceptors = ts gi cygnusagent.sources.http-source.interceptors.ts.type = timestamp cygnusagent.sources.http-source.interceptors.gi.type = com.telefonica.iot.cygnus.interceptors.NGSIGroupingInterceptor$Builder cygnusagent.sources.http-source.interceptors.gi.groupingrulesconffile = /usr/cygnus/conf/grouping_rules.conf
cygnusagent.channels.mongo-channel.type = memory cygnusagent.channels.mongo-channel.capacity = 1000 cygnusagent.channels.mongo-channel.transactionCapacity = 100
cygnusagent.sinks.mongo-sink.channel = mongo-channel cygnusagent.sinks.mongo-sink.type = com.telefonica.iot.cygnus.sinks.NGSIMongoSink
cygnusagent.sinks.mongo-sink.mongohosts=MONGODBIP:27017 cygnusagent.sinks.mongo-sink.mongousername= cygnusagent.sinks.mongo-sink.mongo_password=
Many thanks for your support
Best Regards
Nacho