[ https://jira.fiware.org/browse/HELP-8762?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fernando Lopez updated HELP-8762: --------------------------------- HD-Chapter: Data Description: Created question in FIWARE Q/A platform on 16-02-2016 at 14:02 {color: red}Please, ANSWER this question AT{color} https://stackoverflow.com/questions/35433411/cygnus-to-ckan-runtime-error-dont-know-how-to-treat-response-code-409 +Question:+ Cygnus to Ckan - Runtime error (Don't know how to treat response code 409) +Description:+ I am trying to use Cygnus with CKAN, but I get an error when I send the notification to the data is saved in CKAN. The Cygnus log: time=2016-02-17T10:01:11.601CET | lvl=INFO | trans=1455699663-312-0000000000 | srv=testjsb | subsrv=testjsb | function=getEvents | comp=Cygnus | msg=com.telefonica.iot.cygnus.handlers.OrionRestHandler[209] : Starting transaction (1455699663-312-0000000000) time=2016-02-17T10:01:11.606CET | lvl=INFO | trans=1455699663-312-0000000000 | srv=testjsb | subsrv=testjsb | function=getEvents | comp=Cygnus | msg=com.telefonica.iot.cygnus.handlers.OrionRestHandler[236] : Received data ({ "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" } } ]}) time=2016-02-17T10:01:11.608CET | lvl=INFO | trans=1455699663-312-0000000000 | srv=testjsb | subsrv=testjsb | function=getEvents | comp=Cygnus | msg=com.telefonica.iot.cygnus.handlers.OrionRestHandler[259] : Event put in the channel (id=1231327840, ttl=10) time=2016-02-17T10:01:34.311CET | lvl=INFO | trans=1455699663-312-0000000000 | srv=testjsb | subsrv=testjsb | function=processNewBatches | comp=Cygnus | msg=com.telefonica.iot.cygnus.sinks.OrionSink[351] : Batch accumulation time reached, the batch will be processed as it is time=2016-02-17T10:01:34.319CET | lvl=INFO | trans=1455699663-312-0000000000 | srv=testjsb | subsrv=testjsb | function=persistAggregation | comp=Cygnus | msg=com.telefonica.iot.cygnus.sinks.OrionCKANSink[382] : [ckan-sink] Persisting data at OrionCKANSink (orgName=testjsb, pkgName=testjsb_testjsb, resName=room1_room, data={"recvTimeTs": "1455699671","recvTime": "2016-02-17T09:01:11.609Z","fiwareServicePath": "testjsb","entityId": "Room1","entityType": "Room","attrName": "temperature","attrType": "float","attrValue": "26.5"}) time=2016-02-17T10:01:36.129CET | lvl=ERROR | trans=1455699663-312-0000000000 | srv=testjsb | subsrv=testjsb | function=processNewBatches | comp=Cygnus | msg=com.telefonica.iot.cygnus.sinks.OrionSink[424] : Runtime error (Don't know how to treat response code 409) My cygnus agent config: cygnusagent.sources = http-source cygnusagent.sinks = ckan-sink cygnusagent.channels = ckan-channel #============================================= # source configuration # channel name where to write the notification events cygnusagent.sources.http-source.channels = ckan-channel # source class, must not be changed cygnusagent.sources.http-source.type = org.apache.flume.source.http.HTTPSource # listening port the Flume source will use for receiving incoming notifications cygnusagent.sources.http-source.port = 5050 # Flume handler that will parse the notifications, must not be changed cygnusagent.sources.http-source.handler = com.telefonica.iot.cygnus.handlers.OrionRestHandler # URL target cygnusagent.sources.http-source.handler.notification_target = /notify # Default service (service semantic depends on the persistence sink) cygnusagent.sources.http-source.handler.default_service = testjsb # Default service path (service path semantic depends on the persistence sink) cygnusagent.sources.http-source.handler.default_service_path = testjsb # Number of channel re-injection retries before a Flume event is definitely discarded (-1 means infinite retries) cygnusagent.sources.http-source.handler.events_ttl = 10 # Source interceptors, do not change cygnusagent.sources.http-source.interceptors = ts gi # TimestampInterceptor, do not change cygnusagent.sources.http-source.interceptors.ts.type = timestamp # GroupinInterceptor, do not change cygnusagent.sources.http-source.interceptors.gi.type = com.telefonica.iot.cygnus.interceptors.GroupingInterceptor$Builder # Grouping rules for the GroupingInterceptor, put the right absolute path to the file if necessary # See the doc/design/interceptors document for more details cygnusagent.sources.http-source.interceptors.gi.grouping_rules_conf_file = /usr/cygnus/conf/grouping_rules.conf # ============================================ # 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 # the CKAN API key to use cygnusagent.sinks.ckan-sink.api_key = myapikey # 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 = 80 # 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 = row # 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 = 30 #============================================= # ckan-channel configuration # channel type (must not be changed) cygnusagent.channels.ckan-channel.type = memory # capacity of the channel cygnusagent.channels.ckan-channel.capacity = 1000 # amount of bytes that can be sent per transaction cygnusagent.channels.ckan-channel.transactionCapacity = 100 And the notification code: curl http://localhost:5050/notify -v -s -S --header 'Content-Type: application/json' --header 'Accept: application/json' -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 When cygnus persists data into demo.ckan.org, organization, dataset and resource are created correctyl but data are not loaded. http://demo.ckan.org/dataset/testjsb_testjsb/resource/0d9a8394-3d57-4450-b764-f3dbe2287127 was: Created question in FIWARE Q/A platform on 16-02-2016 at 14:02 {color: red}Please, ANSWER this question AT{color} https://stackoverflow.com/questions/35433411/cygnus-to-ckan-runtime-error-dont-know-how-to-treat-response-code-409 +Question:+ Cygnus to Ckan - Runtime error (Don't know how to treat response code 409) +Description:+ I am trying to use Cygnus with CKAN, but I get an error when I send the notification to the data is saved in CKAN. The Cygnus log: time=2016-02-17T10:01:11.601CET | lvl=INFO | trans=1455699663-312-0000000000 | srv=testjsb | subsrv=testjsb | function=getEvents | comp=Cygnus | msg=com.telefonica.iot.cygnus.handlers.OrionRestHandler[209] : Starting transaction (1455699663-312-0000000000) time=2016-02-17T10:01:11.606CET | lvl=INFO | trans=1455699663-312-0000000000 | srv=testjsb | subsrv=testjsb | function=getEvents | comp=Cygnus | msg=com.telefonica.iot.cygnus.handlers.OrionRestHandler[236] : Received data ({ "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" } } ]}) time=2016-02-17T10:01:11.608CET | lvl=INFO | trans=1455699663-312-0000000000 | srv=testjsb | subsrv=testjsb | function=getEvents | comp=Cygnus | msg=com.telefonica.iot.cygnus.handlers.OrionRestHandler[259] : Event put in the channel (id=1231327840, ttl=10) time=2016-02-17T10:01:34.311CET | lvl=INFO | trans=1455699663-312-0000000000 | srv=testjsb | subsrv=testjsb | function=processNewBatches | comp=Cygnus | msg=com.telefonica.iot.cygnus.sinks.OrionSink[351] : Batch accumulation time reached, the batch will be processed as it is time=2016-02-17T10:01:34.319CET | lvl=INFO | trans=1455699663-312-0000000000 | srv=testjsb | subsrv=testjsb | function=persistAggregation | comp=Cygnus | msg=com.telefonica.iot.cygnus.sinks.OrionCKANSink[382] : [ckan-sink] Persisting data at OrionCKANSink (orgName=testjsb, pkgName=testjsb_testjsb, resName=room1_room, data={"recvTimeTs": "1455699671","recvTime": "2016-02-17T09:01:11.609Z","fiwareServicePath": "testjsb","entityId": "Room1","entityType": "Room","attrName": "temperature","attrType": "float","attrValue": "26.5"}) time=2016-02-17T10:01:36.129CET | lvl=ERROR | trans=1455699663-312-0000000000 | srv=testjsb | subsrv=testjsb | function=processNewBatches | comp=Cygnus | msg=com.telefonica.iot.cygnus.sinks.OrionSink[424] : Runtime error (Don't know how to treat response code 409) My cygnus agent config: cygnusagent.sources = http-source cygnusagent.sinks = ckan-sink cygnusagent.channels = ckan-channel #============================================= # source configuration # channel name where to write the notification events cygnusagent.sources.http-source.channels = ckan-channel # source class, must not be changed cygnusagent.sources.http-source.type = org.apache.flume.source.http.HTTPSource # listening port the Flume source will use for receiving incoming notifications cygnusagent.sources.http-source.port = 5050 # Flume handler that will parse the notifications, must not be changed cygnusagent.sources.http-source.handler = com.telefonica.iot.cygnus.handlers.OrionRestHandler # URL target cygnusagent.sources.http-source.handler.notification_target = /notify # Default service (service semantic depends on the persistence sink) cygnusagent.sources.http-source.handler.default_service = testjsb # Default service path (service path semantic depends on the persistence sink) cygnusagent.sources.http-source.handler.default_service_path = testjsb # Number of channel re-injection retries before a Flume event is definitely discarded (-1 means infinite retries) cygnusagent.sources.http-source.handler.events_ttl = 10 # Source interceptors, do not change cygnusagent.sources.http-source.interceptors = ts gi # TimestampInterceptor, do not change cygnusagent.sources.http-source.interceptors.ts.type = timestamp # GroupinInterceptor, do not change cygnusagent.sources.http-source.interceptors.gi.type = com.telefonica.iot.cygnus.interceptors.GroupingInterceptor$Builder # Grouping rules for the GroupingInterceptor, put the right absolute path to the file if necessary # See the doc/design/interceptors document for more details cygnusagent.sources.http-source.interceptors.gi.grouping_rules_conf_file = /usr/cygnus/conf/grouping_rules.conf # ============================================ # 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 # the CKAN API key to use cygnusagent.sinks.ckan-sink.api_key = myapikey # 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 = 80 # 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 = row # 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 = 30 #============================================= # ckan-channel configuration # channel type (must not be changed) cygnusagent.channels.ckan-channel.type = memory # capacity of the channel cygnusagent.channels.ckan-channel.capacity = 1000 # amount of bytes that can be sent per transaction cygnusagent.channels.ckan-channel.transactionCapacity = 100 And the notification code: curl http://localhost:5050/notify -v -s -S --header 'Content-Type: application/json' --header 'Accept: application/json' -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 When cygnus persists data into demo.ckan.org, organization, dataset and resource are created correctyl but data are not loaded. http://demo.ckan.org/dataset/testjsb_testjsb/resource/0d9a8394-3d57-4450-b764-f3dbe2287127 HD-Enabler: Cosmos > [fiware-stackoverflow] Cygnus to Ckan - Runtime error (Don't know how to treat response code 409) > ----------------------------------------------------------------------------------------------------- > > Key: HELP-8762 > URL: https://jira.fiware.org/browse/HELP-8762 > Project: Help-Desk > Issue Type: Monitor > Components: FIWARE-TECH-HELP > Reporter: Backlog Manager > Assignee: Backlog Manager > Labels: ckan, fiware, fiware-cygnus, fiware-orion > > Created question in FIWARE Q/A platform on 16-02-2016 at 14:02 > {color: red}Please, ANSWER this question AT{color} https://stackoverflow.com/questions/35433411/cygnus-to-ckan-runtime-error-dont-know-how-to-treat-response-code-409 > +Question:+ > Cygnus to Ckan - Runtime error (Don't know how to treat response code 409) > +Description:+ > I am trying to use Cygnus with CKAN, but I get an error when I send the notification to the data is saved in CKAN. > The Cygnus log: > time=2016-02-17T10:01:11.601CET | lvl=INFO | trans=1455699663-312-0000000000 | srv=testjsb | subsrv=testjsb | function=getEvents | comp=Cygnus | msg=com.telefonica.iot.cygnus.handlers.OrionRestHandler[209] : Starting transaction (1455699663-312-0000000000) > time=2016-02-17T10:01:11.606CET | lvl=INFO | trans=1455699663-312-0000000000 | srv=testjsb | subsrv=testjsb | function=getEvents | comp=Cygnus | msg=com.telefonica.iot.cygnus.handlers.OrionRestHandler[236] : Received data ({ "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" } } ]}) > time=2016-02-17T10:01:11.608CET | lvl=INFO | trans=1455699663-312-0000000000 | srv=testjsb | subsrv=testjsb | function=getEvents | comp=Cygnus | msg=com.telefonica.iot.cygnus.handlers.OrionRestHandler[259] : Event put in the channel (id=1231327840, ttl=10) > time=2016-02-17T10:01:34.311CET | lvl=INFO | trans=1455699663-312-0000000000 | srv=testjsb | subsrv=testjsb | function=processNewBatches | comp=Cygnus | msg=com.telefonica.iot.cygnus.sinks.OrionSink[351] : Batch accumulation time reached, the batch will be processed as it is > time=2016-02-17T10:01:34.319CET | lvl=INFO | trans=1455699663-312-0000000000 | srv=testjsb | subsrv=testjsb | function=persistAggregation | comp=Cygnus | msg=com.telefonica.iot.cygnus.sinks.OrionCKANSink[382] : [ckan-sink] Persisting data at OrionCKANSink (orgName=testjsb, pkgName=testjsb_testjsb, resName=room1_room, data={"recvTimeTs": "1455699671","recvTime": "2016-02-17T09:01:11.609Z","fiwareServicePath": "testjsb","entityId": "Room1","entityType": "Room","attrName": "temperature","attrType": "float","attrValue": "26.5"}) > time=2016-02-17T10:01:36.129CET | lvl=ERROR | trans=1455699663-312-0000000000 | srv=testjsb | subsrv=testjsb | function=processNewBatches | comp=Cygnus | msg=com.telefonica.iot.cygnus.sinks.OrionSink[424] : Runtime error (Don't know how to treat response code 409) > My cygnus agent config: > cygnusagent.sources = http-source > cygnusagent.sinks = ckan-sink > cygnusagent.channels = ckan-channel > #============================================= > # source configuration > # channel name where to write the notification events > cygnusagent.sources.http-source.channels = ckan-channel > # source class, must not be changed > cygnusagent.sources.http-source.type = org.apache.flume.source.http.HTTPSource > # listening port the Flume source will use for receiving incoming notifications > cygnusagent.sources.http-source.port = 5050 > # Flume handler that will parse the notifications, must not be changed > cygnusagent.sources.http-source.handler = com.telefonica.iot.cygnus.handlers.OrionRestHandler > # URL target > cygnusagent.sources.http-source.handler.notification_target = /notify > # Default service (service semantic depends on the persistence sink) > cygnusagent.sources.http-source.handler.default_service = testjsb > # Default service path (service path semantic depends on the persistence sink) > cygnusagent.sources.http-source.handler.default_service_path = testjsb > # Number of channel re-injection retries before a Flume event is definitely discarded (-1 means infinite retries) > cygnusagent.sources.http-source.handler.events_ttl = 10 > # Source interceptors, do not change > cygnusagent.sources.http-source.interceptors = ts gi > # TimestampInterceptor, do not change > cygnusagent.sources.http-source.interceptors.ts.type = timestamp > # GroupinInterceptor, do not change > cygnusagent.sources.http-source.interceptors.gi.type = com.telefonica.iot.cygnus.interceptors.GroupingInterceptor$Builder > # Grouping rules for the GroupingInterceptor, put the right absolute path to the file if necessary > # See the doc/design/interceptors document for more details > cygnusagent.sources.http-source.interceptors.gi.grouping_rules_conf_file = /usr/cygnus/conf/grouping_rules.conf > # ============================================ > # 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 > # the CKAN API key to use > cygnusagent.sinks.ckan-sink.api_key = myapikey > # 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 = 80 > # 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 = row > # 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 = 30 > #============================================= > # ckan-channel configuration > # channel type (must not be changed) > cygnusagent.channels.ckan-channel.type = memory > # capacity of the channel > cygnusagent.channels.ckan-channel.capacity = 1000 > # amount of bytes that can be sent per transaction > cygnusagent.channels.ckan-channel.transactionCapacity = 100 > And the notification code: > curl http://localhost:5050/notify -v -s -S --header 'Content-Type: application/json' --header 'Accept: application/json' -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 > When cygnus persists data into demo.ckan.org, organization, dataset and resource are created correctyl but data are not loaded. > http://demo.ckan.org/dataset/testjsb_testjsb/resource/0d9a8394-3d57-4450-b764-f3dbe2287127 -- This message was sent by Atlassian JIRA (v6.4.1#64016)
You can get more information about our cookies and privacy policies clicking on the following links: Privacy policy Cookies policy