Thanks Jose, And sorry for bothering you again. I created subscription using below JSON. Data reached to Cygnus but I am getting errors in logs (given below). What am I doing wrong? { "description": "Update controller ph1Vol", "subject": { "entities": [ { "idPattern": ".*", "type": "Controller" } ], "condition": { "attrs": [ "ph1Vol" ] } }, "notification": { "mqtt": { "url": "http://IPAddress:5050/notify" }, "http": { "url": "http://IPAddress:5050/notify" }, "attrs": [ "id", "type", "name", "ph1Vol", "current" ] }, "expires": "2020-04-05T14:00:00.00Z", "throttling": 5 } Logs time=2018-05-04T09:23:15.026Z | lvl=INFO | corr=N/A | trans=N/A | srv=N/A | subsrv=N/A | comp=cygnus-ngsi | op=getLogLevel | msg=com.telefonica.iot.cygnus.management.LogHandlers[1029] : Cygnus logging level successfully obtained time=2018-05-04T12:13:00.017Z | lvl=INFO | corr=7c9c0654-4f94-11e8-ab43-0242ac120004 | trans=0d2b65a1-0be4-4371-8d83-4426d281b83d | srv=smartcitytechm | subsrv=/smartcitytechmchandigarh | comp=cygnus-ngsi | op=getEvents | msg=com.telefonica.iot.cygnus.handlers.NGSIRestHandler[294] : [NGSIRestHandler] Starting internal transaction (0d2b65a1-0be4-4371-8d83-4426d281b83d) time=2018-05-04T12:13:00.024Z | lvl=INFO | corr=7c9c0654-4f94-11e8-ab43-0242ac120004 | trans=0d2b65a1-0be4-4371-8d83-4426d281b83d | srv=smartcitytechm | subsrv=/smartcitytechmchandigarh | comp=cygnus-ngsi | op=getEvents | msg=com.telefonica.iot.cygnus.handlers.NGSIRestHandler[312] : [NGSIRestHandler] Received data ({"subscriptionId":"5aec4e4b7ef878ae8ebac1d9","data":[{"id":"ctrl_chandigrah","type":"Controller","name":{"type":"Text","value":"Noida-SEZ Controller 2","metadata":{}},"ph1Vol":{"type":"Text","value":"228","metadata":{"TimeInstant":{"type":"ISO8601","value":"2018-05-04T12:02:46.398Z"}}}}]}) time=2018-05-04T12:13:00.122Z | lvl=WARN | corr=7c9c0654-4f94-11e8-ab43-0242ac120004 | trans=0d2b65a1-0be4-4371-8d83-4426d281b83d | srv=smartcitytechm | subsrv=/smartcitytechmchandigarh | comp=cygnus-ngsi | op=getEvents | msg=com.telefonica.iot.cygnus.handlers.NGSIRestHandler[332] : [NGSIRestHandler] Bad HTTP notification ('fiware-servicepath' header value does not match the number of notified context responses time=2018-05-04T12:13:00.123Z | lvl=WARN | corr=7c9c0654-4f94-11e8-ab43-0242ac120004 | trans=0d2b65a1-0be4-4371-8d83-4426d281b83d | srv=smartcitytechm | subsrv=/smartcitytechmchandigarh | comp=cygnus-ngsi | 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:335) 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) Regards, Krishan From: José Ignacio Carretero <joseignacio.carretero at fiware.org> Sent: Friday, May 4, 2018 3:16 PM To: Krishan Babbar <KB00449283 at TechMahindra.com>; fiware-tech-help at lists.fiware.org; herman.junge at telefonica.com; ivan.ariasleon at telefonica.com; german.torodelvalle at telefonica.com; francisco.romerobueno at telefonica.com; fermin.galanmarquez at telefonica.com; pablo.coellovillalba at telefonica.com Cc: Yugal Kishor Mullick <YM00106030 at TechMahindra.com> Subject: Re: Unable to run Cygnus with MySQL agent Databases will be created as data comes. Please, use your Orion CB to push some data into Cygnus (through subscriptions). Regards, José Ignacio El 04/05/18 a las 11:40, Krishan Babbar escribió: Thanks Jose, I ran following commands 1. docker run --name=mysqlser -d mysql/mysql-server 2. docker run -d --name cygnus-mysql1 --link mysqlser -p 8081:8081 -p 5050:5050 -e CYGNUS_MYSQL_HOST=172.17.0.2 -e CYGNUS_MYSQL_PORT=3306 -e CYGNUS_MYSQL_USER=root -e CYGNUS_MYSQL_PASS=<Root_Password> fiware/cygnus-ngsi I logged into MySQL Container but did not see any DB. I could see only following DBs. docker exec -it mysqlser mysql -u root -p mysql> show databases; +--------------------+ | Database | +--------------------+ | information_schema | | mysql | | performance_schema | | sys | +--------------------+ 4 rows in set (0.00 sec) What would be the expected behavior? How to cross check if MySQL Sink is working fine? Regards, Krishan From: José Ignacio Carretero <joseignacio.carretero at fiware.org><mailto:joseignacio.carretero at fiware.org> Sent: Friday, May 4, 2018 2:19 PM To: Krishan Babbar <KB00449283 at TechMahindra.com><mailto:KB00449283 at TechMahindra.com>; fiware-tech-help at lists.fiware.org<mailto:fiware-tech-help at lists.fiware.org>; herman.junge at telefonica.com<mailto:herman.junge at telefonica.com>; ivan.ariasleon at telefonica.com<mailto:ivan.ariasleon at telefonica.com>; german.torodelvalle at telefonica.com<mailto:german.torodelvalle at telefonica.com>; francisco.romerobueno at telefonica.com<mailto:francisco.romerobueno at telefonica.com>; fermin.galanmarquez at telefonica.com<mailto:fermin.galanmarquez at telefonica.com>; pablo.coellovillalba at telefonica.com<mailto:pablo.coellovillalba at telefonica.com> Cc: Yugal Kishor Mullick <YM00106030 at TechMahindra.com><mailto:YM00106030 at TechMahindra.com> Subject: Re: Unable to run Cygnus with MySQL agent I've answered the Stackoverflow question. Regards, José Ignacio El 03/05/18 a las 15:37, Krishan Babbar escribió: + pablo.coellovillalba at telefonica.com<mailto:pablo.coellovillalba at telefonica.com> + fermin.galanmarquez at telefonica.com<mailto:fermin.galanmarquez at telefonica.com> +francisco.romerobueno at telefonica.com<mailto:francisco.romerobueno at telefonica.com> + german.torodelvalle at telefonica.com<mailto:german.torodelvalle at telefonica.com> + ivan.ariasleon at telefonica.com<mailto:ivan.ariasleon at telefonica.com> Looking forward for your guidance. Asked the same question on https://ask.fiware.org/question/989/unable-to-run-cygnus-with-mysql-agent/ and https://stackoverflow.com/questions/50102920/unable-to-run-cygnus-with-mysql-agent also. Regards, Krishan From: Krishan Babbar Sent: Monday, April 30, 2018 7:59 PM To: fiware-tech-help at lists.fiware.org<mailto:fiware-tech-help at lists.fiware.org>; José Ignacio Carretero <joseignacio.carretero at fiware.org><mailto:joseignacio.carretero at fiware.org>; herman.junge at telefonica.com<mailto:herman.junge at telefonica.com> Cc: Yugal Kishor Mullick <YM00106030 at TechMahindra.com><mailto:YM00106030 at TechMahindra.com> Subject: Unable to run Cygnus with MySQL agent Hi All, I am trying to setup and understand Cygnus. But I am facing issue during installation. I followed below given steps. 1. Install Cygnus using Docker (docker run -d -p 5050:5050 -p 8081:8081 fiware/cygnus-common) 2. Executed version command (curl http://172.17.0.2:8081/v1/version) which gave following response a. {"success":"true","version":"1.8.0_SNAPSHOT.39b2aa4789c61fa92fe6edc905410f1ddeb33490"} 3. Login into Cygnus container using command docker exec -it <ContainerId> /bin/bash 4. Created new file named “agent_mysql.conf” in “/opt/apache-flume/conf/” folder. Please see attached file for configuration details. 5. Changed "cygnus-entrypoint.sh" file in / (root) folder and added following command by removing existing one. a. ${FLUME_HOME}/bin/cygnus-flume-ng agent --conf ${CYGNUS_CONF_PATH} -f ${CYGNUS_CONF_PATH}/agent_mysql.conf -n cygnus-ngsi -p ${CYGNUS_API_PORT} -Dflume.root.logger=${CYGNUS_LOG_LEVEL},${CYGNUS_LOG_APPENDER} -Dfile.encoding=UTF-8 6. Exited Docker container and came back to Ubuntu. 7. Stop and restart Docker container. 8. And I am getting following errors in logs Please check and let me know what am I doing wrong? Appreciate your help. n$AgentConfiguration[1016] : Processing:mysql-sink time=2018-04-30T14:24:00.807Z | lvl=INFO | corr=N/A | trans=N/A | srv=N/A | subsrv=N/A | comp=cygnus-ngsi | op=validateConfiguration | msg=org.apache.flume.conf.FlumeConfiguration[140] : Post-validation flume configuration contains configuration for agents: [cygnus-ngsi] time=2018-04-30T14:24:00.808Z | lvl=INFO | corr=N/A | trans=N/A | srv=N/A | subsrv=N/A | comp=cygnus-ngsi | op=loadChannels | msg=org.apache.flume.node.AbstractConfigurationProvider[150] : Creating channels time=2018-04-30T14:24:00.816Z | lvl=INFO | corr=N/A | trans=N/A | srv=N/A | subsrv=N/A | comp=cygnus-ngsi | op=create | msg=org.apache.flume.channel.DefaultChannelFactory[40] : Creating instance of channel mysql-channel type memory time=2018-04-30T14:24:00.825Z | lvl=INFO | corr=N/A | trans=N/A | srv=N/A | subsrv=N/A | comp=cygnus-ngsi | op=loadChannels | msg=org.apache.flume.node.AbstractConfigurationProvider[205] : Created channel mysql-channel time=2018-04-30T14:24:00.832Z | lvl=INFO | corr=N/A | trans=N/A | srv=N/A | subsrv=N/A | comp=cygnus-ngsi | op=create | msg=org.apache.flume.source.DefaultSourceFactory[39] : Creating instance of source http-source, type org.apache.flume.source.http.HTTPSource time=2018-04-30T14:24:00.836Z | lvl=ERROR | corr=N/A | trans=N/A | srv=N/A | subsrv=N/A | comp=cygnus-ngsi | op=configure | msg=org.apache.flume.source.http.HTTPSource[113] : Error while configuring HTTPSource. Exception follows. java.lang.ClassNotFoundException: com.telefonica.iot.cygnus.handlers.NGSIRestHandler at java.net.URLClassLoader.findClass(URLClassLoader.java:381) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:338) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:264) at org.apache.flume.source.http.HTTPSource.configure(HTTPSource.java:102) at org.apache.flume.conf.Configurables.configure(Configurables.java:41) at org.apache.flume.node.AbstractConfigurationProvider.loadSources(AbstractConfigurationProvider.java:331) at org.apache.flume.node.AbstractConfigurationProvider.getConfiguration(AbstractConfigurationProvider.java:102) at org.apache.flume.node.PollingPropertiesFileConfigurationProvider$FileWatcherRunnable.run(PollingPropertiesFileConfigurationProvider.java:140) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) time=2018-04-30T14:24:00.840Z | lvl=ERROR | corr=N/A | trans=N/A | srv=N/A | subsrv=N/A | comp=cygnus-ngsi | op=loadSources | msg=org.apache.flume.node.AbstractConfigurationProvider[366] : Source http-source has been removed due to an error during configuration java.lang.RuntimeException: java.lang.ClassNotFoundException: com.telefonica.iot.cygnus.handlers.NGSIRestHandler at com.google.common.base.Throwables.propagate(Throwables.java:156) at org.apache.flume.source.http.HTTPSource.configure(HTTPSource.java:114) at org.apache.flume.conf.Configurables.configure(Configurables.java:41) at org.apache.flume.node.AbstractConfigurationProvider.loadSources(AbstractConfigurationProvider.java:331) at org.apache.flume.node.AbstractConfigurationProvider.getConfiguration(AbstractConfigurationProvider.java:102) at org.apache.flume.node.PollingPropertiesFileConfigurationProvider$FileWatcherRunnable.run(PollingPropertiesFileConfigurationProvider.java:140) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) Caused by: java.lang.ClassNotFoundException: com.telefonica.iot.cygnus.handlers.NGSIRestHandler at java.net.URLClassLoader.findClass(URLClassLoader.java:381) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:338) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:264) at org.apache.flume.source.http.HTTPSource.configure(HTTPSource.java:102) ... 11 more time=2018-04-30T14:24:00.841Z | lvl=INFO | corr=N/A | trans=N/A | srv=N/A | subsrv=N/A | comp=cygnus-ngsi | op=create | msg=org.apache.flume.sink.DefaultSinkFactory[40] : Creating instance of sink: mysql-sink, type: com.telefonica.iot.cygnus.sinks.NGSIMySQLSink time=2018-04-30T14:24:00.842Z | lvl=ERROR | corr=N/A | trans=N/A | srv=N/A | subsrv=N/A | comp=cygnus-ngsi | op=run | msg=org.apache.flume.node.PollingPropertiesFileConfigurationProvider$FileWatcherRunnable[142] : Failed to load configuration data. Exception follows. org.apache.flume.FlumeException: Unable to load sink type: com.telefonica.iot.cygnus.sinks.NGSIMySQLSink, class: com.telefonica.iot.cygnus.sinks.NGSIMySQLSink at org.apache.flume.sink.DefaultSinkFactory.getClass(DefaultSinkFactory.java:69) at org.apache.flume.sink.DefaultSinkFactory.create(DefaultSinkFactory.java:41) at org.apache.flume.node.AbstractConfigurationProvider.loadSinks(AbstractConfigurationProvider.java:415) at org.apache.flume.node.AbstractConfigurationProvider.getConfiguration(AbstractConfigurationProvider.java:103) at org.apache.flume.node.PollingPropertiesFileConfigurationProvider$FileWatcherRunnable.run(PollingPropertiesFileConfigurationProvider.java:140) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) Caused by: java.lang.ClassNotFoundException: com.telefonica.iot.cygnus.sinks.NGSIMySQLSink at java.net.URLClassLoader.findClass(URLClassLoader.java:381) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:338) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:264) at org.apache.flume.sink.DefaultSinkFactory.getClass(DefaultSinkFactory.java:67) ... 11 more Thanks & Regards, Krishan Babbar Technical Architect IES Internet of Things | Tech Mahindra Rajiv Gandhi Chandigarh Technology Park, Plot No. 23, Phase 2, Kishangarh, Chandigarh 160101, INDIA • Office: +91 172 666 8400 Ext. 8352 | Mobile: +91 946 303 0996 ============================================================================================================================ Disclaimer: This message and the information contained herein is proprietary and confidential and subject to the Tech Mahindra policy statement, you may review the policy at http://www.techmahindra.com/Disclaimer.html externally http://tim.techmahindra.com/tim/disclaimer.html internally within TechMahindra. =========================================================================================================================== ============================================================================================================================ Disclaimer: This message and the information contained herein is proprietary and confidential and subject to the Tech Mahindra policy statement, you may review the policy at http://www.techmahindra.com/Disclaimer.html externally http://tim.techmahindra.com/tim/disclaimer.html internally within TechMahindra. ============================================================================================================================ -- −−− José Ignacio Carretero FIWARE Cloud and Platform Expert FIWARE Foundation [FIWARE Foundation] Franklinstrasse 13A 10587 Berlin email: joseignacio.carretero at fiware.org<mailto:joseignacio.carretero at fiware.org> www: http://fiware.org twitter: @jicarreterogu @FIWARE skype: jicarretero -- −−− José Ignacio Carretero FIWARE Cloud and Platform Expert FIWARE Foundation [FIWARE Foundation] Franklinstrasse 13A 10587 Berlin email: joseignacio.carretero at fiware.org<mailto:joseignacio.carretero at fiware.org> www: http://fiware.org twitter: @jicarreterogu @FIWARE skype: jicarretero -------------- next part -------------- An HTML attachment was scrubbed... URL: <https://lists.fiware.org/private/fiware-tech-help/attachments/20180504/127cfd41/attachment-0001.html> -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.png Type: image/png Size: 251283 bytes Desc: image001.png URL: <https://lists.fiware.org/private/fiware-tech-help/attachments/20180504/127cfd41/attachment-0001.png>
You can get more information about our cookies and privacy policies clicking on the following links: Privacy policy Cookies policy