How to enable NGSIv2 in iotagent-ul helmchart? - fiware

I received {"name":"BAD_REQUEST","message":"Request error connecting to the Context Broker: 501"} error when when I send a POST to iotagent-ul deployed via iotagent-ul helm chart.
time=2022-10-08T09:03:18.182Z | lvl=DEBUG | corr=d7ed414d-a132-45ea-b4a3-38ee14a828dc | trans=d7ed414d-a132-45ea-b4a3-38ee14a828dc | op=IoTAgentNGSI.Request | from=n/a | srv=openiot | subsrv=/ | msg=Response {
"error": "NotImplemented",
"description": "Only NGSIv1-based forwarding supported at the present moment. Set explictely legacyForwarding to true"
}
Following the iotagent-ul documentation to enable NGSIv2, it must be set ngsiVersion in contextBroker:
{
host: '192.168.56.101',
port: '1026',
ngsiVersion: 'v2'
}
Since I am using the official fiware helm-chart, I have updated the configmap.yaml to include the ngsiVersion
contextBroker: {
/**
* Host where the Context Broker is located.
*/
host: '{{ .Values.iota.contextBroker.host }}',
/**
* Port where the Context Broker is listening.
*/
port: '{{ .Values.iota.contextBroker.port }}',
/**
* ngsiVersion supported by the Context Broker.
*/
ngsiVersion: '{{ .Values.iota.contextBroker.ngsiVersion }}'
}
Now, I get this error:
time=2022-10-08T18:17:24.614Z | lvl=ERROR | corr=841d2b61-463e-42ff-acd7-d0f4b867b7b3 | trans=841d2b61-463e-42ff-acd7-d0f4b867b7b3 | op=IoTAgentNGSI.DeviceService | srv=openiot | subsrv=/ | msg=Registration error connecting to the Context Broker: {"code":"400","reasonPhrase":"Bad Request","details":"missing isDomain value for registration attribute"} | comp=IoTAgent

According to comments on the question, you are using Orion-LD instead of official Orion. The Orion-LD support to NGSIv2 is limited, so I'd suggest to change your context broker to official Orion newest version (3.7.0 at the moment of writing this).

Related

Suddenly my instance stopped responding to my incoming connections for mysql connections

I had installed mysql on gcp instance for dev and test purposes. Everything was working perfect but suddenly started getting connection timed out error. Firewall is opened on for MySQL connections. It was working perfectly, suddenly it stopped.
Here is the log for the connection
{
inserted: "xxxxxx"
jsonPayload: {
connection: {
dest_ip: "10.142.0.2"
dest_port: 3306
protocol: 6
src_ip: "54.87.222.27"
src_port: 52638
}
disposition: "ALLOWED"
instance: {
project_id: "xxxxxxxx"
region: "us-east1"
vm_name: "stockarea-server"
zone: "us-east1-b"
}
remote_location: {
city: "Ashburn"
continent: "America"
country: "usa"
region: "Virginia"
}
rule_details: {
action: "ALLOW"
direction: "INGRESS"
ip_port_info: [
0: {
ip_protocol: "TCP"
port_range: [
0: "3306"
]
}
1: {
ip_protocol: "UDP"
port_range: [
0: "3306"
]
}
]
priority: 1000
reference: "network:default/firewall:heroku-sql"
source_range: [
0: "0.0.0.0/0"
]
}
vpc: {
project_id: "xxxxxxxx"
subnetwork_name: "default"
vpc_name: "default"
}
}
logName: "projects/pxxxxxxx/logs/compute.googleapis.com%2Ffirewall"
receiveTimestamp: "2020-05-22T18:25:57.341545693Z"
resource: {
labels: {
location: "us-east1-b"
project_id: "xxxxxxxx"
subnetwork_id: "5137290941342062105"
subnetwork_name: "default"
}
type: "gce_subnetwork"
}
timestamp: "2020-05-22T18:25:45.934585080Z"
}
I have MySQL users having permission to get access for different IP address:
+------------------+-----------+
| user | host |
+------------------+-----------+
| client | % |
| stockarea | % |
| debian-sys-maint | localhost |
| mysql.session | localhost |
| mysql.sys | localhost |
| root | localhost |
UPDATE:
I saw MySQL error.log file and saw somebody attacked and has somehow crashed the database. It was throwing error packet getting out of order. I reinstalled the MySQL for now to solve this and continue my development.
Hi I tried to ping your external IP and it works. So all 80, 443, and 3306. I believe your firewall is setup correctly, Please make sure your service is running and listening to those ports.
And finally, please be aware that you should sanitize private inforamtion such as ip address and project ID in public forum

Device is created when sending measures to non existing device - IoTAgent-UL

We've discovered a bug in the IoT Agent Ultralight.
If we try to send a measure to a non existing device, we'll get a 404 - DEVICE_NOT_FOUND error but at the same time a device without any attribute will be created in IoTA's and Orion CB's database.
When I say a device without any attribute I refer to the following:
{
"device_id": "test",
"service": "MyService",
"service_path": "/MyServicePath",
"entity_name": "MyEntity:test",
"entity_type": "MyEntity",
"attributes": [],
"lazy": [],
"commands": [],
"static_attributes": []
}
This is a very important bug, because it's really simple to create as many devices as someone wants and that could eat our database space.
Does someone know how to solve it?
Which version of IotAgent-ul and external components, I mean, (Fiware OCB and MongoDB) are you using? It's highly recommend to use the latest one.
It's a good way to run OCB and MongoDB using docker images
Could you provided us your commands/code that you used to send a meassure?
From my self, I tested it and it works great:
Curl commands used to send a meassure:
#!/usr/local/bin
mosquitto_pub -t /TEF/sensor03/attrs -m 't|45|c|extreme'
Response from IotAgent-ul:
{"op":"IOTAUL.Executable","time":"2018-09-21T09:59:17.906Z","lvl":"INFO","msg":"Ultralight 2.0 IoT Agent started"}
time=2018-09-21T09:59:32.679Z | lvl=DEBUG | corr=dbbcd94d-50fc-4062-a05b-bccfa76c52c8 | trans=dbbcd94d-50fc-4062-a05b-bccfa76c52c8 | op=IoTAgentNGSI.MongoDBDeviceRegister | srv=n/a | subsrv=n/a | msg=Looking for device with filter [{"id":"sensor03"}]. | comp=IoTAgent
Mongoose: mpromise (mongoose's default promise library) is deprecated, plug in your own promise library instead: http://mongoosejs.com/docs/promises.html
time=2018-09-21T09:59:32.717Z | lvl=ERROR | corr=dbbcd94d-50fc-4062-a05b-bccfa76c52c8 | trans=dbbcd94d-50fc-4062-a05b-bccfa76c52c8 | op=IOTAUL.IoTUtils | srv=n/a | subsrv=n/a | msg=MEASURES-001: Couldn't find device data for APIKey [TEF] and DeviceId[sensor03] | comp=IoTAgent
time=2018-09-21T09:59:32.717Z | lvl=ERROR | corr=dbbcd94d-50fc-4062-a05b-bccfa76c52c8 | trans=dbbcd94d-50fc-4062-a05b-bccfa76c52c8 | op=IOTAUL.Common.Binding | srv=n/a | subsrv=n/a | msg=MEASURES-005: Error before processing device measures [/TEF/sensor03/attrs] | comp=IoTAgent
time=2018-09-21T10:09:51.484Z | lvl=DEBUG | corr=dbbcd94d-50fc-4062-a05b-bccfa76c52c8 | trans=dbbcd94d-50fc-4062-a05b-bccfa76c52c8 | op=IoTAgentNGSI.MongoDBDeviceRegister | srv=n/a | subsrv=n/a | msg=Looking for device with filter [{"id":"sensor03"}]. | comp=IoTAgent
time=2018-09-21T10:09:51.504Z | lvl=ERROR | corr=dbbcd94d-50fc-4062-a05b-bccfa76c52c8 | trans=dbbcd94d-50fc-4062-a05b-bccfa76c52c8 | op=IOTAUL.IoTUtils | srv=n/a | subsrv=n/a | msg=MEASURES-001: Couldn't find device data for APIKey [TEF] and DeviceId[sensor03] | comp=IoTAgent
time=2018-09-21T10:09:51.509Z | lvl=ERROR | corr=dbbcd94d-50fc-4062-a05b-bccfa76c52c8 | trans=dbbcd94d-50fc-4062-a05b-bccfa76c52c8 | op=IOTAUL.Common.Binding | srv=n/a | subsrv=n/a | msg=MEASURES-005: Error before processing device measures [/TEF/sensor03/attrs] | comp=IoTAgent
Show data from MongoDB
root#727724bdd3d9:/# mongo --shell
MongoDB shell version: 3.2.21
connecting to: test
type "help" for help
Welcome to the MongoDB shell.
For interactive help, type "help".
For more comprehensive documentation, see
http://docs.mongodb.org/
Questions? Try the support group
http://groups.google.com/group/mongodb-user
> show dbs
iotagentul 0.000GB
local 0.000GB
orion 0.000GB
It seems to me that you have something wrong about your config set up. Please provide us all the points before comment and for a nice follow up, could you open it in the Github site ? IotAgent-UL Take up there
Thanks,
Fernando Méndez - Research Junior Software Engineer

Cygnus not presisting data on MySql database

So i have read all the documentation and followed the tutorial on MySQL persistence but i can't still presist any kind of data on MySQL database.
Even though i'm puting the presistence mode = row it doesn't create any database nor table.
What am i doing wrong?
My Subscription:
python2.7 SetSubscription.py bustest4 http://localhost:5050/notify
Output:
* Asking to http://localhost:1026/v1/subscribeContext
* Headers: {'Fiware-Service': 'fiwaretestapi', 'content-type': 'application/json ', 'accept': 'application/json', 'X-Auth-Token': 'NULL'}
* Sending PAYLOAD:
{
"reference": "http://localhost:5050/notify",
"throttling": "PT5S",
"entities": [
{
"type": "",
"id": "bustest4",
"isPattern": "false"
}
],
"attributes": [
"temperature"
],
"duration": "P1M",
"notifyConditions": [
{
"condValues": [
"temperature"
],
"type": "ONCHANGE"
}
]
}
...
* Status Code: 200
{
"subscribeResponse" : {
"subscriptionId" : "5567332298add18cc3e183ac",
"duration" : "P1M",
"throttling" : "PT5S"
}
}
My agent_a1.conf:
#=============================================
# source configuration
# channel name where to write the notification events
cygnusagent.sources.http-source.channels = hdfs-channel mysql-channel 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 = es.tid.fiware.fiwareconnectors.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 = fiwaretestapi
# Default service path (service path semantic depends on the persistence sink)
cygnusagent.sources.http-source.handler.default_service_path = /
# 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 de
# Timestamp interceptor, do not change
cygnusagent.sources.http-source.interceptors.ts.type = timestamp
# Destination extractor interceptor, do not change
cygnusagent.sources.http-source.interceptors.de.type = es.tid.fiware.fiwareconnectors.cygnus.interceptors.DestinationExtractor$Builder
# Matching table for the destination extractor interceptor, put the right absolute path to the file if necessary
# See the doc/design/interceptors document for more details
cygnusagent.sources.http-source.interceptors.de.matching_table = /usr/cygnus/conf/matching_table.conf
# ============================================
# OrionMySQLSink configuration
# channel name from where to read notification events
cygnusagent.sinks.mysql-sink.channel = mysql-channel
# sink class, must not be changed
cygnusagent.sinks.mysql-sink.type = es.tid.fiware.fiwareconnectors.cygnus.sinks.OrionMySQLSink
# the FQDN/IP address where the MySQL server runs
cygnusagent.sinks.mysql-sink.mysql_host = localhost
# the port where the MySQL server listes for incomming connections
cygnusagent.sinks.mysql-sink.mysql_port = 3306
# a valid user in the MySQL server
cygnusagent.sinks.mysql-sink.mysql_username = root
# password for the user above
cygnusagent.sinks.mysql-sink.mysql_password = ***********
# how the attributes are stored, either per row either per column (row, column)
cygnusagent.sinks.mysql-sink.attr_persistence = row
#=============================================
# mysql-channel configuration
# channel type (must not be changed)
cygnusagent.channels.mysql-channel.type = memory
# capacity of the channel
cygnusagent.channels.mysql-channel.capacity = 1000
# amount of bytes that can be sent per transaction
cygnusagent.channels.mysql-channel.transactionCapacity = 100
My cygnus_instance_c1.conf:
# Who to run cygnus as. Note that you may need to use root if you want
# to run cygnus in a privileged port (<1024)
CYGNUS_USER=root
# Where is the config folder
CONFIG_FOLDER=/usr/cygnus/conf
# Which is the config file
CONFIG_FILE=/usr/cygnus/conf/agent_a1.conf
# Name of the agent. The name of the agent is not trivial, since it is the base for the Flume parameters
# naming conventions, e.g. it appears in .sources.http-source.channels=...
AGENT_NAME=cygnususer
# Name of the logfile located at /var/log/cygnus. It is important to put the extension '.log' in order to the log rotation works properly
LOGFILE_NAME=cygnus.log
# Administration port. Must be unique per instance
ADMIN_PORT=8081
My cygnus.log:
Info: Sourcing environment configuration script /usr/cygnus/conf/flume-env.sh
Warning: JAVA_HOME is not set!
+ exec /usr/bin/java -Xmx20m -Dflume.log.file=cygnus.log -cp '/usr/cygnus/conf:/usr/cygnus/lib/*:/usr/cygnus/plugins.d/cygnus/lib/*:/usr/cygnus/plugins.d/cygnus/libext/*' -Djava.library.path= es.tid.fiware.fiwareconnectors.cygnus.nodes.CygnusApplication -p 8081 -f /usr/cygnus/conf/agent_a1.conf -n root
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.7.1-jar-with-dependencies.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
EDIT:
So after some changes i got the log file to work and i found out that the 8081 port was already in use. Can you explain me what the ADMIN_PORT is used for, what port is it recommended to be?
LOG FILE:
02 Jun 2015 05:16:40,680 INFO [conf-file-poller-0] (org.apache.flume.node.PollingPropertiesFileConfigurationProvider$FileWatcherRunnable.run:133) - Reloading configuration file:/usr/cygnus/conf/agent_a1.conf
02 Jun 2015 05:16:40,685 INFO [conf-file-poller-0] (org.apache.flume.conf.FlumeConfiguration$AgentConfiguration.addProperty:1016) - Processing:mysql-sink
02 Jun 2015 05:16:40,686 INFO [conf-file-poller-0] (org.apache.flume.conf.FlumeConfiguration$AgentConfiguration.addProperty:1016) - Processing:mysql-sink
02 Jun 2015 05:16:40,686 INFO [conf-file-poller-0] (org.apache.flume.conf.FlumeConfiguration$AgentConfiguration.addProperty:930) - Added sinks: mysql-sink Agent: cygnusagent
02 Jun 2015 05:16:40,686 INFO [conf-file-poller-0] (org.apache.flume.conf.FlumeConfiguration$AgentConfiguration.addProperty:1016) - Processing:mysql-sink
02 Jun 2015 05:16:40,687 INFO [conf-file-poller-0] (org.apache.flume.conf.FlumeConfiguration$AgentConfiguration.addProperty:1016) - Processing:mysql-sink
02 Jun 2015 05:16:40,687 INFO [conf-file-poller-0] (org.apache.flume.conf.FlumeConfiguration$AgentConfiguration.addProperty:1016) - Processing:mysql-sink
02 Jun 2015 05:16:40,687 INFO [conf-file-poller-0] (org.apache.flume.conf.FlumeConfiguration$AgentConfiguration.addProperty:1016) - Processing:mysql-sink
02 Jun 2015 05:16:40,687 INFO [conf-file-poller-0] (org.apache.flume.conf.FlumeConfiguration$AgentConfiguration.addProperty:1016) - Processing:mysql-sink
02 Jun 2015 05:16:40,692 INFO [conf-file-poller-0] (org.apache.flume.conf.FlumeConfiguration.validateConfiguration:140) - Post-validation flume configuration contains configuration for agents: [cygnusagent]
02 Jun 2015 05:16:40,692 WARN [conf-file-poller-0] (org.apache.flume.node.AbstractConfigurationProvider.getConfiguration:138) - No configuration found for this host:root
02 Jun 2015 05:16:40,693 INFO [conf-file-poller-0] (org.apache.flume.node.Application.stopAllComponents:101) - Shutting down configuration: { sourceRunners:{} sinkRunners:{} channels:{} }
02 Jun 2015 05:16:40,693 INFO [conf-file-poller-0] (org.apache.flume.node.Application.startAllComponents:138) - Starting new configuration:{ sourceRunners:{} sinkRunners:{} channels:{} }
02 Jun 2015 05:16:40,694 INFO [conf-file-poller-0] (es.tid.fiware.fiwareconnectors.cygnus.nodes.CygnusApplication.startManagementInterface:85) - Starting a Jetty server listening on port 8081 (Management Interface)
02 Jun 2015 05:16:40,695 INFO [conf-file-poller-0] (org.apache.flume.node.Application.stopAllComponents:101) - Shutting down configuration: { sourceRunners:{} sinkRunners:{} channels:{} }
02 Jun 2015 05:16:40,695 INFO [conf-file-poller-0] (org.apache.flume.node.Application.startAllComponents:138) - Starting new configuration:{ sourceRunners:{} sinkRunners:{} channels:{} }
02 Jun 2015 05:16:40,695 INFO [conf-file-poller-0] (es.tid.fiware.fiwareconnectors.cygnus.nodes.CygnusApplication.startManagementInterface:85) - Starting a Jetty server listening on port 8081 (Management Interface)
02 Jun 2015 05:16:40,696 INFO [Thread-26] (org.mortbay.log.Slf4jLog.info:67) - jetty-6.1.26
02 Jun 2015 05:16:40,704 WARN [Thread-26] (org.mortbay.log.Slf4jLog.warn:76) - failed SocketConnector#0.0.0.0:8081: java.net.BindException: Address already in use
02 Jun 2015 05:16:40,704 WARN [Thread-26] (org.mortbay.log.Slf4jLog.warn:76) - failed Server#4f1b95f: java.net.BindException: Address already in use
02 Jun 2015 05:16:40,704 FATAL [Thread-26] (es.tid.fiware.fiwareconnectors.cygnus.http.JettyServer.run:63) - Fatal error running the Management Interface. Details=Address already in use
02 Jun 2015 05:16:40,705 INFO [Thread-27] (org.mortbay.log.Slf4jLog.info:67) - jetty-6.1.26
02 Jun 2015 05:16:40,709 WARN [Thread-27] (org.mortbay.log.Slf4jLog.warn:76) - failed SocketConnector#0.0.0.0:8081: java.net.BindException: Address already in use
02 Jun 2015 05:16:40,709 WARN [Thread-27] (org.mortbay.log.Slf4jLog.warn:76) - failed Server#ed4c222: java.net.BindException: Address already in use
02 Jun 2015 05:16:40,709 FATAL [Thread-27] (es.tid.fiware.fiwareconnectors.cygnus.http.JettyServer.run:63) - Fatal error running the Management Interface. Details=Address already in use
EDIT 2:
My script that updates entity on Context Broker:
BASE_URL = 'http://localhost:1026'
UPDATE_URL = BASE_URL+'/ngsi10/updateContext'
HEADERS = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Fiware-Service' : 'fiwaretestapi',
'Fiware-ServicePath': '/'
}
UPDATE_EXAMPLE = {
"contextElements": [
{
"type": "",
"isPattern": "false",
"id": "bustest4",
"attributes": [
{
"name": "temperature",
"type": "int",
"value": "99"
}
]
}
],
"updateAction": "APPEND"
}
def post(url, data):
""""""
req = urllib2.Request(url, data, HEADERS)
f = urllib2.urlopen(req)
result = json.loads(f.read())
f.close()
return result
if __name__ == "__main__":
print post(UPDATE_URL, json.dumps(UPDATE_EXAMPLE))
EDIT3:
Even though i set the admin port to be 8085 on the cygnus agent configuration it tries to bind to the 8081, is that normal?
Here are the logs from the cygnus:
time=2015-06-12T05:56:39.820EDT | lvl=INFO | trans= | function=start | comp=Cygnu s | msg=org.apache.flume.instrumentation.MonitoredCounterGroup[94] : Component ty pe: CHANNEL, name: mysql-channel started
time=2015-06-12T05:56:39.821EDT | lvl=INFO | trans= | function=startAllComponents | comp=Cygnus | msg=org.apache.flume.node.Application[173] : Starting Sink mysql -sink
time=2015-06-12T05:56:39.821EDT | lvl=INFO | trans= | function=startAllComponents | comp=Cygnus | msg=org.apache.flume.node.Application[184] : Starting Source htt p-source
time=2015-06-12T05:56:39.821EDT | lvl=INFO | trans= | function=startManagementInt erface | comp=Cygnus | msg=es.tid.fiware.fiwareconnectors.cygnus.nodes.CygnusAppl ication[85] : Starting a Jetty server listening on port 8081 (Management Interfac e)
time=2015-06-12T05:56:39.822EDT | lvl=INFO | trans= | function=start | comp=Cygnu s | msg=es.tid.fiware.fiwareconnectors.cygnus.sinks.OrionMySQLSink[151] : [mysql- sink] Startup completed
time=2015-06-12T05:56:39.823EDT | lvl=INFO | trans= | function=info | comp=Cygnus | msg=org.mortbay.log.Slf4jLog[67] : jetty-6.1.26
time=2015-06-12T05:56:39.824EDT | lvl=INFO | trans= | function=info | comp=Cygnus | msg=org.mortbay.log.Slf4jLog[67] : jetty-6.1.26
time=2015-06-12T05:56:39.825EDT | lvl=INFO | trans= | function=info | comp=Cygnus | msg=org.mortbay.log.Slf4jLog[67] : Started SocketConnector#0.0.0.0:5050
time=2015-06-12T05:56:39.825EDT | lvl=INFO | trans= | function=start | comp=Cygnu s | msg=org.apache.flume.instrumentation.MonitoredCounterGroup[94] : Component ty pe: SOURCE, name: http-source started
time=2015-06-12T05:56:39.827EDT | lvl=WARN | trans= | function=warn | comp=Cygnus | msg=org.mortbay.log.Slf4jLog[76] : failed SocketConnector#0.0.0.0:8081: java.n et.BindException: Address already in use
time=2015-06-12T05:56:39.827EDT | lvl=WARN | trans= | function=warn | comp=Cygnus | msg=org.mortbay.log.Slf4jLog[76] : failed Server#1c9c5521: java.net.BindExcept ion: Address already in use
time=2015-06-12T05:56:39.827EDT | lvl=FATAL | trans= | function=run | comp=Cygnus | msg=es.tid.fiware.fiwareconnectors.cygnus.http.JettyServer[63] : Fatal error r unning the Management Interface. Details=Address already in use
Log when i make a subscription:
time=2015-06-12T06:03:56.529EDT | lvl=INFO | trans=1434103313-190-0000000000 | fu nction=getEvents | comp=Cygnus | msg=es.tid.fiware.fiwareconnectors.cygnus.handle rs.OrionRestHandler[153] : Starting transaction (1434103313-190-0000000000)
time=2015-06-12T06:03:56.535EDT | lvl=INFO | trans=1434103313-190-0000000000 | fu nction=getEvents | comp=Cygnus | msg=es.tid.fiware.fiwareconnectors.cygnus.handle rs.OrionRestHandler[239] : Received data ({ "subscriptionId" : "557aae8c98add18c c3e183b6", "originator" : "localhost", "contextResponses" : [ { "contex tElement" : { "type" : "thing", "isPattern" : "false", "id" : "autocarro1", "attributes" : [ { "name" : "temperatu re", "type" : "int", "value" : "95", "metadatas" : [ { "name" : "TimeInstant", "type" : "ISO8601", "value" : "2015-06-03T09:17:44.046583Z" } ] } ] }, "statusCode" : { "code" : "200", "reasonPhrase" : "OK" } } ]})
time=2015-06-12T06:03:56.540EDT | lvl=INFO | trans=1434103313-190-0000000000 | fu nction=getEvents | comp=Cygnus | msg=es.tid.fiware.fiwareconnectors.cygnus.handle rs.OrionRestHandler[261] : Event put in the channel (id=1983722072, ttl=10)
time=2015-06-12T06:03:56.724EDT | lvl=INFO | trans=1434103313-190-0000000000 | fu nction=process | comp=Cygnus | msg=es.tid.fiware.fiwareconnectors.cygnus.sinks.Or ionSink[126] : Event got from the channel (id=1983722072, headers={timestamp=1434 103436542, content-type=application/json, transactionId=1434103313-190-0000000000 , fiware-service=fiwaretestapi, fiware-servicepath=, ttl=10, destination=autocarr o1_thing}, bodyLength=657)
time=2015-06-12T06:03:57.260EDT | lvl=INFO | trans=1434103313-190-0000000000 | fu nction=persist | comp=Cygnus | msg=es.tid.fiware.fiwareconnectors.cygnus.sinks.Or ionMySQLSink[227] : [mysql-sink] Persisting data at OrionMySQLSink. Database: fiw aretestapi, Table: autocarro1_thing, Data: 1434103436,2015-06-12T06:03:56.542,aut ocarro1,thing,temperature,thing,95,[{"name":"TimeInstant","type":"ISO8601","value ":"2015-06-03T09:17:44.046583Z"}]
time=2015-06-12T06:03:57.270EDT | lvl=INFO | trans=1434103313-190-0000000000 | fu nction=process | comp=Cygnus | msg=es.tid.fiware.fiwareconnectors.cygnus.sinks.Or ionSink[187] : Finishing transaction (1434103313-190-0000000000)
As I can see in the log, most probably Cygnus is running but not starting any Flume component (any source, channel or sink). This is due to some configuration errors.
Regarding agent_a1.conf file:
It is missing the list of sources, channels and sinks:
cygnusagent.sources = http-source
cygnusagent.sinks = mysql-sink
cygnusagent.channels = mysql-channel
cygnusagent.sources.http-source.channels value should be mysql-channel
Regarding cygnus_instance_c1.conf:
AGENT_NAME value must be cygnusagent
Which version have you installed? Are you reunning Cygnus as a service or as an standalone process?
In adition, you could try to start Cygnus in DEBUG mode? Simply edit the /usr/cygnus/conf/log4j.properties file.
Do the proposed changes and see how the log evolves! :)
EDIT 1
Such a "fatal error" is not so fatal. It was a bug appearing in Cygnus 0.7.1, currently fixed. Anyway, even in 0.7.1 it did not affect the normal behaviour of Cygnus since the management port is only used for retrieving the version, nothing important.
Did you try to send some update context to Orion in order a notification is received by Cygnus? Even by simulating the notification? Please, see the Cygnus Quick Start Guide for an example about how to make such a simulation.
EDIT 2
Cygnus packages names es.tid.fiware.fiwareconnectors.cygnus... were replaced by com.telefonica.iot.cygnus... from release 0.8.0 (or maybe 0.9.0).

Rush not working on my Orion Context Broker

I have deployed an Orion Context Broker v0.20.0 instance using AWS. I'm trying to show an entity from it on the MapViewer widget of the Fiware Lab Wirecloud Mashup.
It seems like I'm having some kind of trouble with the NGSI source operator. I have configured it with:
NGSI server URL: http://MyORionInstanceIP:1026
NGSI proxy URL: https://ngsiproxy.lab.fi-ware.org (I have also tried ngsiproxy.lab.fiware.org)
I run my Conntext broker instance like this: contextBroker -port 1026 -logDir /var/log/contextBroker -pidpath /var/run/contextBroker/contextBroker.pid -dbhost localhost -db orion -t 0-255 -rush localhost:5001, and it works, but when I accept the operator configuration to create the subscription, this is what I read on my Context Broker:
DEBUG#12:07:40 senderThread.cpp[47]: sending to: host='ngsiproxy.lab.fi-ware.org', port=443, verb=POST, tenant='', service-path: '', xauthToken: '', path='/callbacks/14:27:47-1:15:08:34-1', content-type: application/xml
DEBUG#12:07:40 sem.cpp[124]: transactionIdSet taking the 'trans' semaphore for 'changing the transaction id'
DEBUG#12:07:40 sem.cpp[126]: transactionIdSet has the 'trans' semaphore
DEBUG#12:07:40 sem.cpp[181]: transactionIdSet gives the 'trans' semaphore for 'changing the transaction id'
INFO#12:07:40 clientSocketHttp.cpp[154]: Starting transaction to ngsiproxy.lab.fi-ware.org:443/callbacks/14:27:47-1:15:08:34-1
DEBUG#12:07:40 clientSocketHttp.cpp[240]: HTTP-HEADERS: 'X-relayer-host: ngsiproxy.lab.fi-ware.org:443'
DEBUG#12:07:40 clientSocketHttp.cpp[247]: HTTP-HEADERS: 'X-relayer-protocol: https'
DEBUG#12:07:40 clientSocketHttp.cpp[260]: HTTP-HEADERS: 'User-Agent: orion/0.20.0 libcurl/7.19.7'
DEBUG#12:07:40 clientSocketHttp.cpp[268]: HTTP-HEADERS: 'Host: localhost:5001'
DEBUG#12:07:40 clientSocketHttp.cpp[305]: HTTP-HEADERS: 'Content-length: 1141'
DEBUG#12:07:40 clientSocketHttp.cpp[353]: Sending message 18 to HTTP server: sending message of 1370 bytes to HTTP server
WARNING#12:07:40 clientSocketHttp.cpp[358]: Notification failure for localhost:5001 (curl_easy_perform failed: Couldn't connect to server)
INFO#12:07:40 clientSocketHttp.cpp[375]: Transaction ended
I know there is a similar question here, but it hasn't solved my problem so far, neither the Orion documentation.
I really appreciate any help you can provide.
EDIT:
It looks like that rush wasn't event installed, so I did it.
But everytime I try to run the listener it gives me this error:
time=2015-05-07T13:56:17.331Z | lvl=ERROR | op=RESPUSH BUCKET TASKS | msg=Error getting bucket elements | corr=N/A | trans=N/A | hostname=***** | component=retryBuckets | error=[Error: ERR unknown command 'evalsha']
Now, when I accept the operator, this are the traces:
-ORION:
DEBUG#15:04:28 senderThread.cpp[47]: sending to: host='ngsiproxy.lab.fi-ware.org', port=443, verb=POST, tenant='', service-path: '', xauthToken: '', path='/callbacks/13:35:20-1:18:05:22-1', content-type: application/xml
DEBUG#15:04:28 sem.cpp[124]: transactionIdSet taking the 'trans' semaphore for 'changing the transaction id'
DEBUG#15:04:28 sem.cpp[126]: transactionIdSet has the 'trans' semaphore
DEBUG#15:04:28 sem.cpp[181]: transactionIdSet gives the 'trans' semaphore for 'changing the transaction id'
INFO#15:04:28 clientSocketHttp.cpp[154]: Starting transaction to ngsiproxy.lab.fi-ware.org:443/callbacks/13:35:20-1:18:05:22-1
DEBUG#15:04:28 clientSocketHttp.cpp[240]: HTTP-HEADERS: 'X-relayer-host: ngsiproxy.lab.fi-ware.org:443'
DEBUG#15:04:28 clientSocketHttp.cpp[247]: HTTP-HEADERS: 'X-relayer-protocol: https'
DEBUG#15:04:28 clientSocketHttp.cpp[260]: HTTP-HEADERS: 'User-Agent: orion/0.20.0 libcurl/7.19.7'
DEBUG#15:04:28 clientSocketHttp.cpp[268]: HTTP-HEADERS: 'Host: localhost:5001'
DEBUG#15:04:28 clientSocketHttp.cpp[305]: HTTP-HEADERS: 'Content-length: 1141'
DEBUG#15:04:28 clientSocketHttp.cpp[353]: Sending message 1 to HTTP server: sending message of 1370 bytes to HTTP server
INFO#15:04:28 clientSocketHttp.cpp[364]: Notification Successfully Sent to localhost:5001/callbacks/13:35:20-1:18:05:22-1
INFO#15:04:28 clientSocketHttp.cpp[375]: Transaction ended
-Listener:
time=2015-05-07T15:08:12.803Z | lvl=INFO | op=RELAY REQUEST | msg=Relay Request received | corr=N/A | trans=N/A | hostname=Orion-Njoy | component=listener | userID='127.0.0.1' | reqInfo={ url: '/callbacks/13:35:20-1:18:09:06-1', method: 'POST', remoteAddress: '127.0.0.1', headers: { 'x-relayer-host': 'ngsiproxy.lab.fi-ware.org:443', 'x-relayer-protocol': 'https', 'x-relayer-proxy': undefined, 'x-relayer-retry': undefined, 'x-relayer-httpcallback': undefined, 'x-relayer-persistence': undefined, 'x-relayer-traceid': undefined, 'x-relayer-encoding': undefined, 'content-type': 'application/xml' }, responseTime: 1, statusCode: 500, bodyLength: 1141, id: { exceptionId: 'SVR1000', exceptionText: 'Generic Server Error: Error: ERR unknown command \'evalsha\'' } }
time=2015-05-07T15:08:12.803Z | lvl=INFO | op=PERSISTENCE | msg=Persistence Completed | corr=N/A | trans=e1467620-f4ca-11e4-a50f-ebe0dffc0e2e | hostname=Orion-Njoy | component=evPersistence | userID='127.0.0.1' | state='error'
-Consumer:
time=2015-05-07T13:56:17.331Z | lvl=ERROR | op=RESPUSH BUCKET TASKS | msg=Error getting bucket elements | corr=N/A | trans=N/A | hostname=Orion-Njoy | component=retryBuckets | error=[Error: ERR unknown command 'evalsha']
Any ideas, please?
EDIT 2:
I've manage to get it working thanks to the responses. The problem was that I was using redis 2.4, and it's required the 2.6 or supperior version. Now I can see my entities in the Map Viewer.
In case someone runs with the same problem, don't forget to install Rush and follow this instructions to install Redis 2.6:
Thank you all for your assistance.
Maybe the redis version is too old. EVAL/EVALSHA commands were introduced in redis 2.6.
I would check the redis version (>2.6.0)
It seems like the broker is unable to connect to rush, running in the same host and accepting connections on port 5001.
Are you sure rush is running? (and that it is on port 5001?).
The broker doesn't implement notifications (yet) in https itself, but needs rush for this purpose. But of course, rush must be running for this to work ...

mapViewer widget doesn't show map markers

Following my previous question Rush installation and integration with Orion Context Broker I have Rush Relayer working properly, but it still doesn't let me show the markers on the mapViewer.
What I get in my instance is:
INFO#21:01:23 clientSocketHttp.cpp[348]: Notification Successfully Sent to localhost:5001/callbacks/23:01:42-1:23:01:45-1
INFO#21:01:23 clientSocketHttp.cpp[359]: Transaction ended
time=2015-01-14T21:01:23.305Z | lvl=INFO | op=RELAY REQUEST | msg=Relay Request received | corr=N/A | trans=7f1d7e00-9c30-11e4-b26a-090df9e0789f | hostname=fiware | component=listener | userID='127.0.0.1' | reqInfo={ url: '/callbacks/23:01:42-1:23:01:45-1', method: 'POST', remoteAddress: '127.0.0.1', headers: { 'x-relayer-host': 'ngsiproxy.lab.fi-ware.org:443', 'x-relayer-protocol': 'https', 'x-relayer-proxy': undefined, 'x-relayer-retry': undefined, 'x-relayer-httpcallback': undefined, 'x-relayer-persistence': undefined, 'x-relayer-traceid': undefined, 'x-relayer-encoding': undefined, 'content-type': 'application/xml' }, responseTime: 8, statusCode: 201, bodyLength: 3323, id: { id: '7f1d7e00-9c30-11e4-b26a-090df9e0789f' } }
Everything seems to work well but I can't see the markers on the mapViewer.
As far as it is Rush related, it would be important to have the traces at the Consumer process, there we could see if there is any problem with the relay itself. The listener just tell us that Rush has created a relay task.
Could you please post that traces?