I am not able to make Orion communicate with Cygnus? - fiware

I am trying cygnus subscribe to orion. It is giving success, however, but on updating value to orion there is no notificaton being sent to cygnus. Tell me how can I check notification being received to cygnus? Moreover, Is there any method to check successful connection between orion and cygnus.
Configuration and logs of ORION & CYGNUS are below:
POST METHOD on orion for creating:(VERSION - v1 )
{
"contextElements": [
{
"type": "Room",
"isPattern": "false",
"id": "Room1",
"attributes": [
{
"name": "temperature",
"type": "float",
"value": "39.5"
}
]
}
],
"updateAction": "UPDATE"
}
**SUBSCRIBING CYGNUS TO ORION ** is as follows:
{
"entities": [
{
"type": "Room",
"isPattern": "false",
"id": "Room1"
}
],
"attributes": [
"temperature"
],
"reference": "http://cygnus:5050",
"duration": "P1M",
"notifyConditions": [
{
"type": "ONCHANGE",
"condValues": [
"temperature"
]
}
],
"throttling": "PT60S"
}
My agent.conf file in Cygnus is this :
# ============================================
# # OrionCKANSink configuration
# # channel name from where to read notification events
cygnusagent.sinks.ckan-sink.channel = ckan-channel
#
# # sink class, must not be changed
cygnusagent.sinks.ckan-sink.type = com.telefonica.iot.cygnus.sinks.OrionCKANSink
#
# # true if the grouping feature is enabled for this sink, false otherwise
cygnusagent.sinks.ckan-sink.enable_grouping = false
#
# # true if lower case is wanted to forced in all the element names, false otherwise
cygnusagent.sinks.hdfs-sink.enable_lowercase = false
#
# # the CKAN API key to use
cygnusagent.sinks.ckan-sink.api_key = 1ae97e2f-1589-4bdf-8a3f-b3683fc66a5a
#
# # the FQDN/IP address for the CKAN API endpoint
cygnusagent.sinks.ckan-sink.ckan_host = demo.ckan.org
#
# # the port for the CKAN API endpoint
cygnusagent.sinks.ckan-sink.ckan_port = 5000
#
# # Orion URL used to compose the resource URL with the convenience operation URL to query it
cygnusagent.sinks.ckan-sink.orion_url = http://localhost:1026
# # how the attributes are stored, either per row either per column (row, column)
cygnusagent.sinks.ckan-sink.attr_persistence = column
#
# # enable SSL for secure Http transportation; 'true' or 'false'
cygnusagent.sinks.ckan-sink.ssl = false
#
# # number of notifications to be included within a processing batch
cygnusagent.sinks.ckan-sink.batch_size = 100
#
# # timeout for batch accumulation
cygnusagent.sinks.ckan-sink.batch_timeout = 60
#
# # number of retries upon persistence error
cygnusagent.sinks.ckan-sink.batch_ttl = 10
my Cygnus logs: CYGNUS VERSION - 1.7
/5/2018 3:37:07 PMtime=2018-06-05T10:07:07.572Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnus-ngsi | op=startAllComponents | msg=org.apache.flume.node.Application[145] : Starting Channel ckan-channel
6/5/2018 3:37:07 PMtime=2018-06-05T10:07:07.572Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnus-ngsi | op=startAllComponents | msg=org.apache.flume.node.Application[160] : Waiting for channel: ckan-channel to start. Sleeping for 500 ms
6/5/2018 3:37:08 PMtime=2018-06-05T10:07:08.139Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnus-ngsi | op=main | msg=com.telefonica.iot.cygnus.nodes.CygnusApplication[324] : Starting a Jetty server listening on 0.0.0.0:8081 (Management Interface)
6/5/2018 3:37:08 PMtime=2018-06-05T10:07:08.193Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnus-ngsi | op=register | msg=org.apache.flume.instrumentation.MonitoredCounterGroup[119] : Monitored counter group for type: CHANNEL, name: ckan-channel: Successfully registered new MBean.
6/5/2018 3:37:08 PMtime=2018-06-05T10:07:08.250Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnus-ngsi | op=start | msg=org.apache.flume.instrumentation.MonitoredCounterGroup[95] : Component type: CHANNEL, name: ckan-channel started
6/5/2018 3:37:08 PMtime=2018-06-05T10:07:08.251Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnus-ngsi | op=startAllComponents | msg=org.apache.flume.node.Application[173] : Starting Sink ckan-sink
6/5/2018 3:37:08 PMtime=2018-06-05T10:07:08.253Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnus-ngsi | op=startAllComponents | msg=org.apache.flume.node.Application[184] : Starting Source http-source
6/5/2018 3:37:08 PMtime=2018-06-05T10:07:08.392Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnus-ngsi | op=<init> | msg=com.telefonica.iot.cygnus.interceptors.CygnusGroupingRules[53] : Grouping rules read:
6/5/2018 3:37:08 PMtime=2018-06-05T10:07:08.561Z | lvl=WARN | corr= | trans= | srv= | subsrv= | comp=cygnus-ngsi | op=<init> | msg=com.telefonica.iot.cygnus.interceptors.CygnusGroupingRules[61] : Grouping rules syntax has errors. Details: null
6/5/2018 3:37:08 PMtime=2018-06-05T10:07:08.581Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnus-ngsi | op=<init> | msg=com.telefonica.iot.cygnus.interceptors.CygnusGroupingRules[53] : Grouping rules read:
6/5/2018 3:37:08 PMtime=2018-06-05T10:07:08.591Z | lvl=WARN | corr= | trans= | srv= | subsrv= | comp=cygnus-ngsi | op=<init> | msg=com.telefonica.iot.cygnus.interceptors.CygnusGroupingRules[61] : Grouping rules syntax has errors. Details: null
6/5/2018 3:37:09 PMtime=2018-06-05T10:07:09.917Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnus-ngsi | op=register | msg=org.apache.flume.instrumentation.MonitoredCounterGroup[119] : Monitored counter group for type: SOURCE, name: http-source: Successfully registered new MBean.
6/5/2018 3:37:09 PMtime=2018-06-05T10:07:09.917Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnus-ngsi | op=start | msg=org.apache.flume.instrumentation.MonitoredCounterGroup[95] : Component type: SOURCE, name: http-source started
6/5/2018 3:37:11 PMtime=2018-06-05T10:07:11.828Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnus-ngsi | op=<init> | msg=com.telefonica.iot.cygnus.backends.http.HttpClientFactory[81] : Setting max total connections (500)
6/5/2018 3:37:11 PMtime=2018-06-05T10:07:11.828Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnus-ngsi | op=<init> | msg=com.telefonica.iot.cygnus.backends.http.HttpClientFactory[82] : Setting default max connections per route (100)
6/5/2018 3:37:11 PMtime=2018-06-05T10:07:11.866Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnus-ngsi | op=<init> | msg=com.telefonica.iot.cygnus.backends.http.HttpClientFactory[81] : Setting max total connections (500)
6/5/2018 3:37:11 PMtime=2018-06-05T10:07:11.867Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnus-ngsi | op=<init> | msg=com.telefonica.iot.cygnus.backends.http.HttpClientFactory[82] : Setting default max connections per route (100)
6/5/2018 3:37:11 PMtime=2018-06-05T10:07:11.868Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnus-ngsi | op=start | msg=com.telefonica.iot.cygnus.sinks.NGSISink[354] : [ckan-sink] Startup completed
-------------------------------------------------------------
For the sake of testing purpose, I followed the below link
After,configuring a test agent on cygnus:
http://fiware-cygnus.readthedocs.io/en/1.2.2/cygnus-ngsi/quick_start_guide/index.html
/opt/fiware-cygnus/cygnus-ngsi/src/main/resources/cygnus-flume-ng agent --conf /opt/apache-flume/conf/ -f /opt/apache-flume/conf/agent_test.conf -n cygnusagent -Dflume.root.logger=INFO,console
Warning: JAVA_HOME is not set!
+ exec /usr/bin/java -Xmx20m -Dflume.root.logger=INFO,console -cp '/opt/apache-flume/conf:/opt/apache-flume/lib/*:/opt/apache-flume/plugins.d/cygnus/lib/*:/opt/apache-flume/plugins.d/cygnus/libext/*' -Djava.library.path= com.telefonica.iot.cygnus.nodes.CygnusApplication -f /opt/apache-flume/conf/agent_test.conf -n cygnusagent
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/opt/apache-flume/lib/slf4j-log4j12-1.6.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/opt/apache-flume/plugins.d/cygnus/lib/cygnus-ngsi-1.7.0-jar-with-dependencies.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/opt/apache-flume/plugins.d/cygnus/libext/cygnus-common-1.7.0-jar-with-dependencies.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
time=2018-05-05T08:21:21.573Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp= | op=main | msg=com.telefonica.iot.cygnus.nodes.CygnusApplication[189] : Starting Cygnus, version 1.7.0.9df0d4d857488c4dd72e9c5dfd2b5e41083b64b9
time=2018-05-05T08:21:21.792Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnusagent | op=main | msg=com.telefonica.iot.cygnus.nodes.CygnusApplication[312] : Waiting for valid Flume components references...
time=2018-05-05T08:21:21.793Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnusagent | op=start | msg=org.apache.flume.node.PollingPropertiesFileConfigurationProvider[61] : Configuration provider starting
time=2018-05-05T08:21:21.799Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnusagent | op=run | msg=org.apache.flume.node.PollingPropertiesFileConfigurationProvider$FileWatcherRunnable[133] : Reloading configuration file:/opt/apache-flume/conf/agent_test.conf
time=2018-05-05T08:21:21.823Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnusagent | op=addProperty | msg=org.apache.flume.conf.FlumeConfiguration$AgentConfiguration[1016] : Processing:test-sink
time=2018-05-05T08:21:21.824Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnusagent | op=addProperty | msg=org.apache.flume.conf.FlumeConfiguration$AgentConfiguration[1016] : Processing:test_sink
time=2018-05-05T08:21:21.824Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnusagent | op=addProperty | msg=org.apache.flume.conf.FlumeConfiguration$AgentConfiguration[1016] : Processing:test-sink
time=2018-05-05T08:21:21.824Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnusagent | op=addProperty | msg=org.apache.flume.conf.FlumeConfiguration$AgentConfiguration[1016] : Processing:test-sink
time=2018-05-05T08:21:21.824Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnusagent | op=addProperty | msg=org.apache.flume.conf.FlumeConfiguration$AgentConfiguration[930] : Added sinks: test-sink Agent: cygnusagent
time=2018-05-05T08:21:21.837Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnusagent | op=validateConfiguration | msg=org.apache.flume.conf.FlumeConfiguration[140] : Post-validation flume configuration contains configuration for agents: [cygnusagent]
time=2018-05-05T08:21:21.838Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnusagent | op=loadChannels | msg=org.apache.flume.node.AbstractConfigurationProvider[150] : Creating channels
time=2018-05-05T08:21:21.848Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnusagent | op=create | msg=org.apache.flume.channel.DefaultChannelFactory[40] : Creating instance of channel test-channel type memory
time=2018-05-05T08:21:21.854Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnusagent | op=loadChannels | msg=org.apache.flume.node.AbstractConfigurationProvider[205] : Created channel test-channel
time=2018-05-05T08:21:21.855Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnusagent | op=create | msg=org.apache.flume.source.DefaultSourceFactory[39] : Creating instance of source http-source, type org.apache.flume.source.http.HTTPSource
time=2018-05-05T08:21:21.926Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnusagent | op=configure | msg=com.telefonica.iot.cygnus.handlers.NGSIRestHandler[156] : [NGSIRestHandler] Startup completed
time=2018-05-05T08:21:21.939Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnusagent | op=create | msg=org.apache.flume.sink.DefaultSinkFactory[40] : Creating instance of sink: test-sink, type: com.telefonica.iot.cygnus.sinks.NGSITestSink
time=2018-05-05T08:21:21.948Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnusagent | op=getConfiguration | msg=org.apache.flume.node.AbstractConfigurationProvider[119] : Channel test-channel connected to [http-source, test-sink]
time=2018-05-05T08:21:21.962Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnusagent | op=startAllComponents | msg=org.apache.flume.node.Application[138] : Starting new configuration:{ sourceRunners:{http-source=EventDrivenSourceRunner: { source:org.apache.flume.source.http.HTTPSource{name:http-source,state:IDLE} }} sinkRunners:{test-sink=SinkRunner: { policy:org.apache.flume.sink.DefaultSinkProcessor#56bb46b7 counterGroup:{ name:null counters:{} } }} channels:{test-channel=org.apache.flume.channel.MemoryChannel{name: test-channel}} }
time=2018-05-05T08:21:21.962Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnusagent | op=startAllComponents | msg=org.apache.flume.node.Application[145] : Starting Channel test-channel
time=2018-05-05T08:21:21.962Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnusagent | op=startAllComponents | msg=org.apache.flume.node.Application[160] : Waiting for channel: test-channel to start. Sleeping for 500 ms
time=2018-05-05T08:21:22.010Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnusagent | op=register | msg=org.apache.flume.instrumentation.MonitoredCounterGroup[119] : Monitored counter group for type: CHANNEL, name: test-channel: Successfully registered new MBean.
time=2018-05-05T08:21:22.010Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnusagent | op=start | msg=org.apache.flume.instrumentation.MonitoredCounterGroup[95] : Component type: CHANNEL, name: test-channel started
time=2018-05-05T08:21:22.463Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnusagent | op=startAllComponents | msg=org.apache.flume.node.Application[173] : Starting Sink test-sink
time=2018-05-05T08:21:22.464Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnusagent | op=startAllComponents | msg=org.apache.flume.node.Application[184] : Starting Source http-source
time=2018-05-05T08:21:22.466Z | lvl=WARN | corr= | trans= | srv= | subsrv= | comp=cygnusagent | op=<init> | msg=com.telefonica.iot.cygnus.interceptors.CygnusGroupingRules[49] : No grouping rules have been read. Details: /Applications/apache-flume-1.4.0-bin/conf/grouping_rules.conf (No such file or directory)
time=2018-05-05T08:21:22.467Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnusagent | op=start | msg=com.telefonica.iot.cygnus.sinks.NGSISink[354] : [test-sink] Startup completed
time=2018-05-05T08:21:22.476Z | lvl=WARN | corr= | trans= | srv= | subsrv= | comp=cygnusagent | op=<init> | msg=com.telefonica.iot.cygnus.interceptors.CygnusGroupingRules[49] : No grouping rules have been read. Details: /Applications/apache-flume-1.4.0-bin/conf/grouping_rules.conf (No such file or directory)
time=2018-05-05T08:21:22.626Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnusagent | op=register | msg=org.apache.flume.instrumentation.MonitoredCounterGroup[119] : Monitored counter group for type: SOURCE, name: http-source: Successfully registered new MBean.
time=2018-05-05T08:21:22.627Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnusagent | op=start | msg=org.apache.flume.instrumentation.MonitoredCounterGroup[95] : Component type: SOURCE, name: http-source started
time=2018-05-05T08:21:22.794Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnusagent | op=main | msg=com.telefonica.iot.cygnus.nodes.CygnusApplication[324] : Starting a Jetty server listening on 0.0.0.0:8081 (Management Interface)
time=2018-05-05T08:21:52.477Z | lvl=WARN | corr= | trans= | srv= | subsrv= | comp=cygnusagent | op=<init> | msg=com.telefonica.iot.cygnus.interceptors.CygnusGroupingRules[49] : No grouping rules have been read. Details: /Applications/apache-flume-1.4.0-bin/conf/grouping_rules.conf (No such file or directory)
and now,if I execute this file notification.sh
URL=$1
curl $URL -v -s -S --header 'Content-Type: application/json' --header 'Accept: application/json' --header "Fiware-Service: qsg" --header "Fiware-ServicePath: testsink" -d #- <<EOF
{
"subscriptionId" : "51c0ac9ed714fb3b37d7d5a8",
"originator" : "localhost",
"contextResponses" : [
{
"contextElement" : {
"attributes" : [
{
"name" : "temperature",
"type" : "float",
"value" : "26.5"
}
],
"type" : "Room",
"isPattern" : "false",
"id" : "Room1"
},
"statusCode" : {
"code" : "200",
"reasonPhrase" : "OK"
}
}
]
}
EOF
I recieve a response :
* Connected to CYGNUS_IP (CYGNUS_IP) port 5053 (#0)
> POST /notify HTTP/1.1
> User-Agent: curl/7.29.0
> Host: CYGNUS_IP:5053
> Content-Type: application/json
> Accept: application/json
> Fiware-Service: qsg
> Fiware-ServicePath: testsink
> Content-Length: 615
>
* upload completely sent off: 615 out of 615 bytes
* Recv failure: Connection reset by peer
* Closing connection 0
curl: (56) Recv failure: Connection reset by peer

You can do the following to know if your subscription is being activated (thus, ensuring that Orion is sending notifications to Cygnus):
GET /v2/subscriptions if you don't know the id of the subscription. In this case, you will get the information for all subscriptions and you have to locate the one being used for Cygnus.
GET /v2/subscriptions/<subscriptionId if you know the subscription ID.
The following fields in the response could help (see NGSIv2 specification for details):
status: Either active (for active subscriptions) or inactive (for inactive subscriptions) [..] . Also, for subscriptions experiencing problems with notifications, the status is set to failed. As soon as the notifications start working again, the status is changed back to active.
timesSent (not editable, only present in GET operations): Number of notifications sent due to this subscription.
lastNotification (not editable, only present in GET operations): Last notification timestamp in ISO8601 format.
lastFailure (not editable, only present in GET operations): Last failure timestamp in ISO8601 format. Not present if subscription has never had a problem with notifications.
lastSuccess (not editable, only present in GET operations): Timestamp in ISO8601 format for last successful notification. Not present if subscription has never had a successful notification.
So, if everything goes ok timesSent should be incresing each update, status should not be failed and lastNotification should be equal to lastSuccess.

Related

Cygnus does not recognize my service-path

I have moved my Fiware structure to the Amazon EC2 service, the configuration of my agent is as follows:
cygnus-ngsi.sources = http-source
cygnus-ngsi.sinks = mongo-sink
cygnus-ngsi.channels = mongo-channel
cygnus-ngsi.sources.http-source.channels = mongo-channel
cygnus-ngsi.sources.http-source.type = org.apache.flume.source.http.HTTPSource
cygnus-ngsi.sources.http-source.port = 5050
cygnus-ngsi.sources.http-source.handler = com.telefonica.iot.cygnus.handlers.NGSIRestHandler
cygnus-ngsi.sources.http-source.handler.notification_target = /notify
cygnus-ngsi.sources.http-source.handler.default_service = default
cygnus-ngsi.sources.http-source.handler.default_service_path = /sevilla
cygnus-ngsi.sources.http-source.handler.events_ttl = 2
cygnus-ngsi.sources.http-source.interceptors = ts
cygnus-ngsi.sources.http-source.interceptors.ts.type = timestamp
cygnus-ngsi.sinks.mongo-sink.type = com.telefonica.iot.cygnus.sinks.NGSIMongoSink
cygnus-ngsi.sinks.mongo-sink.channel = mongo-channel
cygnus-ngsi.sinks.mongo-sink.enable_encoding = true
cygnus-ngsi.sinks.mongo-sink.enable_grouping = false
cygnus-ngsi.sinks.mongo-sink.enable_name_mappings = false
cygnus-ngsi.sinks.mongo-sink.enable_lowercase = false
cygnus-ngsi.sinks.mongo-sink.data_model = dm-by-service-path
cygnus-ngsi.sinks.mongo-sink.attr_persistence = column
cygnus-ngsi.sinks.mongo-sink.mongo_hosts = ******com:15959
cygnus-ngsi.sinks.mongo-sink.mongo_username = ********
cygnus-ngsi.sinks.mongo-sink.mongo_password = ********
cygnus-ngsi.sinks.mongo-sink.db_prefix = sth_
cygnus-ngsi.sinks.mongo-sink.collection_prefix = sth_
cygnus-ngsi.sinks.mongo-sink.batch_size = 1
cygnus-ngsi.sinks.mongo-sink.batch_timeout = 120
cygnus-ngsi.sinks.mongo-sink.batch_ttl = 10
cygnus-ngsi.sinks.mongo-sink.data_expiration = 0
cygnus-ngsi.sinks.mongo-sink.collections_size = 0
cygnus-ngsi.sinks.mongo-sink.max_documents = 0
cygnus-ngsi.sinks.mongo-sink.ignore_white_spaces = true
cygnus-ngsi.channels.mongo-channel.type = com.telefonica.iot.cygnus.channels.CygnusMemoryChannel
cygnus-ngsi.channels.mongo-channel.capacity = 15000
cygnus-ngsi.channels.mongo-channel.transactionCapacity = 11000
The problem is that when you send the data to MongoDB, it does not send them to the service-path that is configured in the agent, obtaining this response in cygnus.log
Database: sth_default, Collection: sth_x002f
srv = default | subsrv = /
What happens so that it does not recognize my service-path?
edit: I put my cygnus.log
time=2018-05-30T09:34:41.359Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnus-ngsi | op=addProperty | msg=org.apache.flume.conf.FlumeConfiguration$AgentConfiguration[1016] : Processing:mongo-sink
time=2018-05-30T09:34:41.359Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnus-ngsi | op=addProperty | msg=org.apache.flume.conf.FlumeConfiguration$AgentConfiguration[1016] : Processing:mongo-sink
time=2018-05-30T09:34:41.361Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnus-ngsi | op=addProperty | msg=org.apache.flume.conf.FlumeConfiguration$AgentConfiguration[1016] : Processing:mongo-sink
time=2018-05-30T09:34:41.361Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnus-ngsi | op=addProperty | msg=org.apache.flume.conf.FlumeConfiguration$AgentConfiguration[1016] : Processing:mongo-sink
time=2018-05-30T09:34:41.361Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnus-ngsi | op=addProperty | msg=org.apache.flume.conf.FlumeConfiguration$AgentConfiguration[1016] : Processing:mongo-sink
time=2018-05-30T09:34:41.361Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnus-ngsi | op=addProperty | msg=org.apache.flume.conf.FlumeConfiguration$AgentConfiguration[1016] : Processing:mongo-sink
time=2018-05-30T09:34:41.361Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnus-ngsi | op=addProperty | msg=org.apache.flume.conf.FlumeConfiguration$AgentConfiguration[1016] : Processing:mongo-sink
time=2018-05-30T09:34:41.362Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnus-ngsi | op=addProperty | msg=org.apache.flume.conf.FlumeConfiguration$AgentConfiguration[1016] : Processing:mongo-sink
time=2018-05-30T09:34:41.362Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnus-ngsi | op=addProperty | msg=org.apache.flume.conf.FlumeConfiguration$AgentConfiguration[930] : Added sinks: mongo-sink Agent: cygnus-ngsi
time=2018-05-30T09:34:41.362Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnus-ngsi | op=addProperty | msg=org.apache.flume.conf.FlumeConfiguration$AgentConfiguration[1016] : Processing:mongo-sink
time=2018-05-30T09:34:41.362Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnus-ngsi | op=addProperty | msg=org.apache.flume.conf.FlumeConfiguration$AgentConfiguration[1016] : Processing:mongo-sink
time=2018-05-30T09:34:41.372Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnus-ngsi | op=validateConfiguration | msg=org.apache.flume.conf.FlumeConfiguration[140] : Post-validation flume configuration contains configuration for agents: [cygnus-ngsi]
time=2018-05-30T09:34:41.372Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnus-ngsi | op=loadChannels | msg=org.apache.flume.node.AbstractConfigurationProvider[150] : Creating channels
time=2018-05-30T09:34:41.380Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnus-ngsi | op=create | msg=org.apache.flume.channel.DefaultChannelFactory[40] : Creating instance of channel mongo-channel type com.telefonica.iot.cygnus.channels.CygnusMemoryChannel
time=2018-05-30T09:34:41.384Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnus-ngsi | op=loadChannels | msg=org.apache.flume.node.AbstractConfigurationProvider[205] : Created channel mongo-channel
time=2018-05-30T09:34:41.385Z | lvl=INFO | corr= | trans= | srv= | subsrv= | 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-05-30T09:34:41.403Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnus-ngsi | op=configure | msg=com.telefonica.iot.cygnus.handlers.NGSIRestHandler[156] : [NGSIRestHandler] Startup completed
time=2018-05-30T09:34:41.413Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnus-ngsi | op=create | msg=org.apache.flume.sink.DefaultSinkFactory[40] : Creating instance of sink: mongo-sink, type: com.telefonica.iot.cygnus.sinks.NGSIMongoSink
time=2018-05-30T09:34:41.423Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnus-ngsi | op=getConfiguration | msg=org.apache.flume.node.AbstractConfigurationProvider[119] : Channel mongo-channel connected to [http-source, mongo-sink]
time=2018-05-30T09:34:41.427Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnus-ngsi | op=startAllComponents | msg=org.apache.flume.node.Application[138] : Starting new configuration:{ sourceRunners:{http-source=EventDrivenSourceRunner: { source:org.apache.flume.source.http.HTTPSource{name:http-source,state:IDLE} }} sinkRunners:{mongo-sink=SinkRunner: { policy:org.apache.flume.sink.DefaultSinkProcessor#46157e43 counterGroup:{ name:null counters:{} } }} channels:{mongo-channel=com.telefonica.iot.cygnus.channels.CygnusMemoryChannel{name: mongo-channel}} }
time=2018-05-30T09:34:41.427Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnus-ngsi | op=startAllComponents | msg=org.apache.flume.node.Application[145] : Starting Channel mongo-channel
time=2018-05-30T09:34:41.468Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnus-ngsi | op=register | msg=org.apache.flume.instrumentation.MonitoredCounterGroup[110] : Monitoried counter group for type: CHANNEL, name: mongo-channel, registered successfully.
time=2018-05-30T09:34:41.469Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnus-ngsi | op=start | msg=org.apache.flume.instrumentation.MonitoredCounterGroup[94] : Component type: CHANNEL, name: mongo-channel started
time=2018-05-30T09:34:41.469Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnus-ngsi | op=startAllComponents | msg=org.apache.flume.node.Application[173] : Starting Sink mongo-sink
time=2018-05-30T09:34:41.469Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnus-ngsi | op=startAllComponents | msg=org.apache.flume.node.Application[184] : Starting Source http-source
time=2018-05-30T09:34:41.472Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnus-ngsi | op=start | msg=com.telefonica.iot.cygnus.sinks.NGSISink[354] : [mongo-sink] Startup completed
time=2018-05-30T09:34:41.548Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnus-ngsi | op=register | msg=org.apache.flume.instrumentation.MonitoredCounterGroup[110] : Monitoried counter group for type: SOURCE, name: http-source, registered successfully.
time=2018-05-30T09:34:41.548Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnus-ngsi | op=start | msg=org.apache.flume.instrumentation.MonitoredCounterGroup[94] : Component type: SOURCE, name: http-source started
time=2018-05-30T09:34:42.348Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnus-ngsi | op=main | msg=com.telefonica.iot.cygnus.nodes.CygnusApplication[301] : Starting a Jetty server listening on 0.0.0.0:8081 (Management Interface)
time=2018-05-30T09:35:03.570Z | lvl=INFO | corr=bafb7ba2-63ec-11e8-8f79-0ac12ccf4042 | trans=9ce00f30-1053-44f8-ae38-ef27a7933b09 | srv=default | subsrv=/ | comp=cygnus-ngsi | op=getEvents | msg=com.telefonica.iot.cygnus.handlers.NGSIRestHandler[286] : [NGSIRestHandler] Starting internal transaction (9ce00f30-1053-44f8-ae38-ef27a7933b09)
time=2018-05-30T09:35:03.571Z | lvl=INFO | corr=bafb7ba2-63ec-11e8-8f79-0ac12ccf4042 | trans=9ce00f30-1053-44f8-ae38-ef27a7933b09 | srv=default | subsrv=/ | comp=cygnus-ngsi | op=getEvents | msg=com.telefonica.iot.cygnus.handlers.NGSIRestHandler[304] : [NGSIRestHandler] Received data ({"subscriptionId":"5b0e7024cbff54ce8948ebfa","originator":"localhost","contextResponses":[{"contextElement":{"type":"ExerciseAction","isPattern":"false","id":"7120","attributes":[{"name":"location","type":"geo:point","value":"38.3763726, -32.1864475","metadatas":[{"name":"crs","type":"Text","value":"WGS84"}]}]},"statusCode":{"code":"200","reasonPhrase":"OK"}}]})
time=2018-05-30T09:35:03.631Z | lvl=INFO | corr=bafb7ba2-63ec-11e8-8f79-0ac12ccf4042 | trans=9ce00f30-1053-44f8-ae38-ef27a7933b09 | srv=default | subsrv=/ | comp=cygnus-ngsi | op=persistAggregation | msg=com.telefonica.iot.cygnus.sinks.NGSIMongoSink[361] : [mongo-sink] Persisting data at NGSIMongoSink. Database: sth_default, Collection: sth_x002f, Data: [Document{{recvTime=Wed May 30 09:35:03 UTC 2018, entityId=7120, entityType=ExerciseAction, location=38.3763726, -32.1864475}}]
time=2018-05-30T09:35:04.394Z | lvl=INFO | corr=bafb7ba2-63ec-11e8-8f79-0ac12ccf4042 | trans=9ce00f30-1053-44f8-ae38-ef27a7933b09 | srv=default | subsrv=/ | comp=cygnus-ngsi | op=processNewBatches | msg=com.telefonica.iot.cygnus.sinks.NGSISink[553] : Finishing internal transaction (bafb7ba2-63ec-11e8-8f79-0ac12ccf4042)
edit2: cygnus subscription configuration
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "http://publicip:1026/v2/subscriptions");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($ch, CURLOPT_HEADER, FALSE);
curl_setopt($ch, CURLOPT_POST, TRUE);
curl_setopt($ch, CURLOPT_POSTFIELDS, "{
\"description\": \"One subscription to rule them all\",
\"subject\": {
\"entities\": [
{
\"idPattern\": \".*\",
\"type\": \"ExerciseAction\"
}
]
},
\"notification\": {
\"http\": {
\"url\": \"http://localhost:5050/notify\"
},
\"attrs\": [
\"id\",
\"startTime\",
\"name\",
\"agent\",
\"exerciseCourse\",
\"location\",
\"properties\",
\"distance\",
\"exerciseType\",
\"endTime\",
\"sportsTeam\"
],\"attrsFormat\":\"legacy\"
},
\"expires\": \"2020-04-05T14:00:00.00Z\"
}");
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
"Content-Type: application/json"));
$response = curl_exec($ch);
curl_close($ch);
var_dump($response);
?>
SOLUTION: Simply add the headers in this way for both subscriptions and to create an entity
$headers = array(
'Content-Type: application/json','Fiware-Service: default','Fiware-ServicePath: /mypath'
);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
For avoiding the override of the default values for Fiware-Service-Path and Fiware-Service configured in Cygnus, You have to include the Headers Fiware-Service-Path and Fiware-Service with their corresponding values in your subscription request.

Cygnus not correctly starting

Hello I followed the quickstart guide for cygnus(http://fiware-cygnus.readthedocs.io/en/1.2.2/cygnus-ngsi/quick_start_guide/) but I can't get it to work correctly.
After starting the service as the guide says I get following error:
+ exec /opt/jdk1.8.0_151//bin/java -Xmx20m -Dflume.root.logger=INFO,console -cp '/usr/cygnus/conf:/usr/cygnus/lib/*:/usr/cygnus/plugins.d/cygnus/lib/*:/usr/cygnus/plugins.d/cygnus/libext/*' -Djava.library.path= com.telefonica.iot.cygnus.nodes.CygnusApplication -f /usr/cygnus/conf/agent_test.conf -n cygnusagent
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/usr/cygnus/lib/slf4j-log4j12-1.6.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/usr/cygnus/plugins.d/cygnus/lib/cygnus-0.13.0-jar-with-dependencies.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
time=2018-03-01T14:21:45.346CET | lvl=INFO | trans= | srv= | subsrv= | function=main | comp=Cygnus | msg=com.telefonica.iot.cygnus.nodes.CygnusApplication[248] : Starting Cygnus application
time=2018-03-01T14:21:45.351CET | lvl=INFO | trans= | srv= | subsrv= | function=main | comp=Cygnus | msg=com.telefonica.iot.cygnus.nodes.CygnusApplication[254] : Waiting for valid Flume components references...
time=2018-03-01T14:21:45.352CET | lvl=INFO | trans= | srv= | subsrv= | function=start | comp=Cygnus | msg=org.apache.flume.node.PollingPropertiesFileConfigurationProvider[61] : Configuration provider starting
time=2018-03-01T14:21:45.356CET | lvl=INFO | trans= | srv= | subsrv= | function=run | comp=Cygnus | msg=org.apache.flume.node.PollingPropertiesFileConfigurationProvider$FileWatcherRunnable[133] : Reloading configuration file:/usr/cygnus/conf/agent_test.conf
time=2018-03-01T14:21:45.363CET | lvl=INFO | trans= | srv= | subsrv= | function=addProperty | comp=Cygnus | msg=org.apache.flume.conf.FlumeConfiguration$AgentConfiguration[1016] : Processing:test-sink
time=2018-03-01T14:21:45.363CET | lvl=INFO | trans= | srv= | subsrv= | function=addProperty | comp=Cygnus | msg=org.apache.flume.conf.FlumeConfiguration$AgentConfiguration[1016] : Processing:test_sink
time=2018-03-01T14:21:45.363CET | lvl=INFO | trans= | srv= | subsrv= | function=addProperty | comp=Cygnus | msg=org.apache.flume.conf.FlumeConfiguration$AgentConfiguration[1016] : Processing:test-sink
time=2018-03-01T14:21:45.363CET | lvl=INFO | trans= | srv= | subsrv= | function=addProperty | comp=Cygnus | msg=org.apache.flume.conf.FlumeConfiguration$AgentConfiguration[930] : Added sinks: test-sink Agent: cygnusagent
time=2018-03-01T14:21:45.363CET | lvl=INFO | trans= | srv= | subsrv= | function=addProperty | comp=Cygnus | msg=org.apache.flume.conf.FlumeConfiguration$AgentConfiguration[1016] : Processing:test-sink
time=2018-03-01T14:21:45.368CET | lvl=INFO | trans= | srv= | subsrv= | function=validateConfiguration | comp=Cygnus | msg=org.apache.flume.conf.FlumeConfiguration[140] : Post-validation flume configuration contains configuration for agents: [cygnusagent]
time=2018-03-01T14:21:45.368CET | lvl=INFO | trans= | srv= | subsrv= | function=loadChannels | comp=Cygnus | msg=org.apache.flume.node.AbstractConfigurationProvider[150] : Creating channels
time=2018-03-01T14:21:45.372CET | lvl=INFO | trans= | srv= | subsrv= | function=create | comp=Cygnus | msg=org.apache.flume.channel.DefaultChannelFactory[40] : Creating instance of channel test-channel type memory
time=2018-03-01T14:21:45.374CET | lvl=INFO | trans= | srv= | subsrv= | function=loadChannels | comp=Cygnus | msg=org.apache.flume.node.AbstractConfigurationProvider[205] : Created channel test-channel
time=2018-03-01T14:21:45.374CET | lvl=INFO | trans= | srv= | subsrv= | function=create | comp=Cygnus | msg=org.apache.flume.source.DefaultSourceFactory[39] : Creating instance of source http-source, type org.apache.flume.source.http.HTTPSource
time=2018-03-01T14:21:45.376CET | lvl=ERROR | trans= | srv= | subsrv= | function=configure | comp=Cygnus | 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:335)
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-03-01T14:21:45.378CET | lvl=ERROR | trans= | srv= | subsrv= | function=loadSources | comp=Cygnus | 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:335)
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-03-01T14:21:45.379CET | lvl=INFO | trans= | srv= | subsrv= | function=create | comp=Cygnus | msg=org.apache.flume.sink.DefaultSinkFactory[40] : Creating instance of sink: test-sink, type: com.telefonica.iot.cygnus.sinks.NGSITestSink
time=2018-03-01T14:21:45.380CET | lvl=ERROR | trans= | srv= | subsrv= | function=run | comp=Cygnus | 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.NGSITestSink, class: com.telefonica.iot.cygnus.sinks.NGSITestSink
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.NGSITestSink
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335)
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
time=2018-03-01T14:21:46.356CET | lvl=INFO | trans= | srv= | subsrv= | function=main | comp=Cygnus | msg=com.telefonica.iot.cygnus.nodes.CygnusApplication[254] : Waiting for valid Flume components references...
time=2018-03-01T14:21:47.367CET | lvl=INFO | trans= | srv= | subsrv= | function=main | comp=Cygnus | msg=com.telefonica.iot.cygnus.nodes.CygnusApplication[254] : Waiting for valid Flume components references...
time=2018-03-01T14:21:48.368CET | lvl=INFO | trans= | srv= | subsrv= | function=main | comp=Cygnus | msg=com.telefonica.iot.cygnus.nodes.CygnusApplication[254] : Waiting for valid Flume components references...
time=2018-03-01T14:21:49.371CET | lvl=INFO | trans= | srv= | subsrv= | function=main | comp=Cygnus | msg=com.telefonica.iot.cygnus.nodes.CygnusApplication[254] : Waiting for valid Flume components references...
time=2018-03-01T14:21:50.374CET | lvl=INFO | trans= | srv= | subsrv= | function=main | comp=Cygnus | msg=com.telefonica.iot.cygnus.nodes.CygnusApplication[254] : Waiting for valid Flume components references...
I have configured the log4j.properties conf file to point to a valid log directory which contains a cygnus.log file
Thanks for the help
The page you used to install cygnus belongs to an older version of Cygnus. Please, visit the latest version here: http://fiware-cygnus.readthedocs.io/en/latest/cygnus-ngsi/quick_start_guide/
The caveat here is that yum install cygnus will install a quite old version of cygnus. You should install yum install cygnus-ngsi instead which is a newer version.
However, I like better to follow the github page:
https://github.com/telefonicaid/fiware-cygnus/tree/master/cygnus-ngsi
and installing cygnus-ngsi and creating the configuration files /usr/cygnus/conf/agent_1.conf and /usr/cygnus/conf/cygnus_instance_1.conf as shown in github. Cygnus can then be started a service.
The notification.sh script in http://fiware-cygnus.readthedocs.io/en/latest/cygnus-ngsi/quick_start_guide/ is usefull and you can use it once cygnus is running.
./notification.sh http://localhost:5050/notify

Make Fiware-Cygnus storing to Apache-Phoenix database

I'm new to Cygnus and to Phoenix db. I want Cygnus to store data in an Apache Phoenix db, so I have to configure the Phoenix Sink to work with Cygnus.
I know that Cygnus is an extension of Apache Flume, so any Flume agent can work with it by default (theoretically). I configured my Flume agent agent_phoenix.conf file for Cygnus like this:
cygnus-ngsi.channels = memoryChannel
cygnus-ngsi.sinks = phoenix-sink
cygnus-ngsi.sources.http-source.type = org.apache.flume.source.http.HTTPSource
cygnus-ngsi.sources.http-source.channels = memoryChannel
cygnus-ngsi.sources.http-source.port = 5051
cygnus-ngsi.sources.http-source.handler = com.telefonica.iot.cygnus.handlers.NGSIRestHandler
cygnus-ngsi.sources.http-source.handler.notification_target = /notify
cygnus-ngsi.sources.http-source.handler.default_service = default
cygnus-ngsi.sources.http-source.handler.default_service_path = /
cygnus-ngsi.sources.http-source.interceptors = ts gi
cygnus-ngsi.sources.http-source.interceptors.ts.type = timestamp
cygnus-ngsi.sources.http-source.interceptors.gi.type = com.telefonica.iot.cygnus.interceptors.NGSIGroupingInterceptor$Builder
cygnus-ngsi.sources.http-source.interceptors.gi.grouping_rules_conf_file = /opt/apache-flume/conf/grouping_rules.conf
cygnus-ngsi.channels.memoryChannel.type=memory
cygnus-ngsi.channels.memoryChannel.transactionCapacity=100
cygnus-ngsi.channels.memoryChannel.byteCapacityBufferPercentage=20
cygnus-ngsi.sinks.phoenix-sink.type=org.apache.phoenix.flume.sink.PhoenixSink
cygnus-ngsi.sinks.phoenix-sink.channel=memoryChannel
cygnus-ngsi.sinks.phoenix-sink.batchSize=100
cygnus-ngsi.sinks.phoenix-sink.table=PROVA_PHOENIX
cygnus-ngsi.sinks.phoenix-sink.ddl=CREATETABLEIFNOTEXISTSPROVA_PHOENIX(uidVARCHARNOTNULL,f_hostVARCHARCONSTRAINTpkPRIMARYKEY(uid),colonnaProvaVARCHAR)
cygnus-ngsi.sinks.phoenix-sink.zookeeperQuorum=localhost
cygnus-ngsi.sinks.phoenix-sink.serializer=REGEX
cygnus-ngsi.sinks.phoenix-sink.serializer.rowkeyType=uuid
cygnus-ngsi.sinks.phoenix-sink.serializer.columns=colonnaProva
and launched it using this command on CentOS command line:
/usr/cygnus/bin/cygnus-flume-ng agent --conf /usr/cygnus/conf/ -f /usr/cygnus/conf/agent_phoenix.conf -n cygnus-ngsi -Dflume.root.logger=INFO,console
It starts doing some initializations but then I get this message:
76666 [lifecycleSupervisor-1-8] ERROR org.apache.phoenix.flume.serializer.BaseEventSerializer - error No suitable driver found for jdbc:phoenix:localhost; occurred during initializing connection
176667 [lifecycleSupervisor-1-8] ERROR org.apache.phoenix.flume.sink.PhoenixSink - Error No suitable driver found for jdbc:phoenix:localhost; in initializing the serializer.
176667 [lifecycleSupervisor-1-8] ERROR org.apache.flume.lifecycle.LifecycleSupervisor - Unable to start SinkRunner: { policy:org.apache.flume.sink.DefaultSinkProcessor#29918f3 counterGroup:{ name:null counters:{} } } - Exception follows.
java.lang.RuntimeException: java.sql.SQLException: No suitable driver found for jdbc:phoenix:localhost;
at com.google.common.base.Throwables.propagate(Throwables.java:156)
at org.apache.phoenix.flume.sink.PhoenixSink.start(PhoenixSink.java:124)
at org.apache.flume.sink.DefaultSinkProcessor.start(DefaultSinkProcessor.java:46)
at org.apache.flume.SinkRunner.start(SinkRunner.java:79)
at org.apache.flume.lifecycle.LifecycleSupervisor$MonitorRunnable.run(LifecycleSupervisor.java:251)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:473)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:304)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.sql.SQLException: No suitable driver found for jdbc:phoenix:localhost;
at java.sql.DriverManager.getConnection(DriverManager.java:596)
at java.sql.DriverManager.getConnection(DriverManager.java:187)
at org.apache.phoenix.flume.serializer.BaseEventSerializer.initialize(BaseEventSerializer.java:140)
at org.apache.phoenix.flume.sink.PhoenixSink.start(PhoenixSink.java:119)
... 10 more
HBase and Phoenix are installed correctly on this machine, infact HBase can start and Phoenix has been tested with SQLline file.
Do you have any solutions to this problem?
----EDIT----
I just made a step forward. I edited my flume-env.sh file inside cygnus/conf directory, and specified as FLUME_CLASSPATH the .jar file containing PhoenixSink java class. Now launching the same command that I wrote above it starts configuring (apparently well) then I get this error msg:
time=2017-10-30T22:27:40.552Z | lvl=ERROR | corr= | trans= | srv= | subsrv= | 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: org.apache.phoenix.flume.sink.PhoenixSink, class: org.apache.phoenix.flume.sink.PhoenixSink
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:473)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:304)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.ClassNotFoundException: org.apache.phoenix.flume.sink.PhoenixSink
at java.net.URLClassLoader$1.run(URLClassLoader.java:359)
at java.net.URLClassLoader$1.run(URLClassLoader.java:348)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:347)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:312)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:195)
at org.apache.flume.sink.DefaultSinkFactory.getClass(DefaultSinkFactory.java:67)
... 11 more
What is wrong now?
-------------EDIT 2-------------------
Ok I'm gettint closer, but this error has no sense. I solved the jdbc problem by copying the right phoenix JAR in classpath, then I got some dependecies errors and I solved them by copying other JARs in classpath. Now I get the same old error of jdbc. I really can't figure out what is happening:
[root#fiware fiware]# /usr/cygnus/bin/cygnus-flume-ng agent --conf /usr/cygnus/conf/ -f /usr/cygnus/conf/agent_phoenix.conf -n cygnus-ngsi -Dflume.root.logger=INFO,console
Info: Sourcing environment configuration script /usr/cygnus/conf/flume-env.sh
+ exec /usr/lib/jvm/java-1.7.0-openjdk.x86_64/bin/java -Xms512m -Xmx1g -Dcom.sun.management.jmxremote -Dflume.root.logger=INFO,console -cp '/usr/cygnus/conf:/usr/cygnus/lib/*:/usr/cygnus/plugins.d/phoenix-sink/:/usr/cygnus/plugins.d/phoenix-sink/lib/*:/usr/cygnus/plugins.d/phoenix-sink/libext/*' -Djava.library.path= com.telefonica.iot.cygnus.nodes.CygnusApplication -f /usr/cygnus/conf/agent_phoenix.conf -n cygnus-ngsi
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/usr/cygnus/lib/slf4j-log4j12-1.6.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/usr/cygnus/plugins.d/phoenix-sink/lib/cygnus-ngsi-1.7.1-jar-with-dependencies.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
time=2017-10-31T06:59:24.751Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp= | op=main | msg=com.telefonica.iot.cygnus.nodes.CygnusApplication[166] : Starting Cygnus, version 1.7.1.UNKNOWN
time=2017-10-31T06:59:24.897Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnus-ngsi | op=main | msg=com.telefonica.iot.cygnus.nodes.CygnusApplication[289] : Waiting for valid Flume components references...
time=2017-10-31T06:59:24.900Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnus-ngsi | op=start | msg=org.apache.flume.node.PollingPropertiesFileConfigurationProvider[61] : Configuration provider starting
time=2017-10-31T06:59:24.909Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnus-ngsi | op=run | msg=org.apache.flume.node.PollingPropertiesFileConfigurationProvider$FileWatcherRunnable[133] : Reloading configuration file:/usr/cygnus/conf/agent_phoenix.conf
time=2017-10-31T06:59:24.915Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnus-ngsi | op=addProperty | msg=org.apache.flume.conf.FlumeConfiguration$AgentConfiguration[1016] : Processing:phoenix-sink
time=2017-10-31T06:59:24.915Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnus-ngsi | op=addProperty | msg=org.apache.flume.conf.FlumeConfiguration$AgentConfiguration[1016] : Processing:phoenix-sink
time=2017-10-31T06:59:24.916Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnus-ngsi | op=addProperty | msg=org.apache.flume.conf.FlumeConfiguration$AgentConfiguration[1016] : Processing:phoenix-sink
time=2017-10-31T06:59:24.916Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnus-ngsi | op=addProperty | msg=org.apache.flume.conf.FlumeConfiguration$AgentConfiguration[1016] : Processing:phoenix-sink
time=2017-10-31T06:59:24.916Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnus-ngsi | op=addProperty | msg=org.apache.flume.conf.FlumeConfiguration$AgentConfiguration[1016] : Processing:phoenix-sink
time=2017-10-31T06:59:24.916Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnus-ngsi | op=addProperty | msg=org.apache.flume.conf.FlumeConfiguration$AgentConfiguration[1016] : Processing:phoenix-sink
time=2017-10-31T06:59:24.916Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnus-ngsi | op=addProperty | msg=org.apache.flume.conf.FlumeConfiguration$AgentConfiguration[1016] : Processing:phoenix-sink
time=2017-10-31T06:59:24.917Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnus-ngsi | op=addProperty | msg=org.apache.flume.conf.FlumeConfiguration$AgentConfiguration[1016] : Processing:phoenix-sink
time=2017-10-31T06:59:24.917Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnus-ngsi | op=addProperty | msg=org.apache.flume.conf.FlumeConfiguration$AgentConfiguration[1016] : Processing:phoenix-sink
time=2017-10-31T06:59:24.917Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnus-ngsi | op=addProperty | msg=org.apache.flume.conf.FlumeConfiguration$AgentConfiguration[930] : Added sinks: phoenix-sink Agent: cygnus-ngsi
time=2017-10-31T06:59:24.917Z | lvl=WARN | corr= | trans= | srv= | subsrv= | comp=cygnus-ngsi | op=isValid | msg=org.apache.flume.conf.FlumeConfiguration$AgentConfiguration[319] : Agent configuration for 'c' does not contain any channels. Marking it as invalid.
time=2017-10-31T06:59:24.919Z | lvl=WARN | corr= | trans= | srv= | subsrv= | comp=cygnus-ngsi | op=validateConfiguration | msg=org.apache.flume.conf.FlumeConfiguration[127] : Agent configuration invalid for agent 'c'. It will be removed.
time=2017-10-31T06:59:24.934Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnus-ngsi | op=validateConfiguration | msg=org.apache.flume.conf.FlumeConfiguration[140] : Post-validation flume configuration contains configuration for agents: [cygnus-ngsi]
time=2017-10-31T06:59:24.934Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnus-ngsi | op=loadChannels | msg=org.apache.flume.node.AbstractConfigurationProvider[150] : Creating channels
time=2017-10-31T06:59:24.944Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnus-ngsi | op=create | msg=org.apache.flume.channel.DefaultChannelFactory[40] : Creating instance of channel memoryChannel type com.telefonica.iot.cygnus.channels.CygnusMemoryChannel
time=2017-10-31T06:59:24.949Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnus-ngsi | op=loadChannels | msg=org.apache.flume.node.AbstractConfigurationProvider[205] : Created channel memoryChannel
time=2017-10-31T06:59:24.951Z | lvl=INFO | corr= | trans= | srv= | subsrv= | 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=2017-10-31T06:59:24.979Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnus-ngsi | op=configure | msg=com.telefonica.iot.cygnus.handlers.NGSIRestHandler[156] : [NGSIRestHandler] Startup completed
time=2017-10-31T06:59:24.994Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnus-ngsi | op=create | msg=org.apache.flume.sink.DefaultSinkFactory[40] : Creating instance of sink: phoenix-sink, type: org.apache.phoenix.flume.sink.PhoenixSink
time=2017-10-31T06:59:25.247Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnus-ngsi | op=getConfiguration | msg=org.apache.flume.node.AbstractConfigurationProvider[119] : Channel memoryChannel connected to [http-source, phoenix-sink]
time=2017-10-31T06:59:25.255Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnus-ngsi | op=startAllComponents | msg=org.apache.flume.node.Application[138] : Starting new configuration:{ sourceRunners:{http-source=EventDrivenSourceRunner: { source:org.apache.flume.source.http.HTTPSource{name:http-source,state:IDLE} }} sinkRunners:{phoenix-sink=SinkRunner: { policy:org.apache.flume.sink.DefaultSinkProcessor#6be236d0 counterGroup:{ name:null counters:{} } }} channels:{memoryChannel=com.telefonica.iot.cygnus.channels.CygnusMemoryChannel{name: memoryChannel}} }
time=2017-10-31T06:59:25.256Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnus-ngsi | op=startAllComponents | msg=org.apache.flume.node.Application[145] : Starting Channel memoryChannel
time=2017-10-31T06:59:25.258Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnus-ngsi | op=register | msg=org.apache.flume.instrumentation.MonitoredCounterGroup[110] : Monitoried counter group for type: CHANNEL, name: memoryChannel, registered successfully.
time=2017-10-31T06:59:25.259Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnus-ngsi | op=start | msg=org.apache.flume.instrumentation.MonitoredCounterGroup[94] : Component type: CHANNEL, name: memoryChannel started
time=2017-10-31T06:59:25.259Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnus-ngsi | op=startAllComponents | msg=org.apache.flume.node.Application[173] : Starting Sink phoenix-sink
time=2017-10-31T06:59:25.261Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnus-ngsi | op=start | msg=org.apache.phoenix.flume.sink.PhoenixSink[116] : Starting sink Phoenix Sink__1
time=2017-10-31T06:59:25.268Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnus-ngsi | op=register | msg=org.apache.flume.instrumentation.MonitoredCounterGroup[110] : Monitoried counter group for type: SINK, name: Phoenix Sink__1, registered successfully.
time=2017-10-31T06:59:25.268Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnus-ngsi | op=startAllComponents | msg=org.apache.flume.node.Application[184] : Starting Source http-source
time=2017-10-31T06:59:25.268Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnus-ngsi | op=start | msg=org.apache.flume.instrumentation.MonitoredCounterGroup[94] : Component type: SINK, name: Phoenix Sink__1 started
time=2017-10-31T06:59:25.273Z | lvl=WARN | corr= | trans= | srv= | subsrv= | comp=cygnus-ngsi | op=<init> | msg=com.telefonica.iot.cygnus.interceptors.CygnusGroupingRules[49] : No grouping rules have been read. Details: /opt/apache-flume/conf/grouping_rules.conf (No such file or directory)
time=2017-10-31T06:59:25.287Z | lvl=WARN | corr= | trans= | srv= | subsrv= | comp=cygnus-ngsi | op=<init> | msg=com.telefonica.iot.cygnus.interceptors.CygnusGroupingRules[49] : No grouping rules have been read. Details: /opt/apache-flume/conf/grouping_rules.conf (No such file or directory)
time=2017-10-31T06:59:25.412Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnus-ngsi | op=register | msg=org.apache.flume.instrumentation.MonitoredCounterGroup[110] : Monitoried counter group for type: SOURCE, name: http-source, registered successfully.
time=2017-10-31T06:59:25.412Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnus-ngsi | op=start | msg=org.apache.flume.instrumentation.MonitoredCounterGroup[94] : Component type: SOURCE, name: http-source started
time=2017-10-31T06:59:25.460Z | lvl=ERROR | corr= | trans= | srv= | subsrv= | comp=cygnus-ngsi | op=initialize | msg=org.apache.phoenix.flume.serializer.BaseEventSerializer[200] : error No suitable driver found for jdbc:phoenix:localhost; occurred during initializing connection
time=2017-10-31T06:59:25.460Z | lvl=ERROR | corr= | trans= | srv= | subsrv= | comp=cygnus-ngsi | op=start | msg=org.apache.phoenix.flume.sink.PhoenixSink[123] : Error No suitable driver found for jdbc:phoenix:localhost; in initializing the serializer.
time=2017-10-31T06:59:25.462Z | lvl=ERROR | corr= | trans= | srv= | subsrv= | comp=cygnus-ngsi | op=run | msg=org.apache.flume.lifecycle.LifecycleSupervisor$MonitorRunnable[253] : Unable to start SinkRunner: { policy:org.apache.flume.sink.DefaultSinkProcessor#6be236d0 counterGroup:{ name:null counters:{} } } - Exception follows.
java.lang.RuntimeException: java.sql.SQLException: No suitable driver found for jdbc:phoenix:localhost;
at com.google.common.base.Throwables.propagate(Throwables.java:156)
at org.apache.phoenix.flume.sink.PhoenixSink.start(PhoenixSink.java:124)
at org.apache.flume.sink.DefaultSinkProcessor.start(DefaultSinkProcessor.java:46)
at org.apache.flume.SinkRunner.start(SinkRunner.java:79)
at org.apache.flume.lifecycle.LifecycleSupervisor$MonitorRunnable.run(LifecycleSupervisor.java:251)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:473)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:304)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.sql.SQLException: No suitable driver found for jdbc:phoenix:localhost;
at java.sql.DriverManager.getConnection(DriverManager.java:596)
at java.sql.DriverManager.getConnection(DriverManager.java:187)
at org.apache.phoenix.flume.serializer.BaseEventSerializer.initialize(BaseEventSerializer.java:140)
at org.apache.phoenix.flume.sink.PhoenixSink.start(PhoenixSink.java:119)
... 10 more
May someone explain this?

Fiware cygnus build failure

I wanted to use Fiware cygnus to persist data from the context broker into a CKAN instance. I've already created an orion context broker vm which is orion-psb-image-R5.4 version 1.7.0 and a ckan VM on Fiware cloud. I began to install fiware cygnus knowing that the cygnus is based on both cygnus-common and cygnus-ngsi . So, i started by downloading the fiware-cygnus https://github.com/telefonicaid/fiware-cygnus
, then i began building cygnus-common successfully using maven 3.2.5 . But when i started to build cygnus-ngsi it failed although i've tried many ways to solve this but Noone worked .
Here's what i have done in details .
Firstly installing Apache Flume as described here http://fiware-cygnus.readthedocs.io/en/1.3.0/cygnus-common/installation_and_administration_guide/install_from_sources/index.html
$ wget http://www.eu.apache.org/dist/flume/1.4.0/apache-flume-1.4.0-bin.tar.gz
tar xvzf apache-flume-1.4.0-bin.tar.gz
$ mv apache-flume-1.4.0-bin APACHE_FLUME_HOME
$ mv APACHE_FLUME_HOME/lib/httpclient-4.2.1.jar APACHE_FLUME_HOME/lib/httpclient-4.2.1.jar.old
$ mv APACHE_FLUME_HOME/lib/httpcore-4.2.1.jar APACHE_FLUME_HOME/lib/httpcore-4.2.1.jar.old
$ mv APACHE_FLUME_HOME/lib/libthrift-0.7.0.jar APACHE_FLUME_HOME/lib/libthrift-0.7.0.jar.old
$ mkdir -p APACHE_FLUME_HOME/plugins.d/cygnus/
$ mkdir APACHE_FLUME_HOME/plugins.d/cygnus/lib
$ mkdir APACHE_FLUME_HOME/plugins.d/cygnus/libext
secondly , downloading fiware-cygnus and building cygnus-common:
git clone https://github.com/telefonicaid/fiware-cygnus.git
cd fiware-cygnus/cygnus-common
mvn clean compile exec:exec assembly:single
cp target/cygnus-common-1.7.0-jar-with-dependencies.jar /usr/cygnus/plugins.d/cygnus/libext
mvn install:install-file -Dfile=/usr/cygnus/plugins.d/cygnus/libext/cygnus-common-1.7.0_SNAPSHOT-jar-with-dependencies.jar -DgroupId=com.telefonica.iot -DartifactId=cygnus-common -Dversion=1.7.0 -Dpackaging=jar -DgeneratePom=false
cp target/classes/cygnus-flume-ng /usr/cygnus/bin/cygnus-flume-ng
then i started bulding cygnus-ngsi as follows
cd cygnus-ngsi
mvn clean compile exec:exec assembly:single
and i got these results on building it:
[INFO] Building cygnus-ngsi 1.7.0_SNAPSHOT
[INFO] ------------------------------------------------------------------------
[WARNING] The POM for com.telefonica.iot:cygnus-common:jar:1.7.0_SNAPSHOT is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.243 s
[INFO] Finished at: 2017-04-17T22:04:25+00:00
[INFO] Final Memory: 7M/28M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project cygnus-ngsi: Could not resolve dependencies for project com.telefonica.iot:cygnus-ngsi:jar:1.7.0_SNAPSHOT: Could not find artifact com.telefonica.iot:cygnus-common:jar:1.7.0_SNAPSHOT -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
I copied the generated jar file to the /usr/cygnus/plugins.d/cygnus/libext as explained in the same link above by running:
cp cygnus-common/target/cygnus-common-1.7.0_SNAPSHOT-jar-with-dependencies.jar /usr/cygnus/plugins.d/cygnus/libext
also i have copied the jar file to maven repository path to make sure everything is set properly by running the command
cp cygnus-common/target/cygnus-common-1.7.0_SNAPSHOT-jar-with-dependencies.jar ~/.m2/repository/com/telefonica/iot/cygnus-common/1.7.0
Now i have in the ~/.m2/repository/com/telefonica/iot/cygnus-common/1.7.0 directory two jars, the cygnus-common-1.7.0_SNAPSHOT-jar-with-dependencies.jar and cygnus-common-1.7.0.jar as well as the usr/cygnus/plugins.d/cygnus/libext directory containing them and actually i don't know whether the existence of two jars inside either of these directories would make a problem or not.
i also thought that the cygnus-ngsi pom.xml file could be a part of the problem .. and here's the pom.xml of cygnus-ngsi:
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.telefonica.iot</groupId>
<artifactId>cygnus-ngsi</artifactId>
<version>1.7.0_SNAPSHOT</version>
<packaging>jar</packaging>
<name>cygnus-ngsi</name>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<!-- Required for testing -->
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
<version>1.9.5</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency>
<!-- Required by NGSIRestHandler -->
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpcore</artifactId>
<version>4.3.1</version>
</dependency>
<!-- Required for logging -->
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.17</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>1.7.21</version>
</dependency>
<!-- Required by NameMapper -->
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.4</version>
</dependency>
<!-- Required by any agent -->
<dependency>
<groupId>com.telefonica.iot</groupId>
<artifactId>cygnus-common</artifactId>
<version>1.7.0_SNAPSHOT</version>
</dependency>
</dependencies>
<build>
<!-- reference: http://stackoverflow.com/questions/3697449/retrieve-version-from-maven-pom-xml-in-code -->
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
<pluginManagement>
<plugins>
<!-- Explicit Java version declaration in needed in some systems in which Maven seems not -->
<!-- being able to find itself the right version. Many systems don't need this declaration -->
<!-- but it doesn't use to hurt anyway -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.5.1</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
<compilerArgument></compilerArgument>
<fork>true</fork>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.6</version>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
</plugin>
<!-- http://www.chrissearle.org/2009/09/05/Using_maven-exec-plugin_to_store_the_current_git_sha_in_a_build/ -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.5.0</version>
<executions>
<execution>
<phase>compile</phase>
<goals>
<goal>exec</goal>
</goals>
</execution>
</executions>
<configuration>
<executable>git</executable>
<arguments>
<argument>rev-parse</argument>
<argument>HEAD</argument>
</arguments>
<outputFile>target/classes/last_git_commit.txt</outputFile>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>3.5.1</version>
<configuration>
<reportPlugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>cobertura-maven-plugin</artifactId>
<version>2.6</version>
<configuration>
<aggregate>true</aggregate>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-report-plugin</artifactId>
<version>2.16</version>
<configuration>
<aggregate>true</aggregate>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>2.12</version>
<configuration>
<configLocation>telefonica_checkstyle.xml</configLocation>
<includeTestSourceDirectory>false</includeTestSourceDirectory>
<failOnViolation>false</failOnViolation>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.9</version>
<configuration>
<aggregate>true</aggregate>
</configuration>
</plugin>
</reportPlugins>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>
Now i want to know what may cause this failure . All i want to do is to set a cygnus agent to use the ckansink by configuring the agent_.conf file with providing the necessary ckan parameters and then start the cygnus. and i know that this process wouldn't be completed unless the cygnus-ngsi was built successfuly
EDIT : Now, i tried removing all previous cygnus files by running
sudo rpm -e -vv --allmatches --nodeps --noscripts --notriggers cygnus
sudo rpm -e -vv --allmatches --nodeps --noscripts --notriggers cygnus-ngsi
And then i installed the cygnus-common and cygnus-ngsi 1.7.0 using the rpm
and they were succesfully installed. then i configured the necessary ckan parameters in the /usr/cygnus/conf/agent_1.conf file.
The problem now is when i start the cygnus by running
/usr/cygnus/bin/cygnus-flume-ng agent --conf /usr/cygnus/conf/ -f /usr/cygnus/conf/agent_1.conf -n cygnusagent -Dflume.root.logger=INFO,console
i get these logs ending only with the jetty server listening on 8081 as follows:
Info: Sourcing environment configuration script /usr/cygnus/conf/flume-env.sh
+ exec /usr/lib/jvm/java-1.7.0-openjdk.x86_64/bin/java -Xmx20m -Dflume.root.logger=INFO,console -cp '/usr/cygnus/conf:/usr/cygnus/lib/*:/usr/cygnus/plugins.d/cygnus/lib/*:/usr/cygnus/plugins.d/cygnus/libext/*' -Djava.library.path= com.telefonica.iot.cygnus.nodes.CygnusApplication -f /usr/cygnus/conf/agent_1.conf -n cygnusagent
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/usr/cygnus/lib/slf4j-log4j12-1.6.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/usr/cygnus/plugins.d/cygnus/lib/cygnus-ngsi-1.7.0-jar-with-dependencies.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/usr/cygnus/plugins.d/cygnus/libext/cygnus-common-1.7.0-jar-with-dependencies.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
time=2017-04-18T16:34:31.961Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp= | op=main | msg=com.telefonica.iot.cygnus.nodes.CygnusApplication[166] : Starting Cygnus, version 1.7.0.UNKNOWN
time=2017-04-18T16:34:32.156Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnusagent | op=main | msg=com.telefonica.iot.cygnus.nodes.CygnusApplication[289] : Waiting for valid Flume components references...
time=2017-04-18T16:34:32.156Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnusagent | op=start | msg=org.apache.flume.node.PollingPropertiesFileConfigurationProvider[61] : Configuration provider starting
time=2017-04-18T16:34:32.159Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnusagent | op=run | msg=org.apache.flume.node.PollingPropertiesFileConfigurationProvider$FileWatcherRunnable[133] : Reloading configuration file:/usr/cygnus/conf/agent_1.conf
time=2017-04-18T16:34:32.182Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnusagent | op=addProperty | msg=org.apache.flume.conf.FlumeConfiguration$AgentConfiguration[1016] : Processing:dynamodb-sink
time=2017-04-18T16:34:32.182Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnusagent | op=addProperty | msg=org.apache.flume.conf.FlumeConfiguration$AgentConfiguration[1016] : Processing:hdfs-sink
time=2017-04-18T16:34:32.182Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnusagent | op=addProperty | msg=org.apache.flume.conf.FlumeConfiguration$AgentConfiguration[1016] : Processing:hdfs-sink
time=2017-04-18T16:34:32.182Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnusagent | op=addProperty | msg=org.apache.flume.conf.FlumeConfiguration$AgentConfiguration[1016] : Processing:sth-sink
time=2017-04-18T16:34:32.182Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnusagent | op=addProperty | msg=org.apache.flume.conf.FlumeConfiguration$AgentConfiguration[1016] : Processing:ckan-sink
time=2017-04-18T16:34:32.187Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnusagent | op=addProperty | msg=org.apache.flume.conf.FlumeConfiguration$AgentConfiguration[1016] : Processing:dynamodb-sink
time=2017-04-18T16:34:32.187Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnusagent | op=addProperty | msg=org.apache.flume.conf.FlumeConfiguration$AgentConfiguration[1016] : Processing:ckan-sink
time=2017-04-18T16:34:32.187Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnusagent | op=addProperty | msg=org.apache.flume.conf.FlumeConfiguration$AgentConfiguration[1016] : Processing:cartodb-sink
time=2017-04-18T16:34:32.188Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnusagent | op=addProperty | msg=org.apache.flume.conf.FlumeConfiguration$AgentConfiguration[1016] : Processing:ckan-sink
time=2017-04-18T16:34:32.188Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnusagent | op=addProperty | msg=org.apache.flume.conf.FlumeConfiguration$AgentConfiguration[1016] : Processing:cartodb-sink
time=2017-04-18T16:34:32.188Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnusagent | op=addProperty | msg=org.apache.flume.conf.FlumeConfiguration$AgentConfiguration[1016] : Processing:mongo-sink
time=2017-04-18T16:34:32.188Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnusagent | op=addProperty | msg=org.apache.flume.conf.FlumeConfiguration$AgentConfiguration[1016] : Processing:mysql-sink
time=2017-04-18T16:34:32.190Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnusagent | op=addProperty | msg=org.apache.flume.conf.FlumeConfiguration$AgentConfiguration[1016] : Processing:ckan-sink
time=2017-04-18T16:34:32.191Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnusagent | op=addProperty | msg=org.apache.flume.conf.FlumeConfiguration$AgentConfiguration[1016] : Processing:mysql-sink
time=2017-04-18T16:34:32.191Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnusagent | op=addProperty | msg=org.apache.flume.conf.FlumeConfiguration$AgentConfiguration[1016] : Processing:hdfs-sink
time=2017-04-18T16:34:32.191Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnusagent | op=addProperty | msg=org.apache.flume.conf.FlumeConfiguration$AgentConfiguration[1016] : Processing:ckan-sink
time=2017-04-18T16:34:32.191Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnusagent | op=addProperty | msg=org.apache.flume.conf.FlumeConfiguration$AgentConfiguration[1016] : Processing:ckan-sink
time=2017-04-18T16:34:32.191Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnusagent | op=addProperty | msg=org.apache.flume.conf.FlumeConfiguration$AgentConfiguration[1016] : Processing:hdfs-sink
time=2017-04-18T16:34:32.191Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnusagent | op=addProperty | msg=org.apache.flume.conf.FlumeConfiguration$AgentConfiguration[930] : Added sinks: hdfs-sink mysql-sink ckan-sink mongo-sink sth-sink kafka-sink dynamodb-sink postgresql-sink cartodb-sink Agent: cygnus-ngsi
time=2017-04-18T16:34:32.191Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnusagent | op=addProperty | msg=org.apache.flume.conf.FlumeConfiguration$AgentConfiguration[1016] : Processing:ckan-sink
time=2017-04-18T16:34:32.191Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnusagent | op=addProperty | msg=org.apache.flume.conf.FlumeConfiguration$AgentConfiguration[1016] : Processing:kafka-sink
time=2017-04-18T16:34:32.192Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnusagent | op=addProperty | msg=org.apache.flume.conf.FlumeConfiguration$AgentConfiguration[1016] : Processing:cartodb-sink
time=2017-04-18T16:34:32.192Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnusagent | op=addProperty | msg=org.apache.flume.conf.FlumeConfiguration$AgentConfiguration[1016] : Processing:hdfs-sink
time=2017-04-18T16:34:32.192Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnusagent | op=addProperty | msg=org.apache.flume.conf.FlumeConfiguration$AgentConfiguration[1016] : Processing:hdfs-sink
time=2017-04-18T16:34:32.192Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnusagent | op=addProperty | msg=org.apache.flume.conf.FlumeConfiguration$AgentConfiguration[1016] : Processing:ckan-sink
time=2017-04-18T16:34:32.192Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnusagent | op=addProperty | msg=org.apache.flume.conf.FlumeConfiguration$AgentConfiguration[1016] : Processing:ckan-sink
time=2017-04-18T16:34:32.192Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnusagent | op=addProperty | msg=org.apache.flume.conf.FlumeConfiguration$AgentConfiguration[1016] : Processing:ckan-sink
time=2017-04-18T16:34:32.192Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnusagent | op=addProperty | msg=org.apache.flume.conf.FlumeConfiguration$AgentConfiguration[1016] : Processing:ckan-sink
time=2017-04-18T16:34:32.192Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnusagent | op=addProperty | msg=org.apache.flume.conf.FlumeConfiguration$AgentConfiguration[1016] : Processing:hdfs-sink
time=2017-04-18T16:34:32.193Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnusagent | op=addProperty | msg=org.apache.flume.conf.FlumeConfiguration$AgentConfiguration[1016] : Processing:kafka-sink
time=2017-04-18T16:34:32.193Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnusagent | op=addProperty | msg=org.apache.flume.conf.FlumeConfiguration$AgentConfiguration[1016] : Processing:ckan-sink
time=2017-04-18T16:34:32.193Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnusagent | op=addProperty | msg=org.apache.flume.conf.FlumeConfiguration$AgentConfiguration[1016] : Processing:ckan-sink
time=2017-04-18T16:34:32.193Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnusagent | op=addProperty | msg=org.apache.flume.conf.FlumeConfiguration$AgentConfiguration[1016] : Processing:ckan-sink
time=2017-04-18T16:34:32.193Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnusagent | op=addProperty | msg=org.apache.flume.conf.FlumeConfiguration$AgentConfiguration[1016] : Processing:sth-sink
time=2017-04-18T16:34:32.193Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnusagent | op=addProperty | msg=org.apache.flume.conf.FlumeConfiguration$AgentConfiguration[1016] : Processing:dynamodb-sink
time=2017-04-18T16:34:32.193Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnusagent | op=addProperty | msg=org.apache.flume.conf.FlumeConfiguration$AgentConfiguration[1016] : Processing:ckan-sink
time=2017-04-18T16:34:32.194Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnusagent | op=addProperty | msg=org.apache.flume.conf.FlumeConfiguration$AgentConfiguration[1016] : Processing:dynamodb-sink
time=2017-04-18T16:34:32.194Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnusagent | op=addProperty | msg=org.apache.flume.conf.FlumeConfiguration$AgentConfiguration[1016] : Processing:postgresql-sink
time=2017-04-18T16:34:32.194Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnusagent | op=addProperty | msg=org.apache.flume.conf.FlumeConfiguration$AgentConfiguration[1016] : Processing:postgresql-sink
time=2017-04-18T16:34:32.195Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnusagent | op=addProperty | msg=org.apache.flume.conf.FlumeConfiguration$AgentConfiguration[1016] : Processing:ckan-sink
time=2017-04-18T16:34:32.195Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnusagent | op=addProperty | msg=org.apache.flume.conf.FlumeConfiguration$AgentConfiguration[1016] : Processing:ckan-sink
time=2017-04-18T16:34:32.198Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnusagent | op=addProperty | msg=org.apache.flume.conf.FlumeConfiguration$AgentConfiguration[1016] : Processing:mongo-sink
time=2017-04-18T16:34:32.220Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnusagent | op=validateConfiguration | msg=org.apache.flume.conf.FlumeConfiguration[140] : Post-validation flume configuration contains configuration for agents: [cygnus-ngsi]
time=2017-04-18T16:34:32.221Z | lvl=WARN | corr= | trans= | srv= | subsrv= | comp=cygnusagent | op=getConfiguration | msg=org.apache.flume.node.AbstractConfigurationProvider[138] : No configuration found for this host:cygnusagent
time=2017-04-18T16:34:32.224Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnusagent | op=startAllComponents | msg=org.apache.flume.node.Application[138] : Starting new configuration:{ sourceRunners:{} sinkRunners:{} channels:{} }
time=2017-04-18T16:34:33.156Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnusagent | op=main | msg=com.telefonica.iot.cygnus.nodes.CygnusApplication[301] : Starting a Jetty server listening on 0.0.0.0:8081 (Management Interface)
and when i test the cygnus from another terminal with a notification.sh testing file i get connection refused.
[centos#orcb2 ~]$ ./notification.sh http://localhost:5050/notify
* About to connect() to localhost port 5050 (#0)
* Trying ::1... Connection refused
* Trying 127.0.0.1... Connection refused
* couldn't connect to host
* Closing connection #0
curl: (7) couldn't connect to host
Although the configuration files are supposed to be correct as i think
and they are as follows:
these are my agent_1.conf file source and ckan configuration parameters :
=============================================
source configuration
cygnus-ngsi.sources.http-source.channels = hdfs-channel mysql-channel ckan-channel mongo-channel sth-channel kafka-channel dynamodb-channel postgresql-channel
cygnus-ngsi.sources.http-source.type = org.apache.flume.source.http.HTTPSource
cygnus-ngsi.sources.http-source.port = 5050
cygnus-ngsi.sources.http-source.handler = com.telefonica.iot.cygnus.handlers.NGSIRestHandler
cygnus-ngsi.sources.http-source.handler.notification_target = /notify
cygnus-ngsi.sources.http-source.handler.default_service = default
cygnus-ngsi.sources.http-source.handler.default_service_path = /
cygnus-ngsi.sources.http-source.interceptors = ts gi
cygnus-ngsi.sources.http-source.interceptors.ts.type = timestamp
cygnus-ngsi.sources.http-source.interceptors.gi.type = com.telefonica.iot.cygnus.interceptors.NGSIGroupingInterceptor$Builder
cygnus-ngsi.sources.http-source.interceptors.gi.grouping_rules_conf_file = /usr/cygnus/conf/grouping_rules.conf
# ============================================
NGSICKANSink configuration
cygnus-ngsi.sinks.ckan-sink.channel = ckan-channel
cygnus-ngsi.sinks.ckan-sink.type =com.telefonica.iot.cygnus.sinks.NGSICKANSink
cygnus-ngsi.sinks.ckan-sink.enable_grouping = false
cygnus-ngsi.sinks.ckan-sink.enable_name_mappings = false
cygnus-ngsi.sinks.ckan-sink.enable_encoding = false
cygnus-ngsi.sinks.ckan-sink.api_key = xxxxxxxx-xxxx-xxxxxx-xxxxx
cygnus-ngsi.sinks.ckan-sink.ckan_host = http://130.206.120.212
cygnus-ngsi.sinks.ckan-sink.ckan_port = 8080
cygnus-ngsi.sinks.ckan-sink.ckan_viewer = recline_grid_view
cygnus-ngsi.sinks.ckan-sink.orion_url = http://localhost:1026
cygnus-ngsi.sinks.ckan-sink.attr_persistence = row
cygnus-ngsi.sinks.ckan-sink.ssl = false
cygnus-ngsi.sinks.ckan-sink.batch_size = 100
cygnus-ngsi.sinks.ckan-sink.batch_timeout = 30
cygnus-ngsi.sinks.ckan-sink.batch_ttl = 10
cygnus-ngsi.sinks.ckan-sink.backend.max_conns = 500
cygnus-ngsi.sinks.ckan-sink.backend.max_conns_per_route = 100
and this is my cygnus_instance_1.conf
CYGNUS_USER=cygnus
CONFIG_FOLDER=/usr/cygnus/conf
CONFIG_FILE=/usr/cygnus/conf/agent_1.conf
AGENT_NAME=cygnusagent
LOGFILE_NAME=cygnus.log
ADMIN_PORT=8081
POLLING_INTERVAL=30
So, is missing in the whole configurations and what could be fixed to let the httpsource accept my notification requests ?
From this command:
cp target/cygnus-common-1.1.0-jar-with-dependencies.jar /usr/cygnus/plugins.d/cygnus/libext
It seems you have built cygnus-common release 1.1.0 (Is it right? I mean, is there a cygnus-common-1.1.0-jar-with-dependencies.jar file within target/ directory?)
Nevertheless, in the next command you have tried to install cygnus-common release 1.7.0_SNAPSHOT (with dependencies):
mvn install:install-file -Dfile=/usr/cygnus/plugins.d/cygnus/libext/cygnus-common-1.7.0_SNAPSHOT-jar-with-dependencies.jar -DgroupId=com.telefonica.iot -DartifactId=cygnus-common -Dversion=1.7.0 -Dpackaging=jar -DgeneratePom=false
Thus one of the above commands is wrong: both must refer to the same release.
One question: once cloned the github repo, did you checkout to a specific version as stated in the documentation?
$ git clone https://github.com/telefonicaid/fiware-cygnus.git
$ cd fiware-cygnus
$ git checkout <branch>
Such a <branch> could be master (the lastest development, not recommended), 1.7.0 (the latest official release), 1.6.0...
So, use always a specific version for all the components, even use the appropiate documentation version (for instance, the documentation link you have posted refers to release 1.3.0, while you were trying to build cygnus-common 1.1.0 but installing 1.7.0...).
PS: there is an easy way of installing the latest release (at the moment of writing this, 1.7.0): using a RPM from FIWARE repo.
EDIT 1: [Once installation problems are fixed and the question has been edited regarding a startup problem]
If you are not able to send a simulated notification to Cygnus it is because Cygnus has not started properly. You can check the logs at /var/log/cygnus/cygnus.log and get more details. Anyway, some remarks to your configuration:
Regarding agent_1.conf:
I'm missing source, channel and sink declarations. In addition, I'm missing the channel configuration. I guess you consciously omitted it, for simplicity.
Source channels can be limited to ckan-channel.
Regarding cygnus_instance_1.conf:
AGENT_NAME must match the one used in agent_1.conf, i.e. cygnus-ngsi.
Additionally, once installed, did you started Cygnus service? Just to be sure :)
$ sudo service cygnus start
Edit 2 : i've solved the connection refused error after i noticed that the default naming in cygnus_instance_1.conf is cygnusagent meanwhile the used one inside the agent_1.conf was cygnus-ngsi and i changed the name in the instance file. and now i get successfull http response , but still the data isn't persisted in ckan as i noticed some errors in the cygnus logs (whether i started cygnus by either the "service cygnus start" or the other long startup command) .
Now, this is the successful response as follows:
[centos#orcb2 ~]$ ./notification.sh http://localhost:5050/notify
* About to connect() to localhost port 5050 (#0)
* Trying ::1... connected
* Connected to localhost (::1) port 5050 (#0)
> POST /notify HTTP/1.1
> User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.19.1 Basic ECC zlib/1.2.3 libidn/1.18 libssh2/1.4.2
> Host: localhost:5050
> Content-Type: application/json; charset=utf-8
> Accept: application/json
> Fiware-Service: gp
> Fiware-ServicePath: /gp
> Content-Length: 607
>
< HTTP/1.1 200 OK
< Transfer-Encoding: chunked
< Server: Jetty(6.1.26)
<
* Connection #0 to host localhost left intact
* Closing connection #0
and here are the important parts regarding the errors in the new logs when i start the cygnus send notification:
Info: Sourcing environment configuration script /usr/cygnus/conf/flume-env.sh
Warning: JAVA_HOME is not set!
+ exec /usr/bin/java -Xmx20m -Dflume.log.file=cygnus.log -Duser.timezone=UTC -Dfile.encoding=UTF-8 -cp '/usr/cygnus/conf:/usr/cygnus/lib/*:/usr/cygnus/plugins.d/cygnus/lib/*:/usr/cygnus/plugins.d/cygnus/libext/*' -Djava.library.path= com.telefonica.iot.cygnus.nodes.CygnusApplication -p 8081 -f /usr/cygnus/conf/agent_1.conf -n cygnus-ngsi
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/usr/cygnus/lib/slf4j-log4j12-1.6.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/usr/cygnus/plugins.d/cygnus/lib/cygnus-ngsi-1.7.0-jar-with-dependencies.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/usr/cygnus/plugins.d/cygnus/libext/cygnus-common-1.7.0-jar-with-dependencies.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
time=2017-04-19T21:43:39.994Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp= | op=main | msg=com.telefonica.iot.cygnus.nodes.CygnusApplication[166] : Starting Cygnus, version 1.7.0.UNKNOWN
time=2017-04-19T21:43:40.136Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnus-ngsi | op=main | msg=com.telefonica.iot.cygnus.nodes.CygnusApplication[289] : Waiting for valid Flume components references...
time=2017-04-19T21:43:40.139Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnus-ngsi | op=start | msg=org.apache.flume.node.PollingPropertiesFileConfigurationProvider[61] : Configuration provider starting
time=2017-04-19T21:43:40.141Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnus-ngsi | op=run | msg=org.apache.flume.node.PollingPropertiesFileConfigurationProvider$FileWatcherRunnable[133] : Reloading configuration file:/usr/cygnus/conf/agent_1.conf
time=2017-04-19T21:43:40.166Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnus-ngsi | op=addProperty | msg=org.apache.flume.conf.FlumeConfiguration$AgentConfiguration[1016] : Processing:dynamodb-sink
time=2017-04-19T21:43:40.166Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnus-ngsi | op=addProperty | msg=org.apache.flume.conf.FlumeConfiguration$AgentConfiguration[1016] : Processing:hdfs-sink
/bin/bash: indent: command not found
.
.
.
time=2017-04-19T21:43:40.364Z | lvl=ERROR | corr= | trans= | srv= | subsrv= | comp=cygnus-ngsi | op=start | msg=com.telefonica.iot.cygnus.sinks.NGSICartoDBSink[242] : [cartodb-sink] Error while creating the CartoDB persistence backend. Details: /usr/cygnus/conf/cartodb_keys.conf (No such file or directory)
time=2017-04-19T21:43:40.364Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnus-ngsi | op=start | msg=com.telefonica.iot.cygnus.sinks.NGSISink[344] : [cartodb-sink] Startup completed. Nevertheless, there are errors in the configuration, thus this sink will not run the expected logic
time=2017-04-19T21:43:40.378Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnus-ngsi | op=start | msg=com.telefonica.iot.cygnus.sinks.NGSISink[354] : [postgresql-sink] Startup completed
time=2017-04-19T21:43:40.386Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnus-ngsi | op=start | msg=com.telefonica.iot.cygnus.sinks.NGSIPostgreSQLSink[201] : [postgresql-sink] Startup completed
time=2017-04-19T21:43:40.379Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnus-ngsi | op=start | msg=com.telefonica.iot.cygnus.sinks.NGSISink[354] : [mongo-sink] Startup completed
time=2017-04-19T21:43:40.379Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnus-ngsi | op=start | msg=com.telefonica.iot.cygnus.sinks.NGSISink[354] : [sth-sink] Startup completed
time=2017-04-19T21:43:40.389Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnus-ngsi | op=<init> | msg=com.telefonica.iot.cygnus.interceptors.CygnusGroupingRules[53] : Grouping rules read:
time=2017-04-19T21:43:40.403Z | lvl=WARN | corr= | trans= | srv= | subsrv= | comp=cygnus-ngsi | op=<init> | msg=com.telefonica.iot.cygnus.interceptors.CygnusGroupingRules[61] : Grouping rules syntax has errors. Details: null
time=2017-04-19T21:43:40.405Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnus-ngsi | op=start | msg=com.telefonica.iot.cygnus.sinks.NGSISink[354] : [mysql-sink] Startup completed
time=2017-04-19T21:43:40.457Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnus-ngsi | op=<init> | msg=com.telefonica.iot.cygnus.interceptors.CygnusGroupingRules[53] : Grouping rules read:
time=2017-04-19T21:43:40.457Z | lvl=WARN | corr= | trans= | srv= | subsrv= | comp=cygnus-ngsi | op=<init> | msg=com.telefonica.iot.cygnus.interceptors.CygnusGroupingRules[61] : Grouping rules syntax has errors. Details: null
time=2017-04-19T21:43:40.744Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnus-ngsi | op=start | msg=com.telefonica.iot.cygnus.sinks.NGSISink[354] : [kafka-sink] Startup completed
time=2017-04-19T21:43:40.867Z | lvl=WARN | corr= | trans= | srv= | subsrv= | comp=cygnus-ngsi | op=warn | msg=org.mortbay.log.Slf4jLog[76] : failed SocketConnector#0.0.0.0:5050: java.net.BindException: Address already in use (Bind failed)
time=2017-04-19T21:43:40.868Z | lvl=WARN | corr= | trans= | srv= | subsrv= | comp=cygnus-ngsi | op=warn | msg=org.mortbay.log.Slf4jLog[76] : failed Server#15e1356d: java.net.BindException: Address already in use (Bind failed)
time=2017-04-19T21:43:40.868Z | lvl=ERROR | corr= | trans= | srv= | subsrv= | comp=cygnus-ngsi | op=start | msg=org.apache.flume.source.http.HTTPSource[154] : Error while starting HTTPSource. Exception follows.
java.net.BindException: Address already in use (Bind failed)
at java.net.PlainSocketImpl.socketBind(Native Method)
at java.net.AbstractPlainSocketImpl.bind(AbstractPlainSocketImpl.java:376)
at java.net.ServerSocket.bind(ServerSocket.java:376)
at java.net.ServerSocket.<init>(ServerSocket.java:237)
at org.mortbay.jetty.bio.SocketConnector.newServerSocket(SocketConnector.java:80)
at org.mortbay.jetty.bio.SocketConnector.open(SocketConnector.java:73)
at org.mortbay.jetty.AbstractConnector.doStart(AbstractConnector.java:283)
at org.mortbay.jetty.bio.SocketConnector.doStart(SocketConnector.java:147)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at org.mortbay.jetty.Server.doStart(Server.java:235)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at org.apache.flume.source.http.HTTPSource.start(HTTPSource.java:151)
at org.apache.flume.source.EventDrivenSourceRunner.start(EventDrivenSourceRunner.java:44)
at org.apache.flume.lifecycle.LifecycleSupervisor$MonitorRunnable.run(LifecycleSupervisor.java:251)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:473)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:304)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
time=2017-04-19T21:43:40.894Z | lvl=ERROR | corr= | trans= | srv= | subsrv= | comp=cygnus-ngsi | op=run | msg=org.apache.flume.lifecycle.LifecycleSupervisor$MonitorRunnable[253] : Unable to start EventDrivenSourceRunner: { source:org.apache.flume.source.http.HTTPSource{name:http-source,state:IDLE} } - Exception follows.
java.lang.RuntimeException: java.net.BindException: Address already in use (Bind failed)
at com.google.common.base.Throwables.propagate(Throwables.java:156)
at org.apache.flume.source.http.HTTPSource.start(HTTPSource.java:155)
at org.apache.flume.source.EventDrivenSourceRunner.start(EventDrivenSourceRunner.java:44)
at org.apache.flume.lifecycle.LifecycleSupervisor$MonitorRunnable.run(LifecycleSupervisor.java:251)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:473)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:304)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.net.BindException: Address already in use (Bind failed)
at java.net.PlainSocketImpl.socketBind(Native Method)
at java.net.AbstractPlainSocketImpl.bind(AbstractPlainSocketImpl.java:376)
at java.net.ServerSocket.bind(ServerSocket.java:376)
at java.net.ServerSocket.<init>(ServerSocket.java:237)
at org.mortbay.jetty.bio.SocketConnector.newServerSocket(SocketConnector.java:80)
at org.mortbay.jetty.bio.SocketConnector.open(SocketConnector.java:73)
at org.mortbay.jetty.AbstractConnector.doStart(AbstractConnector.java:283)
at org.mortbay.jetty.bio.SocketConnector.doStart(SocketConnector.java:147)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at org.mortbay.jetty.Server.doStart(Server.java:235)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at org.apache.flume.source.http.HTTPSource.start(HTTPSource.java:151)
... 9 more
.
.
.
time=2017-04-19T21:43:41.136Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnus-ngsi | op=main | msg=com.telefonica.iot.cygnus.nodes.CygnusApplication[301] : Starting a Jetty server listening on 0.0.0.0:8081 (Management Interface)
time=2017-04-19T21:43:41.173Z | lvl=WARN | corr= | trans= | srv= | subsrv= | comp=cygnus-ngsi | op=warn | msg=org.mortbay.log.Slf4jLog[76] : failed SelectChannelConnector#0.0.0.0:8081: java.net.BindException: Address already in use
/bin/bash: indent: command not found
time=2017-04-19T21:43:41.174Z | lvl=FATAL | corr= | trans= | srv= | subsrv= | comp=cygnus-ngsi | op=run | msg=com.telefonica.iot.cygnus.http.JettyServer[90] : Fatal error running the Management Interface. Details=Address already in use
time=2017-04-19T21:43:41.446Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnus-ngsi | op=start | msg=com.telefonica.iot.cygnus.sinks.NGSISink[354] : [dynamodb-sink] Startup completed
time=2017-04-19T21:43:42.169Z | lvl=ERROR | corr= | trans= | srv= | subsrv= | comp=cygnus-ngsi | op=run | msg=com.telefonica.iot.cygnus.nodes.CygnusApplication$YAFS[457] : Thread found not alive, exiting Cygnus. ID=41, name=Thread-21
Starting an ordered shutdown of Cygnus
Stopping sources
Stopping http-source (lyfecycle state=IDLE)
time=2017-04-19T21:43:42.173Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnus-ngsi | op=stop | msg=org.apache.flume.instrumentation.MonitoredCounterGroup[139] : Component type: SOURCE, name: http-source stopped
time=2017-04-19T21:43:42.173Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnus-ngsi | op=stop | msg=org.apache.flume.instrumentation.MonitoredCounterGroup[145] : Shutdown Metric for type: SOURCE, name: http-source. source.start.time == 0
time=2017-04-19T21:43:42.173Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnus-ngsi | op=stop | msg=org.apache.flume.instrumentation.MonitoredCounterGroup[151] : Shutdown Metric for type: SOURCE, name: http-source. source.stop.time == 1492638222173
time=2017-04-19T21:43:42.174Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnus-ngsi | op=stop | msg=org.apache.flume.instrumentation.MonitoredCounterGroup[167] : Shutdown Metric for type: SOURCE, name: http-source. src.append-batch.accepted == 0
time=2017-04-19T21:43:42.179Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnus-ngsi | op=stop | msg=org.apache.flume.instrumentation.MonitoredCounterGroup[167] : Shutdown Metric for type: SOURCE, name: http-source. src.append-batch.received == 0
time=2017-04-19T21:43:42.180Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnus-ngsi | op=stop | msg=org.apache.flume.instrumentation.MonitoredCounterGroup[167] : Shutdown Metric for type: SOURCE, name: http-source. src.append.accepted == 0
time=2017-04-19T21:43:42.180Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnus-ngsi | op=stop | msg=org.apache.flume.instrumentation.MonitoredCounterGroup[167] : Shutdown Metric for type: SOURCE, name: http-source. src.append.received == 0
time=2017-04-19T21:43:42.180Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnus-ngsi | op=stop | msg=org.apache.flume.instrumentation.MonitoredCounterGroup[167] : Shutdown Metric for type: SOURCE, name: http-source. src.events.accepted == 0
time=2017-04-19T21:43:42.180Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnus-ngsi | op=stop | msg=org.apache.flume.instrumentation.MonitoredCounterGroup[167] : Shutdown Metric for type: SOURCE, name: http-source. src.events.received == 0
time=2017-04-19T21:43:42.180Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnus-ngsi | op=stop | msg=org.apache.flume.instrumentation.MonitoredCounterGroup[167] : Shutdown Metric for type: SOURCE, name: http-source. src.open-connection.count == 0
time=2017-04-19T21:43:42.181Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnus-ngsi | op=stop | msg=org.apache.flume.source.http.HTTPSource[172] : Http source http-source stopped. Metrics: SOURCE:http-source{src.events.accepted=0, src.events.received=0, src.append.accepted=0, src.append-batch.accepted=0, src.open-connection.count=0, src.append-batch.received=0, src.append.received=0}
All the channels are empty
Stopping channels
.
.
.
Stopping ckan-channel (lyfecycle state=START)
time=2017-04-19T21:44:10.482Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnus-ngsi | op=stop | msg=org.apache.flume.instrumentation.MonitoredCounterGroup[139] : Component type: CHANNEL, name: ckan-channel stopped
time=2017-04-19T21:44:10.482Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnus-ngsi | op=stop | msg=org.apache.flume.instrumentation.MonitoredCounterGroup[145] : Shutdown Metric for type: CHANNEL, name: ckan-channel. channel.start.time == 1492638220354
time=2017-04-19T21:44:10.482Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnus-ngsi | op=stop | msg=org.apache.flume.instrumentation.MonitoredCounterGroup[151] : Shutdown Metric for type: CHANNEL, name: ckan-channel. channel.stop.time == 1492638250482
time=2017-04-19T21:44:10.482Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnus-ngsi | op=stop | msg=org.apache.flume.instrumentation.MonitoredCounterGroup[167] : Shutdown Metric for type: CHANNEL, name: ckan-channel. channel.capacity == 1000
time=2017-04-19T21:44:10.483Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnus-ngsi | op=stop | msg=org.apache.flume.instrumentation.MonitoredCounterGroup[167] : Shutdown Metric for type: CHANNEL, name: ckan-channel. channel.current.size == 0
time=2017-04-19T21:44:10.483Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnus-ngsi | op=stop | msg=org.apache.flume.instrumentation.MonitoredCounterGroup[167] : Shutdown Metric for type: CHANNEL, name: ckan-channel. channel.event.put.attempt == 0
time=2017-04-19T21:44:10.483Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnus-ngsi | op=stop | msg=org.apache.flume.instrumentation.MonitoredCounterGroup[167] : Shutdown Metric for type: CHANNEL, name: ckan-channel. channel.event.put.success == 0
time=2017-04-19T21:44:10.483Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnus-ngsi | op=stop | msg=org.apache.flume.instrumentation.MonitoredCounterGroup[167] : Shutdown Metric for type: CHANNEL, name: ckan-channel. channel.event.take.attempt == 5
time=2017-04-19T21:44:10.483Z | lvl=INFO | corr= | trans= | srv= | subsrv= | comp=cygnus-ngsi | op=stop | msg=org.apache.flume.instrumentation.MonitoredCounterGroup[167] : Shutdown Metric for type: CHANNEL, name: ckan-channel. channel.event.take.success == 0
.
.
.
Stopping sinks
Stopping ckan-sink (lyfecycle state=START)
Stopping postgresql-sink (lyfecycle state=START)
Stopping dynamodb-sink (lyfecycle state=START)
Stopping kafka-sink (lyfecycle state=START)
Stopping cartodb-sink (lyfecycle state=START)
Stopping hdfs-sink (lyfecycle state=START)
Stopping mongo-sink (lyfecycle state=START)
Stopping mysql-sink (lyfecycle state=START)
Stopping sth-sink (lyfecycle state=START)
These are the channel , source and sink definitions in the agent.conf file
agent.sources = seqGenSrc
agent.channels = memoryChannel
agent.sinks = loggerSink
agent.sources.seqGenSrc.type = seq
agent.sources.seqGenSrc.channels = memoryChannel
agent.sinks.loggerSink.type = logger
agent.sinks.loggerSink.channel = memoryChannel
agent.channels.memoryChannel.type = memory
agent.channels.memoryChannel.capacity = 100
and this this is the ckan channel configuration
cygnus-ngsi.channels.ckan-channel.type = memory
cygnus-ngsi.channels.ckan-channel.capacity = 1000
cygnus-ngsi.channels.ckan-channel.transactionCapacity = 100
Regarding the ckan side , I want to know if there are additional procedures in the Ckan more than creating the account to persist the ngsi events.. do i have to manually create an organization and a dataset with its datastore for receiving ngsi events ? or are the fiware service and service path mapped into an organization and dataset with creation of their datastore and resource automatically on sending ngsi events ? i just want to make sure if i understood this correctly.
Now , what do you think i shall do to solve these errors ?

how to compile cygnus 1.1.0 from sources and update cygnus 0.13?

I follow the guide doing this steps:
git clone https://github.com/telefonicaid/fiware-cygnus.git
cd fiware-cygnus/cygnus-common
mvn clean compile exec:exec assembly:single
cp target/cygnus-common-1.1.0-jar-with-dependencies.jar /usr/cygnus/plugins.d/cygnus/libext
mvn install:install-file -Dfile=/usr/cygnus/plugins.d/cygnus/libext/cygnus-common-1.1.0-jar-with-dependencies.jar -DgroupId=com.telefonica.iot -DartifactId=cygnus-common -Dversion=1.1.0 -Dpackaging=jar -DgeneratePom=false
cp target/classes/cygnus-flume-ng /usr/cygnus/bin/cygnus-flume-ng
cd ../cygnus-ngsi
mvn clean compile exec:exec assembly:single
but in the last step compiling cygnus-ngsi I'm getting the following error:
OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=128m; support was removed in 8.0
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building cygnus-ngsi 1.1.0
[INFO] ------------------------------------------------------------------------
[WARNING] The POM for com.telefonica.iot:cygnus-common:jar:1.1.0 is missing, no dependency information available
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) # cygnus-ngsi ---
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # cygnus-ngsi ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 2 resources
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) # cygnus-ngsi ---
[INFO] Compiling 20 source files to /home/FiWare-VM014cen-Admin/fiware-cygnus/cygnus-ngsi/target/classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] error: error reading /root/.m2/repository/com/telefonica/iot/cygnus-common/1.1.0/cygnus-common-1.1.0.jar; zip file is empty
[INFO] 1 error
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.953 s
[INFO] Finished at: 2016-06-07T07:56:53-05:00
[INFO] Final Memory: 9M/25M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) on project cygnus-ngsi: Compilation failure
[ERROR] error: error reading /root/.m2/repository/com/telefonica/iot/cygnus-common/1.1.0/cygnus-common-1.1.0.jar; zip file is empty
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
I installed maven following this guide with the recommended version in the docs(3.2.5) How do I install Maven with Yum?
Flume is already installed from cygnus 0.13 that is what i want to upgrade to 1.1.0
I also tried most of the answers from this topic Maven : error in opening zip file when running maven
Edit 1 (compiling cygnus-common)
[root#PAPELclub-VM014cen-Prod cygnus-common]# mvn clean compile exec:exec assembly:single
OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=128m; support was removed in 8.0
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building cygnus-common 1.1.0
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) # cygnus-common ---
[INFO] Deleting /home/FiWare-VM014cen-Admin/fiware-cygnus/cygnus-common/target
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # cygnus-common ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 2 resources
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) # cygnus-common ---
[INFO] Compiling 50 source files to /home/FiWare-VM014cen-Admin/fiware-cygnus/cygnus-common/target/classes
[INFO]
[INFO] --- exec-maven-plugin:1.5.0:exec (default-cli) # cygnus-common ---
[INFO]
[INFO] --- maven-assembly-plugin:2.6:single (default-cli) # cygnus-common ---
[INFO] Building jar: /home/FiWare-VM014cen-Admin/fiware-cygnus/cygnus-common/target/cygnus-common-1.1.0-jar-with-dependencies.jar
Terminado (killed)
y el resultado en target:
[root#PAPELclub-VM014cen-Prod cygnus-common]# ls -all target/
total 20
drwxr-xr-x 5 root root 4096 jun 8 04:50 .
drwxr-xr-x 6 root root 4096 jun 8 04:49 ..
drwxr-xr-x 2 root root 4096 jun 8 04:49 archive-tmp
drwxr-xr-x 3 root root 4096 jun 8 04:49 classes
-rw-r--r-- 1 root root 0 jun 8 04:50 cygnus-common-1.1.0-jar-with-dependencies.jar
drwxr-xr-x 3 root root 4096 jun 8 04:49 generated-sources
I don't know why is terminating it I already give more memory to de jvm of maven as the documentation said:
export MAVEN_OPTS="-Xmx512m -XX:MaxPermSize=128m"
Edit 2
With the compiled files in the right places
/usr/cygnus/plugins.d/cygnus/lib/cygnus-ngsi-1.1.0-jar-with-dependencies.jar
/usr/cygnus/plugins.d/cygnus/libext/cygnus-common-1.1.0-jar-with-dependencies.jar
/usr/cygnus/bin/cygnus-flume-ng
all with the correct rights (777) I'm getting the following error when running with this command:
/usr/cygnus/bin/cygnus-flume-ng agent --conf /usr/cygnus/conf/ -f /usr/cygnus/conf/agent_hist.conf -n cygnusagent -Dflume.root.logger=INFO,console
Error:
[root#PAPELclub-VM014cen-Prod conf]# /usr/cygnus/bin/cygnus-flume-ng agent --conf /usr/cygnus/conf/ -f /usr/cygnus/conf/agent_hist.conf -n cygnusagent -Dflume.root.logger=INFO,console
Warning: JAVA_HOME is not set!
+ exec /usr/bin/java -Xmx20m -Dflume.root.logger=INFO,console -cp '/usr/cygnus/conf:/usr/cygnus/lib/*:/usr/cygnus/plugins.d/cygnus/lib/*:/usr/cygnus/plugins.d/cygnus/libext/*' -Djava.library.path= com.telefonica.iot.cygnus.nodes.CygnusApplication -f /usr/cygnus/conf/agent_hist.conf -n cygnusagent
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/usr/cygnus/lib/slf4j-log4j12-1.6.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/usr/cygnus/plugins.d/cygnus/lib/cygnus-ngsi-1.1.0-jar-with-dependencies.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/usr/cygnus/plugins.d/cygnus/libext/cygnus-common-1.1.0-jar-with-dependencies.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
time=2016-06-14T06:51:34.164CDT | lvl=INFO | trans= | srv= | subsrv= | function=main | comp=Cygnus | msg=com.telefonica.iot.cygnus.nodes.CygnusApplication[166] : Starting Cygnus, version 1.1.0.6442a45c568e21908b9455bebe378bc7194489bb
time=2016-06-14T06:51:34.789CDT | lvl=INFO | trans= | srv= | subsrv= | function=main | comp=Cygnus | msg=com.telefonica.iot.cygnus.nodes.CygnusApplication[277] : Waiting for valid Flume components references...
time=2016-06-14T06:51:34.793CDT | lvl=INFO | trans= | srv= | subsrv= | function=start | comp=Cygnus | msg=org.apache.flume.node.PollingPropertiesFileConfigurationProvider[61] : Configuration provider starting
time=2016-06-14T06:51:34.820CDT | lvl=INFO | trans= | srv= | subsrv= | function=run | comp=Cygnus | msg=org.apache.flume.node.PollingPropertiesFileConfigurationProvider$FileWatcherRunnable[133] : Reloading configuration file:/usr/cygnus/conf/agent_hist.conf
time=2016-06-14T06:51:34.841CDT | lvl=INFO | trans= | srv= | subsrv= | function=addProperty | comp=Cygnus | msg=org.apache.flume.conf.FlumeConfiguration$AgentConfiguration[1016] : Processing:ckan-sink
time=2016-06-14T06:51:34.842CDT | lvl=INFO | trans= | srv= | subsrv= | function=addProperty | comp=Cygnus | msg=org.apache.flume.conf.FlumeConfiguration$AgentConfiguration[1016] : Processing:ckan-sink
time=2016-06-14T06:51:34.843CDT | lvl=INFO | trans= | srv= | subsrv= | function=addProperty | comp=Cygnus | msg=org.apache.flume.conf.FlumeConfiguration$AgentConfiguration[1016] : Processing:ckan-sink
time=2016-06-14T06:51:34.849CDT | lvl=INFO | trans= | srv= | subsrv= | function=addProperty | comp=Cygnus | msg=org.apache.flume.conf.FlumeConfiguration$AgentConfiguration[930] : Added sinks: ckan-sink Agent: cygnusagent
time=2016-06-14T06:51:34.850CDT | lvl=INFO | trans= | srv= | subsrv= | function=addProperty | comp=Cygnus | msg=org.apache.flume.conf.FlumeConfiguration$AgentConfiguration[1016] : Processing:ckan-sink
time=2016-06-14T06:51:34.850CDT | lvl=INFO | trans= | srv= | subsrv= | function=addProperty | comp=Cygnus | msg=org.apache.flume.conf.FlumeConfiguration$AgentConfiguration[1016] : Processing:ckan-sink
time=2016-06-14T06:51:34.850CDT | lvl=INFO | trans= | srv= | subsrv= | function=addProperty | comp=Cygnus | msg=org.apache.flume.conf.FlumeConfiguration$AgentConfiguration[1016] : Processing:ckan-sink
time=2016-06-14T06:51:34.850CDT | lvl=INFO | trans= | srv= | subsrv= | function=addProperty | comp=Cygnus | msg=org.apache.flume.conf.FlumeConfiguration$AgentConfiguration[1016] : Processing:ckan-sink
time=2016-06-14T06:51:34.851CDT | lvl=INFO | trans= | srv= | subsrv= | function=addProperty | comp=Cygnus | msg=org.apache.flume.conf.FlumeConfiguration$AgentConfiguration[1016] : Processing:ckan-sink
time=2016-06-14T06:51:34.851CDT | lvl=INFO | trans= | srv= | subsrv= | function=addProperty | comp=Cygnus | msg=org.apache.flume.conf.FlumeConfiguration$AgentConfiguration[1016] : Processing:ckan-sink
time=2016-06-14T06:51:34.852CDT | lvl=INFO | trans= | srv= | subsrv= | function=addProperty | comp=Cygnus | msg=org.apache.flume.conf.FlumeConfiguration$AgentConfiguration[1016] : Processing:ckan-sink
time=2016-06-14T06:51:34.852CDT | lvl=INFO | trans= | srv= | subsrv= | function=addProperty | comp=Cygnus | msg=org.apache.flume.conf.FlumeConfiguration$AgentConfiguration[1016] : Processing:ckan-sink
time=2016-06-14T06:51:34.860CDT | lvl=INFO | trans= | srv= | subsrv= | function=addProperty | comp=Cygnus | msg=org.apache.flume.conf.FlumeConfiguration$AgentConfiguration[1016] : Processing:ckan-sink
time=2016-06-14T06:51:34.860CDT | lvl=INFO | trans= | srv= | subsrv= | function=addProperty | comp=Cygnus | msg=org.apache.flume.conf.FlumeConfiguration$AgentConfiguration[1016] : Processing:ckan-sink
time=2016-06-14T06:51:34.886CDT | lvl=INFO | trans= | srv= | subsrv= | function=validateConfiguration | comp=Cygnus | msg=org.apache.flume.conf.FlumeConfiguration[140] : Post-validation flume configuration contains configuration for agents: [cygnusagent]
time=2016-06-14T06:51:34.887CDT | lvl=INFO | trans= | srv= | subsrv= | function=loadChannels | comp=Cygnus | msg=org.apache.flume.node.AbstractConfigurationProvider[150] : Creating channels
time=2016-06-14T06:51:34.913CDT | lvl=INFO | trans= | srv= | subsrv= | function=create | comp=Cygnus | msg=org.apache.flume.channel.DefaultChannelFactory[40] : Creating instance of channel ckan-channel type memory
time=2016-06-14T06:51:34.923CDT | lvl=INFO | trans= | srv= | subsrv= | function=loadChannels | comp=Cygnus | msg=org.apache.flume.node.AbstractConfigurationProvider[205] : Created channel ckan-channel
time=2016-06-14T06:51:34.925CDT | lvl=INFO | trans= | srv= | subsrv= | function=create | comp=Cygnus | msg=org.apache.flume.source.DefaultSourceFactory[39] : Creating instance of source http-source, type org.apache.flume.source.http.HTTPSource
time=2016-06-14T06:51:35.023CDT | lvl=INFO | trans= | srv= | subsrv= | function=configure | comp=Cygnus | msg=com.telefonica.iot.cygnus.handlers.NGSIRestHandler[153] : Startup completed
time=2016-06-14T06:51:35.100CDT | lvl=ERROR | trans= | srv= | subsrv= | function=configureInterceptors | comp=Cygnus | msg=org.apache.flume.channel.ChannelProcessor[113] : Builder class not found. Exception follows.
java.lang.ClassNotFoundException: com.telefonica.iot.cygnus.interceptors.GroupingInterceptor$Builder
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
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.interceptor.InterceptorBuilderFactory.newInstance(InterceptorBuilderFactory.java:46)
at org.apache.flume.channel.ChannelProcessor.configureInterceptors(ChannelProcessor.java:109)
at org.apache.flume.channel.ChannelProcessor.configure(ChannelProcessor.java:80)
at org.apache.flume.conf.Configurables.configure(Configurables.java:41)
at org.apache.flume.node.AbstractConfigurationProvider.loadSources(AbstractConfigurationProvider.java:353)
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:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
time=2016-06-14T06:51:35.121CDT | lvl=ERROR | trans= | srv= | subsrv= | function=loadSources | comp=Cygnus | msg=org.apache.flume.node.AbstractConfigurationProvider[366] : Source http-source has been removed due to an error during configuration
org.apache.flume.FlumeException: Interceptor.Builder not found.
at org.apache.flume.channel.ChannelProcessor.configureInterceptors(ChannelProcessor.java:114)
at org.apache.flume.channel.ChannelProcessor.configure(ChannelProcessor.java:80)
at org.apache.flume.conf.Configurables.configure(Configurables.java:41)
at org.apache.flume.node.AbstractConfigurationProvider.loadSources(AbstractConfigurationProvider.java:353)
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:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.ClassNotFoundException: com.telefonica.iot.cygnus.interceptors.GroupingInterceptor$Builder
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
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.interceptor.InterceptorBuilderFactory.newInstance(InterceptorBuilderFactory.java:46)
at org.apache.flume.channel.ChannelProcessor.configureInterceptors(ChannelProcessor.java:109)
... 12 more
time=2016-06-14T06:51:35.122CDT | lvl=INFO | trans= | srv= | subsrv= | function=create | comp=Cygnus | msg=org.apache.flume.sink.DefaultSinkFactory[40] : Creating instance of sink: ckan-sink, type: com.telefonica.iot.cygnus.sinks.NGSICKANSink
time=2016-06-14T06:51:35.144CDT | lvl=INFO | trans= | srv= | subsrv= | function=getConfiguration | comp=Cygnus | msg=org.apache.flume.node.AbstractConfigurationProvider[119] : Channel ckan-channel connected to [ckan-sink]
time=2016-06-14T06:51:35.164CDT | lvl=INFO | trans= | srv= | subsrv= | function=startAllComponents | comp=Cygnus | msg=org.apache.flume.node.Application[138] : Starting new configuration:{ sourceRunners:{} sinkRunners:{ckan-sink=SinkRunner: { policy:org.apache.flume.sink.DefaultSinkProcessor#38b60c0 counterGroup:{ name:null counters:{} } }} channels:{ckan-channel=org.apache.flume.channel.MemoryChannel{name: ckan-channel}} }
time=2016-06-14T06:51:35.164CDT | lvl=INFO | trans= | srv= | subsrv= | function=startAllComponents | comp=Cygnus | msg=org.apache.flume.node.Application[145] : Starting Channel ckan-channel
time=2016-06-14T06:51:35.371CDT | lvl=INFO | trans= | srv= | subsrv= | function=register | comp=Cygnus | msg=org.apache.flume.instrumentation.MonitoredCounterGroup[110] : Monitoried counter group for type: CHANNEL, name: ckan-channel, registered successfully.
time=2016-06-14T06:51:35.372CDT | lvl=INFO | trans= | srv= | subsrv= | function=start | comp=Cygnus | msg=org.apache.flume.instrumentation.MonitoredCounterGroup[94] : Component type: CHANNEL, name: ckan-channel started
time=2016-06-14T06:51:35.372CDT | lvl=INFO | trans= | srv= | subsrv= | function=startAllComponents | comp=Cygnus | msg=org.apache.flume.node.Application[173] : Starting Sink ckan-sink
time=2016-06-14T06:51:35.790CDT | lvl=INFO | trans= | srv= | subsrv= | function=main | comp=Cygnus | msg=com.telefonica.iot.cygnus.nodes.CygnusApplication[286] : Starting a Jetty server listening on port 8081 (Management Interface)
time=2016-06-14T06:51:36.030CDT | lvl=INFO | trans= | srv= | subsrv= | function=info | comp=Cygnus | msg=org.mortbay.log.Slf4jLog[67] : Logging to org.slf4j.impl.Log4jLoggerAdapter(org.mortbay.log) via org.mortbay.log.Slf4jLog
time=2016-06-14T06:51:36.060CDT | lvl=INFO | trans= | srv= | subsrv= | function=info | comp=Cygnus | msg=org.mortbay.log.Slf4jLog[67] : jetty-6.1.26
time=2016-06-14T06:51:36.308CDT | lvl=INFO | trans= | srv= | subsrv= | function=info | comp=Cygnus | msg=org.mortbay.log.Slf4jLog[67] : Started SelectChannelConnector#0.0.0.0:8081
time=2016-06-14T06:51:36.735CDT | lvl=INFO | trans= | srv= | subsrv= | function=<init> | comp=Cygnus | msg=com.telefonica.iot.cygnus.backends.http.HttpClientFactory[79] : Setting max total connections (500)
time=2016-06-14T06:51:36.736CDT | lvl=INFO | trans= | srv= | subsrv= | function=<init> | comp=Cygnus | msg=com.telefonica.iot.cygnus.backends.http.HttpClientFactory[80] : Setting default max connections per route (100)
time=2016-06-14T06:51:36.803CDT | lvl=INFO | trans= | srv= | subsrv= | function=<init> | comp=Cygnus | msg=com.telefonica.iot.cygnus.backends.http.HttpClientFactory[79] : Setting max total connections (500)
time=2016-06-14T06:51:36.803CDT | lvl=INFO | trans= | srv= | subsrv= | function=<init> | comp=Cygnus | msg=com.telefonica.iot.cygnus.backends.http.HttpClientFactory[80] : Setting default max connections per route (100)
time=2016-06-14T06:51:36.804CDT | lvl=INFO | trans= | srv= | subsrv= | function=start | comp=Cygnus | msg=com.telefonica.iot.cygnus.sinks.NGSISink[240] : [ckan-sink] Startup completed
The agent config:
cygnusagent.sources = http-source
cygnusagent.sinks = ckan-sink
cygnusagent.channels = ckan-channel
cygnusagent.sources.http-source.channels = ckan-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.sinks.NGSICKANSink
cygnusagent.sources.http-source.handler.notification_target = /notify
cygnusagent.sources.http-source.handler.default_service = papel_club
cygnusagent.sources.http-source.handler.default_service_path = /events
cygnusagent.sources.http-source.handler.events_ttl = 5
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.GroupingInterceptor$Builder
cygnusagent.sources.http-source.interceptors.gi.grouping_rules_conf_file = /usr/cygnus/conf/grouping_rules_hist.conf
cygnusagent.channels.ckan-channel.type = memory
cygnusagent.channels.ckan-channel.capacity = 1000
cygnusagent.channels.ckan-channel.transactionCapacity = 100
# ============================================
# OrionCKANSink configuration
# channel name from where to read notification events
cygnusagent.sinks.ckan-sink.channel = ckan-channel
# sink class, must not be changed
cygnusagent.sinks.ckan-sink.type = com.telefonica.iot.cygnus.sinks.NGSICKANSink
# true if the grouping feature is enabled for this sink, false otherwise
cygnusagent.sinks.ckan-sink.enable_grouping = true
# true if lower case is wanted to forced in all the element names, false otherwise
cygnusagent.sinks.ckan-sink.enable_lowercase = false
# the CKAN API key to use
cygnusagent.sinks.ckan-sink.api_key = 436fffc8-b397-478a-92fd-bbc5ffaf8269
# the FQDN/IP address for the CKAN API endpoint
cygnusagent.sinks.ckan-sink.ckan_host = ckan-demo.ckan.io
# the port for the CKAN API endpoint
cygnusagent.sinks.ckan-sink.ckan_port = 80
# Orion URL used to compose the resource URL with the convenience operation URL to query it
cygnusagent.sinks.ckan-sink.orion_url = localhost:1026
# how the attributes are stored, either per row either per column (row, column)
cygnusagent.sinks.ckan-sink.attr_persistence = column
# enable SSL for secure Http transportation; 'true' or 'false'
cygnusagent.sinks.ckan-sink.ssl = false
# number of notifications to be included within a processing batch
cygnusagent.sinks.ckan-sink.batch_size = 100
# timeout for batch accumulation
cygnusagent.sinks.ckan-sink.batch_timeout = 60
# number of retries upon persistence error
cygnusagent.sinks.ckan-sink.batch_ttl = 10
I think the problem is in this line in the config
cygnusagent.sources.http-source.interceptors.gi.type = com.telefonica.iot.cygnus.interceptors.GroupingInterceptor$Builder
But the doc said it is ok any ideas?
How should I update the 0.13 version? should I uninstall cygnus 0.13 and do it on a clean flume? will be released a yum install package like with the cygnus 0.13 version?
Solved compilation problems using 3gb of ram as said in here Packaging cygnus-common results in an empty jar
Upgrading is just following the compile as sources doc but using the cygnus 0.13 path as the flume folder (/usr/cygnus)
The error with the Grouping interceptor is solved as said by #frb:
From Cygnus 1.0.0, you must use NGSIGroupingInterceptor instead of
GroupingInterceptor