Cygnus I m getting this exception curl 7 29 0 user agent not supported

0 votes

So, I installed Cygnus version 0.8.2 on Fiware instance basing on the image CentOS-7-x64 using:

sudo yum install cygnus

I configured my agent as:

cygnusagent.sources = http-source
cygnusagent.sinks = mongo-sink 
cygnusagent.channels = mongo-channel 

# source configuration
# channel name where to write the notification events
cygnusagent.sources.http-source.channels = mongo-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 =
# 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 = def_serv
# Default service path (service path semantic depends on the persistence sink)
cygnusagent.sources.http-source.handler.default_service_path = def_servpath
# 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 =$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 = /usr/cygnus/conf/grouping_rules.conf

# ============================================
# OrionMongoSink configuration
# sink class, must not be changed
cygnusagent.sinks.mongo-sink.type =
# channel name from where to read notification events = mongo-channel
# FQDN/IP:port where the MongoDB server runs (standalone case) or comma-separated list of FQDN/IP:port pairs where the MongoDB replica set members run
cygnusagent.sinks.mongo-sink.mongo_hosts =
# a valid user in the MongoDB server (or empty if authentication is not enabled in MongoDB)
cygnusagent.sinks.mongo-sink.mongo_username = 
# password for the user above (or empty if authentication is not enabled in MongoDB)
cygnusagent.sinks.mongo-sink.mongo_password =
# prefix for the MongoDB databases
cygnusagent.sinks.mongo-sink.db_prefix = kura_
# prefix pro the MongoDB collections
cygnusagent.sinks.mongo-sink.collection_prefix = kura_
# true is collection names are based on a hash, false for human redable collections
cygnusagent.sinks.mongo-sink.should_hash = false

# mongo-channel configuration
# channel type (must not be changed)
cygnusagent.channels.mongo-channel.type = memory
# capacity of the channel
cygnusagent.channels.mongo-channel.capacity = 1000
# amount of bytes that can be sent per transaction
cygnusagent.channels.mongo-channel.transactionCapacity = 100

I tried to test it locally using the following curl command:


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"

but I got this exception:

2015-10-06 14:38:50,138 (1251445230@qtp-1186065012-0) [INFO -] Starting transaction (1444142307-244-0000000000)
2015-10-06 14:38:50,140 (1251445230@qtp-1186065012-0) [WARN -] Bad HTTP notification (curl/7.29.0 user agent not supported)
2015-10-06 14:38:50,140 (1251445230@qtp-1186065012-0) [WARN - org.apache.flume.source.http.HTTPSource$FlumeHTTPServlet.doPost(] Received bad request from client. 
org.apache.flume.source.http.HTTPBadRequestException: curl/7.29.0 user agent not supported
    at org.apache.flume.source.http.HTTPSource$FlumeHTTPServlet.doPost(
    at javax.servlet.http.HttpServlet.service(
    at javax.servlet.http.HttpServlet.service(
    at org.mortbay.jetty.servlet.ServletHolder.handle(
    at org.mortbay.jetty.servlet.ServletHandler.handle(
    at org.mortbay.jetty.servlet.SessionHandler.handle(
    at org.mortbay.jetty.handler.ContextHandler.handle(
    at org.mortbay.jetty.handler.HandlerWrapper.handle(
    at org.mortbay.jetty.Server.handle(
    at org.mortbay.jetty.HttpConnection.handleRequest(
    at org.mortbay.jetty.HttpConnection$RequestHandler.content(
    at org.mortbay.jetty.HttpParser.parseNext(
    at org.mortbay.jetty.HttpParser.parseAvailable(
    at org.mortbay.jetty.HttpConnection.handle(
    at org.mortbay.thread.QueuedThreadPool$

Any idea what could I do?

Nov 23, 2018 in IoT (Internet of Things) by Upasana
• 8,620 points

1 answer to this question.

0 votes

Cygnus version <= 0.8.2 controls the HTTP headers, only accepts user-agents by Orion. This has been fixed in 0.9.0. Hence, the 2 ways you have are these:

  • Avoid sending a user-agent header like this one. According to the curl documentation, you can use the -A, --user-agent <agent string> option in order to modify the user-agent and sending something by orion (e.g. orion/0.24.0).
  • Moving to Cygnus 0.9.0 .
answered Nov 23, 2018 by Shubham
• 13,490 points

Related Questions In IoT (Internet of Things)

0 votes
1 answer
0 votes
1 answer

Send LoRa measures to Fiware IOT agent via MQTT

down vote I dont know if I understood ...READ MORE

answered Jul 13, 2018 in IoT (Internet of Things) by anonymous2
• 4,280 points
0 votes
1 answer
0 votes
1 answer

Node-RED, IOT Foundation Out Node Not Sending Commands

A simple test to check if the ...READ MORE

answered Jul 19, 2018 in IoT (Internet of Things) by TejaswiniUL
• 140 points
0 votes
1 answer

can't reach cygnus instance from orion context broker

In the security rules of Cygnus instance, ...READ MORE

answered Oct 3, 2018 in IoT (Internet of Things) by Annie97
• 2,160 points
0 votes
1 answer

RPMs for IoT Agents of Backend Device Management GE in FIWARE IoT ecosystem

The RPMs for IDAS component are availaible. ...READ MORE

answered Jul 30, 2018 in IoT (Internet of Things) by DataKing99
• 8,240 points
0 votes
1 answer

Can't install IDAS through provided RPMs on CentOS 7 VM

You should get that GitHub repository and ...READ MORE

answered Nov 20, 2018 in IoT (Internet of Things) by nirvana
• 3,130 points
0 votes
1 answer

Detecting when a sensor is not sending data to Orion CB in FiWARE

Orion in itself has no such mechanism ...READ MORE

answered Nov 22, 2018 in IoT (Internet of Things) by Shubham
• 13,490 points
0 votes
1 answer

Paho MQTT : Exception in Thread

So, I'd reckon you try to take a ...READ MORE

answered Apr 4, 2019 in IoT (Internet of Things) by Shubham
• 13,490 points
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP