Cygnus to Ckan: Error storing data - fiware
I have Cygnus configured to store all entities coming from Orion to CKAN. When I try to store the information from the entities in http://demo.ckan.org/ organization, dataset and resource are created correctly, but data is not stored.
I have Cygnus 0.12.1-16 and Orion 0.27.0-1 installed in my environment.
I am using attr_persistence=row to store data.
I think the problem is when the datastore is created and when the data is stored.
When the datastore is created a field is called fiware-servicepath , but when the data is stored the field is fiwareServicePath.
Datastore creation:
time=2016-02-22T10:31:38.847CET | lvl=DEBUG | trans=1456133435-163-0000000000 | srv=jsb | subsrv=jsb | function=sendRequestHeader | comp=Cygnus | msg=org.apache.http.impl.conn.DefaultClientConnection[272] : >> POST /api/3/action/datastore_create HTTP/1.1
time=2016-02-22T10:31:38.847CET | lvl=DEBUG | trans=1456133435-163-0000000000 | srv=jsb | subsrv=jsb | function=sendRequestHeader | comp=Cygnus | msg=org.apache.http.impl.conn.DefaultClientConnection[275] : >> Authorization: 7c426d08-f650-4a30-8577-e5281749e517
time=2016-02-22T10:31:38.847CET | lvl=DEBUG | trans=1456133435-163-0000000000 | srv=jsb | subsrv=jsb | function=sendRequestHeader | comp=Cygnus | msg=org.apache.http.impl.conn.DefaultClientConnection[275] : >> Content-Length: 429
time=2016-02-22T10:31:38.847CET | lvl=DEBUG | trans=1456133435-163-0000000000 | srv=jsb | subsrv=jsb | function=sendRequestHeader | comp=Cygnus | msg=org.apache.http.impl.conn.DefaultClientConnection[275] : >> Content-Type: text/plain; charset=ISO-8859-1
time=2016-02-22T10:31:38.848CET | lvl=DEBUG | trans=1456133435-163-0000000000 | srv=jsb | subsrv=jsb | function=sendRequestHeader | comp=Cygnus | msg=org.apache.http.impl.conn.DefaultClientConnection[275] : >> Host: demo.ckan.org:80
time=2016-02-22T10:31:38.848CET | lvl=DEBUG | trans=1456133435-163-0000000000 | srv=jsb | subsrv=jsb | function=sendRequestHeader | comp=Cygnus | msg=org.apache.http.impl.conn.DefaultClientConnection[275] : >> Connection: Keep-Alive
time=2016-02-22T10:31:38.848CET | lvl=DEBUG | trans=1456133435-163-0000000000 | srv=jsb | subsrv=jsb | function=sendRequestHeader | comp=Cygnus | msg=org.apache.http.impl.conn.DefaultClientConnection[275] : >> User-Agent: Apache-HttpClient/4.3.1 (java 1.5)
time=2016-02-22T10:31:38.849CET | lvl=DEBUG | trans=1456133435-163-0000000000 | srv=jsb | subsrv=jsb | function=wire | comp=Cygnus | msg=org.apache.http.impl.conn.Wire[86] : >> "{ "resource_id": "c34dd03e-6769-4bb7-940f-023338ff971f", "fields": [ { "id": "recvTimeTs", "type": "int"},{ "id": "recvTime", "type": "timestamp"},{ "id": "fiware-servicepath", "type": "text"},{ "id": "entityId", "type": "text"},{ "id": "entityType", "type": "text"},{ "id": "attrName", "type": "text"},{ "id": "attrType", "type": "text"},{ "id": "attrValue", "type": "json"},{ "id": "attrMd", "type": "json"}], "force": "true" }"
time=2016-02-22T10:31:39.143CET | lvl=DEBUG | trans=1456133435-163-0000000000 | srv=jsb | subsrv=jsb | function=wire | comp=Cygnus | msg=org.apache.http.impl.conn.Wire[72] : << "HTTP/1.1 200 OK[\r][\n]"
time=2016-02-22T10:31:39.143CET | lvl=DEBUG | trans=1456133435-163-0000000000 | srv=jsb | subsrv=jsb | function=wire | comp=Cygnus | msg=org.apache.http.impl.conn.Wire[72] : << "Server: nginx/1.1.19[\r][\n]"
time=2016-02-22T10:31:39.143CET | lvl=DEBUG | trans=1456133435-163-0000000000 | srv=jsb | subsrv=jsb | function=wire | comp=Cygnus | msg=org.apache.http.impl.conn.Wire[72] : << "Date: Mon, 22 Feb 2016 09:31:39 GMT[\r][\n]"
time=2016-02-22T10:31:39.145CET | lvl=DEBUG | trans=1456133435-163-0000000000 | srv=jsb | subsrv=jsb | function=wire | comp=Cygnus | msg=org.apache.http.impl.conn.Wire[72] : << "Content-Type: application/json;charset=utf-8[\r][\n]"
time=2016-02-22T10:31:39.145CET | lvl=DEBUG | trans=1456133435-163-0000000000 | srv=jsb | subsrv=jsb | function=wire | comp=Cygnus | msg=org.apache.http.impl.conn.Wire[72] : << "Content-Length: 534[\r][\n]"
time=2016-02-22T10:31:39.146CET | lvl=DEBUG | trans=1456133435-163-0000000000 | srv=jsb | subsrv=jsb | function=wire | comp=Cygnus | msg=org.apache.http.impl.conn.Wire[72] : << "Connection: keep-alive[\r][\n]"
time=2016-02-22T10:31:39.146CET | lvl=DEBUG | trans=1456133435-163-0000000000 | srv=jsb | subsrv=jsb | function=wire | comp=Cygnus | msg=org.apache.http.impl.conn.Wire[72] : << "Vary: Accept-Encoding[\r][\n]"
time=2016-02-22T10:31:39.146CET | lvl=DEBUG | trans=1456133435-163-0000000000 | srv=jsb | subsrv=jsb | function=wire | comp=Cygnus | msg=org.apache.http.impl.conn.Wire[72] : << "Pragma: no-cache[\r][\n]"
time=2016-02-22T10:31:39.146CET | lvl=DEBUG | trans=1456133435-163-0000000000 | srv=jsb | subsrv=jsb | function=wire | comp=Cygnus | msg=org.apache.http.impl.conn.Wire[72] : << "Cache-Control: no-cache[\r][\n]"
time=2016-02-22T10:31:39.146CET | lvl=DEBUG | trans=1456133435-163-0000000000 | srv=jsb | subsrv=jsb | function=wire | comp=Cygnus | msg=org.apache.http.impl.conn.Wire[72] : << "[\r][\n]"
time=2016-02-22T10:31:39.147CET | lvl=DEBUG | trans=1456133435-163-0000000000 | srv=jsb | subsrv=jsb | function=receiveResponseHeader | comp=Cygnus | msg=org.apache.http.impl.conn.DefaultClientConnection[253] : Receiving response: HTTP/1.1 200 OK
time=2016-02-22T10:31:39.147CET | lvl=DEBUG | trans=1456133435-163-0000000000 | srv=jsb | subsrv=jsb | function=receiveResponseHeader | comp=Cygnus | msg=org.apache.http.impl.conn.DefaultClientConnection[256] : << HTTP/1.1 200 OK
time=2016-02-22T10:31:39.147CET | lvl=DEBUG | trans=1456133435-163-0000000000 | srv=jsb | subsrv=jsb | function=receiveResponseHeader | comp=Cygnus | msg=org.apache.http.impl.conn.DefaultClientConnection[259] : << Server: nginx/1.1.19
time=2016-02-22T10:31:39.147CET | lvl=DEBUG | trans=1456133435-163-0000000000 | srv=jsb | subsrv=jsb | function=receiveResponseHeader | comp=Cygnus | msg=org.apache.http.impl.conn.DefaultClientConnection[259] : << Date: Mon, 22 Feb 2016 09:31:39 GMT
time=2016-02-22T10:31:39.147CET | lvl=DEBUG | trans=1456133435-163-0000000000 | srv=jsb | subsrv=jsb | function=receiveResponseHeader | comp=Cygnus | msg=org.apache.http.impl.conn.DefaultClientConnection[259] : << Content-Type: application/json;charset=utf-8
time=2016-02-22T10:31:39.147CET | lvl=DEBUG | trans=1456133435-163-0000000000 | srv=jsb | subsrv=jsb | function=receiveResponseHeader | comp=Cygnus | msg=org.apache.http.impl.conn.DefaultClientConnection[259] : << Content-Length: 534
time=2016-02-22T10:31:39.148CET | lvl=DEBUG | trans=1456133435-163-0000000000 | srv=jsb | subsrv=jsb | function=receiveResponseHeader | comp=Cygnus | msg=org.apache.http.impl.conn.DefaultClientConnection[259] : << Connection: keep-alive
time=2016-02-22T10:31:39.148CET | lvl=DEBUG | trans=1456133435-163-0000000000 | srv=jsb | subsrv=jsb | function=receiveResponseHeader | comp=Cygnus | msg=org.apache.http.impl.conn.DefaultClientConnection[259] : << Vary: Accept-Encoding
time=2016-02-22T10:31:39.148CET | lvl=DEBUG | trans=1456133435-163-0000000000 | srv=jsb | subsrv=jsb | function=receiveResponseHeader | comp=Cygnus | msg=org.apache.http.impl.conn.DefaultClientConnection[259] : << Pragma: no-cache
time=2016-02-22T10:31:39.148CET | lvl=DEBUG | trans=1456133435-163-0000000000 | srv=jsb | subsrv=jsb | function=receiveResponseHeader | comp=Cygnus | msg=org.apache.http.impl.conn.DefaultClientConnection[259] : << Cache-Control: no-cache
Datastore update:
time=2016-02-22T10:31:39.610CET | lvl=DEBUG | trans=1456133435-163-0000000000 | srv=jsb | subsrv=jsb | function=sendRequestHeader | comp=Cygnus | msg=org.apache.http.impl.conn.DefaultClientConnection[272] : >> POST /api/3/action/datastore_upsert HTTP/1.1
time=2016-02-22T10:31:39.610CET | lvl=DEBUG | trans=1456133435-163-0000000000 | srv=jsb | subsrv=jsb | function=sendRequestHeader | comp=Cygnus | msg=org.apache.http.impl.conn.DefaultClientConnection[275] : >> Authorization: 7c426d08-f650-4a30-8577-e5281749e517
time=2016-02-22T10:31:39.610CET | lvl=DEBUG | trans=1456133435-163-0000000000 | srv=jsb | subsrv=jsb | function=sendRequestHeader | comp=Cygnus | msg=org.apache.http.impl.conn.DefaultClientConnection[275] : >> Content-Length: 4702
time=2016-02-22T10:31:39.610CET | lvl=DEBUG | trans=1456133435-163-0000000000 | srv=jsb | subsrv=jsb | function=sendRequestHeader | comp=Cygnus | msg=org.apache.http.impl.conn.DefaultClientConnection[275] : >> Content-Type: text/plain; charset=ISO-8859-1
time=2016-02-22T10:31:39.611CET | lvl=DEBUG | trans=1456133435-163-0000000000 | srv=jsb | subsrv=jsb | function=sendRequestHeader | comp=Cygnus | msg=org.apache.http.impl.conn.DefaultClientConnection[275] : >> Host: demo.ckan.org:80
time=2016-02-22T10:31:39.611CET | lvl=DEBUG | trans=1456133435-163-0000000000 | srv=jsb | subsrv=jsb | function=sendRequestHeader | comp=Cygnus | msg=org.apache.http.impl.conn.DefaultClientConnection[275] : >> Connection: Keep-Alive
time=2016-02-22T10:31:39.611CET | lvl=DEBUG | trans=1456133435-163-0000000000 | srv=jsb | subsrv=jsb | function=sendRequestHeader | comp=Cygnus | msg=org.apache.http.impl.conn.DefaultClientConnection[275] : >> User-Agent: Apache-HttpClient/4.3.1 (java 1.5)
time=2016-02-22T10:31:39.615CET | lvl=DEBUG | trans=1456133435-163-0000000000 | srv=jsb | subsrv=jsb | function=wire | comp=Cygnus | msg=org.apache.http.impl.conn.Wire[86] : >> "{ "resource_id": "c34dd03e-6769-4bb7-940f-023338ff971f", "records": [ {"recvTimeTs": "1456133486","recvTime": "2016-02-22T09:31:26.861Z","fiwareServicePath": "jsb","entityId": "User2_1_1","entityType": "User_Itinerary_Program","attrName": "responsePatient1","attrType": "integer","attrValue": "5"},{"recvTimeTs": "1456133486","recvTime": "2016-02-22T09:31:26.861Z","fiwareServicePath": "jsb","entityId": "User2_1_1","entityType": "User_Itinerary_Program","attrName": "responsePatient10","attrType": "integer","attrValue": "2"},{"recvTimeTs": "1456133486","recvTime": "2016-02-22T09:31:26.861Z","fiwareServicePath": "jsb","entityId": "User2_1_1","entityType": "User_Itinerary_Program","attrName": "responsePatient2","attrType": "integer","attrValue": "3"},{"recvTimeTs": "1456133486","recvTime": "2016-02-22T09:31:26.861Z","fiwareServicePath": "jsb","entityId": "User2_1_1","entityType": "User_Itinerary_Program","attrName": "responsePatient3","attrType": "integer","attrValue": "4"},{"recvTimeTs": "1456133486","recvTime": "2016-02-22T09:31:26.861Z","fiwareServicePath": "jsb","entityId": "User2_1_1","entityType": "User_Itinerary_Program","attrName": "responsePatient4","attrType": "integer","attrValue": "4"},{"recvTimeTs": "1456133486","recvTime": "2016-02-22T09:31:26.861Z","fiwareServicePath": "jsb","entityId": "User2_1_1","entityType": "User_Itinerary_Program","attrName": "responsePatient5","attrType": "integer","attrValue": "3"},{"recvTimeTs": "1456133486","recvTime": "2016-02-22T09:31:26.861Z","fiwareServicePath": "jsb","entityId": "User2_1_1","entityType": "User_Itinerary_Program","attrName": "responsePatient6","attrType": "integer","attrValue": "3"},{"recvTimeTs": "1456133486","recvTime": "2016-02-22T09:31:26.861Z","fiwareServicePath": "jsb","entityId": "User2_1_1","entityType": "User_Itinerary_Program","attrName": "responsePatient7","attrType": "integer","attrValue": "4"},{"recvTimeTs": "1456133486","recvTime": "2016-02-22T09:31:26.861Z","fiwareServicePath": "jsb","entityId": "User2_1_1","entityType": "User_Itinerary_Program","attrName": "responsePatient8","attrType": "integer","attrValue": "2"},{"recvTimeTs": "1456133486","recvTime": "2016-02-22T09:31:26.861Z","fiwareServicePath": "jsb","entityId": "User2_1_1","entityType": "User_Itinerary_Program","attrName": "responsePatient9","attrType": "integer","attrValue": "4"},{"recvTimeTs": "1456133486","recvTime": "2016-02-22T09:31:26.861Z","fiwareServicePath": "jsb","entityId": "User2_1_1","entityType": "User_Itinerary_Program","attrName": "responseSpecialist1","attrType": "integer","attrValue": "4"},{"recvTimeTs": "1456133486","recvTime": "2016-02-22T09:31:26.861Z","fiwareServicePath": "jsb","entityId": "User2_1_1","entityType": "User_Itinerary_Program","attrName": "responseSpecialist10","attrType": "integer","attrValue": "5"},{"recvTimeTs": "1456133486","recvTime": "2016-02-22T09:31:26.861Z","fiwareServicePath": "jsb","entityId": "User2_1_1","entityType": "User_Itinerary_Program","attrName": "responseSpecialist2","attrType": "integer","attrValue": "1"},{"recvTimeTs": "1456133486","recvTime": "2016-02-22T09:31:26.861Z","fiwareServicePath": "jsb","entityId": "User2_1_1","entityType": "User_Itinerary_Program","attrName": "responseSpecialist3","attrType": "integer","attrValue": "3"},{"recvTimeTs": "1456133486","recvTime": "2016-02-22T09:31:26.861Z","fiwareServicePath": "jsb","entityId": "User2_1_1","entityType": "User_Itinerary_Program","attrName": "responseSpecialist4","attrType": "integer","attrValue": "2"},{"recvTimeTs": "1456133486","recvTime": "2016-02-22T09:31:26.861Z","fiwareServicePath": "jsb","entityId": "User2_1_1","entityType": "User_Itinerary_Program","attrName": "responseSpecialist5","attrType": "integer","attrValue": "3"},{"recvTimeTs": "1456133486","recvTime": "2016-02-22T09:31:26.861Z","fiwareServicePath": "jsb","entityId": "User2_1_1","entityType": "User_Itinerary_Program","attrName": "responseSpecialist6","attrType": "integer","attrValue": "5"},{"recvTimeTs": "1456133486","recvTime": "2016-02-22T09:31:26.861Z","fiwareServicePath": "jsb","entityId": "User2_1_1","entityType": "User_Itinerary_Program","attrName": "responseSpecialist7","attrType": "integer","attrValue": "2"},{"recvTimeTs": "1456133486","recvTime": "2016-02-22T09:31:26.861Z","fiwareServicePath": "jsb","entityId": "User2_1_1","entityType": "User_Itinerary_Program","attrName": "responseSpecialist8","attrType": "integer","attrValue": "4"},{"recvTimeTs": "1456133486","recvTime": "2016-02-22T09:31:26.861Z","fiwareServicePath": "jsb","entityId": "User2_1_1","entityType": "User_Itinerary_Program","attrName": "responseSpecialist9","attrType": "integer","attrValue": "1"} ], "method": "insert", "force": "true" }"
time=2016-02-22T10:31:39.810CET | lvl=DEBUG | trans=1456133435-163-0000000000 | srv=jsb | subsrv=jsb | function=wire | comp=Cygnus | msg=org.apache.http.impl.conn.Wire[72] : << "HTTP/1.1 409 Conflict[\r][\n]"
time=2016-02-22T10:31:39.811CET | lvl=DEBUG | trans=1456133435-163-0000000000 | srv=jsb | subsrv=jsb | function=wire | comp=Cygnus | msg=org.apache.http.impl.conn.Wire[72] : << "Server: nginx/1.1.19[\r][\n]"
time=2016-02-22T10:31:39.811CET | lvl=DEBUG | trans=1456133435-163-0000000000 | srv=jsb | subsrv=jsb | function=wire | comp=Cygnus | msg=org.apache.http.impl.conn.Wire[72] : << "Date: Mon, 22 Feb 2016 09:31:40 GMT[\r][\n]"
time=2016-02-22T10:31:39.811CET | lvl=DEBUG | trans=1456133435-163-0000000000 | srv=jsb | subsrv=jsb | function=wire | comp=Cygnus | msg=org.apache.http.impl.conn.Wire[72] : << "Content-Type: application/json;charset=utf-8[\r][\n]"
time=2016-02-22T10:31:39.811CET | lvl=DEBUG | trans=1456133435-163-0000000000 | srv=jsb | subsrv=jsb | function=wire | comp=Cygnus | msg=org.apache.http.impl.conn.Wire[72] : << "Content-Length: 199[\r][\n]"
time=2016-02-22T10:31:39.812CET | lvl=DEBUG | trans=1456133435-163-0000000000 | srv=jsb | subsrv=jsb | function=wire | comp=Cygnus | msg=org.apache.http.impl.conn.Wire[72] : << "Connection: keep-alive[\r][\n]"
time=2016-02-22T10:31:39.815CET | lvl=DEBUG | trans=1456133435-163-0000000000 | srv=jsb | subsrv=jsb | function=wire | comp=Cygnus | msg=org.apache.http.impl.conn.Wire[72] : << "Pragma: no-cache[\r][\n]"
time=2016-02-22T10:31:39.816CET | lvl=DEBUG | trans=1456133435-163-0000000000 | srv=jsb | subsrv=jsb | function=wire | comp=Cygnus | msg=org.apache.http.impl.conn.Wire[72] : << "Cache-Control: no-cache[\r][\n]"
time=2016-02-22T10:31:39.817CET | lvl=DEBUG | trans=1456133435-163-0000000000 | srv=jsb | subsrv=jsb | function=wire | comp=Cygnus | msg=org.apache.http.impl.conn.Wire[72] : << "[\r][\n]"
time=2016-02-22T10:31:39.817CET | lvl=DEBUG | trans=1456133435-163-0000000000 | srv=jsb | subsrv=jsb | function=receiveResponseHeader | comp=Cygnus | msg=org.apache.http.impl.conn.DefaultClientConnection[253] : Receiving response: HTTP/1.1 409 Conflict
time=2016-02-22T10:31:39.817CET | lvl=DEBUG | trans=1456133435-163-0000000000 | srv=jsb | subsrv=jsb | function=receiveResponseHeader | comp=Cygnus | msg=org.apache.http.impl.conn.DefaultClientConnection[256] : << HTTP/1.1 409 Conflict
time=2016-02-22T10:31:39.819CET | lvl=DEBUG | trans=1456133435-163-0000000000 | srv=jsb | subsrv=jsb | function=receiveResponseHeader | comp=Cygnus | msg=org.apache.http.impl.conn.DefaultClientConnection[259] : << Server: nginx/1.1.19
time=2016-02-22T10:31:39.819CET | lvl=DEBUG | trans=1456133435-163-0000000000 | srv=jsb | subsrv=jsb | function=receiveResponseHeader | comp=Cygnus | msg=org.apache.http.impl.conn.DefaultClientConnection[259] : << Date: Mon, 22 Feb 2016 09:31:40 GMT
time=2016-02-22T10:31:39.820CET | lvl=DEBUG | trans=1456133435-163-0000000000 | srv=jsb | subsrv=jsb | function=receiveResponseHeader | comp=Cygnus | msg=org.apache.http.impl.conn.DefaultClientConnection[259] : << Content-Type: application/json;charset=utf-8
time=2016-02-22T10:31:39.820CET | lvl=DEBUG | trans=1456133435-163-0000000000 | srv=jsb | subsrv=jsb | function=receiveResponseHeader | comp=Cygnus | msg=org.apache.http.impl.conn.DefaultClientConnection[259] : << Content-Length: 199
time=2016-02-22T10:31:39.820CET | lvl=DEBUG | trans=1456133435-163-0000000000 | srv=jsb | subsrv=jsb | function=receiveResponseHeader | comp=Cygnus | msg=org.apache.http.impl.conn.DefaultClientConnection[259] : << Connection: keep-alive
time=2016-02-22T10:31:39.821CET | lvl=DEBUG | trans=1456133435-163-0000000000 | srv=jsb | subsrv=jsb | function=receiveResponseHeader | comp=Cygnus | msg=org.apache.http.impl.conn.DefaultClientConnection[259] : << Pragma: no-cache
time=2016-02-22T10:31:39.821CET | lvl=DEBUG | trans=1456133435-163-0000000000 | srv=jsb | subsrv=jsb | function=receiveResponseHeader | comp=Cygnus | msg=org.apache.http.impl.conn.DefaultClientConnection[259] : << Cache-Control: no-cache
time=2016-02-22T10:31:39.826CET | lvl=DEBUG | trans=1456133435-163-0000000000 | srv=jsb | subsrv=jsb | function=execute | comp=Cygnus | msg=org.apache.http.impl.client.DefaultRequestDirector[509] : Connection can be kept alive indefinitely
time=2016-02-22T10:31:39.827CET | lvl=DEBUG | trans=1456133435-163-0000000000 | srv=jsb | subsrv=jsb | function=createJsonResponse | comp=Cygnus | msg=com.telefonica.iot.cygnus.backends.http.HttpBackend[271] : Http response: HTTP/1.1 409 Conflict
time=2016-02-22T10:31:39.827CET | lvl=DEBUG | trans=1456133435-163-0000000000 | srv=jsb | subsrv=jsb | function=wire | comp=Cygnus | msg=org.apache.http.impl.conn.Wire[86] : << "{"help": "http://demo.ckan.org/api/3/action/help_show?name=datastore_upsert", "success": false, "error": {"records": ["row \"1\" has extra keys \"fiwareServicePath\""], "__type": "Validation Error"}}"
time=2016-02-22T10:31:39.827CET | lvl=DEBUG | trans=1456133435-163-0000000000 | srv=jsb | subsrv=jsb | function=releaseConnection | comp=Cygnus | msg=org.apache.http.impl.conn.PoolingClientConnectionManager[262] : Connection [id: 1][route: {}->http://demo.ckan.org:80] can be kept alive indefinitely
time=2016-02-22T10:31:39.832CET | lvl=DEBUG | trans=1456133435-163-0000000000 | srv=jsb | subsrv=jsb | function=releaseConnection | comp=Cygnus | msg=org.apache.http.impl.conn.PoolingClientConnectionManager[269] : Connection released: [id: 1][route: {}->http://demo.ckan.org:80][total kept alive: 1; route allocated: 1 of 100; total allocated: 1 of 500]
time=2016-02-22T10:31:39.832CET | lvl=DEBUG | trans=1456133435-163-0000000000 | srv=jsb | subsrv=jsb | function=createJsonResponse | comp=Cygnus | msg=com.telefonica.iot.cygnus.backends.http.HttpBackend[280] : response payload: {"help": "http://demo.ckan.org/api/3/action/help_show?name=datastore_upsert", "success": false, "error": {"records": ["row \"1\" has extra keys \"fiwareServicePath\""], "__type": "Validation Error"}}
time=2016-02-22T10:31:39.832CET | lvl=DEBUG | trans=1456133435-163-0000000000 | srv=jsb | subsrv=jsb | function=doRequest | comp=Cygnus | msg=com.telefonica.iot.cygnus.backends.http.HttpBackend[138] : The used Http endpoint is not active, trying another one (host=demo.ckan.org)
time=2016-02-22T10:31:39.833CET | lvl=DEBUG | trans=1456133435-163-0000000000 | srv=jsb | subsrv=jsb | function=processNewBatches | comp=Cygnus | msg=com.telefonica.iot.cygnus.sinks.OrionSink[411] : [com.telefonica.iot.cygnus.backends.ckan.CKANBackendImpl.insert(CKANBackendImpl.java:176), com.telefonica.iot.cygnus.backends.ckan.CKANBackendImpl.persist(CKANBackendImpl.java:80), com.telefonica.iot.cygnus.sinks.OrionCKANSink.persistAggregation(OrionCKANSink.java:386), com.telefonica.iot.cygnus.sinks.OrionCKANSink.persistBatch(OrionCKANSink.java:181), com.telefonica.iot.cygnus.sinks.OrionSink.processNewBatches(OrionSink.java:402), com.telefonica.iot.cygnus.sinks.OrionSink.process(OrionSink.java:150), org.apache.flume.sink.DefaultSinkProcessor.process(DefaultSinkProcessor.java:68), org.apache.flume.SinkRunner$PollingRunner.run(SinkRunner.java:147), java.lang.Thread.run(Thread.java:701)]
time=2016-02-22T10:31:39.833CET | lvl=ERROR | trans=1456133435-163-0000000000 | srv=jsb | subsrv=jsb | function=processNewBatches | comp=Cygnus | msg=com.telefonica.iot.cygnus.sinks.OrionSink[424] : Runtime error (Don't know how to treat response code 409)
Full log file: http://pastebin.com/HpVPGjhz
Any solution?
Yes, you are right. This issue has been fixed in the current develop branch:
https://github.com/telefonicaid/fiware-cygnus/issues/800
It will appear fixed as well in the upcoming 0.13.0 version (at the moment of writting this, by the end of the week).
Related
I have problem with crud in my code and command
when pressing the command php artisan route: list does not appear the addresses to perform the crud in my code. | | GET|HEAD | / | | App\Http\Controllers\CarController#casa | web | | | GET|HEAD | api/user | | Closure | api,auth:api | | | GET|HEAD | crear | cars.create | App\Http\Controllers\CarController#mostrar | web | | | POST | crear | cars.crear | App\Http\Controllers\CarController#crear | web | | | GET|HEAD | home | home | App\Http\Controllers\HomeController#index | web,auth | | | GET|HEAD | login | login | App\Http\Controllers\Auth\LoginController#showLoginForm | web,guest | | | POST | login | | App\Http\Controllers\Auth\LoginController#login | web,guest | | | POST | logout | logout | App\Http\Controllers\Auth\LoginController#logout | web | | | POST | password/email | password.email | App\Http\Controllers\Auth\ForgotPasswordController#sendResetLinkEmail | web,guest | | | GET|HEAD | password/reset | password.request | App\Http\Controllers\Auth\ForgotPasswordController#showLinkRequestForm | web,guest | | | POST | password/reset | password.update | App\Http\Controllers\Auth\ResetPasswordController#reset | web,guest | | | GET|HEAD | password/reset/{token} | password.reset | App\Http\Controllers\Auth\ResetPasswordController#showResetForm | web,guest | | | GET|HEAD | register | register | App\Http\Controllers\Auth\RegisterController#showRegistrationForm | web,guest | | | POST | register | | App\Http\Controllers\Auth\RegisterController#register | web,guest | Routes/web.php <?php Route::get('/crear',[ 'uses'=>'CarController#mostrar', 'as'=>'cars.create' ] ); Route::post('/crear',[ 'uses'=>'CarController#crear', 'as'=>'cars.crear' ]); Route::get('/', 'CarController#casa' ); Auth::routes(); Route::get('/home', 'HomeController#index')->name('home');
Run this command in cmd : php artisan make:controller AddressController --resource and add this in web.php, Route::resource('address', 'AddressController'); Now, you will get crud list while doing route:list
I am not able to make Orion communicate with Cygnus?
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.
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
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