[Backlogmanager] [FIWARE-JIRA] (HELP-19980) [fiware-stackoverflow] FIWARE IoTAgent-ul and IoTAgent-json error log

Jason Fox (JIRA) jira-help-desk at jira.fiware.org
Tue Oct 11 10:14:00 CEST 2022


    [ https://jira.fiware.org/browse/HELP-19980?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=115899#comment-115899 ] 

Jason Fox commented on HELP-19980:
----------------------------------

This was an issue fixed in a release. The answer is in the comments on Stack Overflow.

> [fiware-stackoverflow] FIWARE IoTAgent-ul and IoTAgent-json error log
> ---------------------------------------------------------------------
>
>                 Key: HELP-19980
>                 URL: https://jira.fiware.org/browse/HELP-19980
>             Project: Help-Desk
>          Issue Type: Monitor
>          Components: FIWARE-TECH-HELP
>            Reporter: Backlog Manager
>            Assignee: Jason Fox
>              Labels: docker-compose, fiware, fiware-orion, http, mqtt
>
> Created question in FIWARE Q/A platform on 23-08-2022 at 12:08
> {color: red}Please, ANSWER this question AT{color} https://stackoverflow.com/questions/73458778/fiware-iotagent-ul-and-iotagent-json-error-log
> +Question:+
> FIWARE IoTAgent-ul and IoTAgent-json error log
> +Description:+
> there are two existing IoT agents in our application, one is iotagent-ul(over HTTP), another is lwm2m-iotagent(over HTTP). Recently in order to integrate new sensors, I need to add a new iotagent-json(over MQTT). After bringing up the system, there is some strange error log as I pasted at the end:
> (1) iotagent-ul is over HTTP, IOTA_DEFAULT_TRANSPORT is not defined in iotagent-ul, just use the default value HTTP, but iotagent-ul always complains that "Couldn't connect with MQTT broker" and "Error: Callback was already called", why will iotagent-ul try to connect MQTT broker?
> (2) iotagent-json is defined with IOTA_DEFAULT_TRANSPORT=MQTT, but it also reports a error for IOTAJSON.AMQP.Binding, should I just ignore it?
> These containers can run up, but an endless error log is thrown out in the console. BTW, before adding the new iotagent-json, these two previous iotagent-ul and lwm2m-iotagent can work properly.
> Could you help me view the error info and the IoT agents definition in yml? Any comments are appreciated, thank you very much.
> 1 The services defined in docker-compose.yml file:
> # IoT Agents ##################################################################
>   iot-agent-ul:
>     image: fiware/iotagent-ul
>     hostname: iot-agent-ul
>     container_name: fiware-iot-agent-ul
>     depends_on:
>       - mongo-db
>     networks:
>       - default
>     expose:
>       - "4041"
>       - "7896"
>     ports:
>       - "4041:4041"
>       - "7896:7896"
>     environment:
>       - "IOTA_CB_HOST=orion" # name of the context broker to update context
>       - "IOTA_CB_PORT=1026" # port the context broker listens on to update context
>       - "IOTA_CB_NGSI_VERSION=v2" # NGSI version to use
>       - "IOTA_NORTH_PORT=4041" # port for devices provisioning
>       - "IOTA_REGISTRY_TYPE=mongodb" #Whether to hold IoT device info in memory or in a database
>       - "IOTA_LOG_LEVEL=ERROR" #The log level of the IoT Agent
>       - "IOTA_TIMESTAMP=true" # whether to include or not the timestamp
>       - "IOTA_MONGO_HOST=mongo-db" # The host name of MongoDB
>       - "IOTA_MONGO_PORT=27017" # The port mongoDB is listening on
>       - "IOTA_MONGO_DB=iotagentul" # The name of the database used in mongoDB
>       - "IOTA_HTTP_PORT=7896" # The port used for device traffic over HTTP
>       - "IOTA_PROVIDER_URL=http://iot-agent-ul:4041" # URL of the agent
>       - "IOTA_AUTOCAST=true" # autocasting of values into NGSI standard
>   iot-agent-lwm2m:
>     image: hopu/lwm2m-iotagent:observe-and-read
>     hostname: iot-agent-lwm2m
>     container_name: fiware-iot-agent-lwm2m
>     expose:
>       - "4042"
>       - "5683"
>     ports:
>       - "4042:4042"
>       - "5683:5683/udp"
>     environment:
>       - "IOTA_CB_HOST=orion" # name of the context broker to update context
>       - "IOTA_CB_PORT=1026" # port the context broker listens on to update context
>       - "IOTA_NORTH_PORT=4042" # port for devices provisioning
>       - "IOTA_REGISTRY_TYPE=mongodb" # whether to hold IoT device info in memory or in a database
>       - "IOTA_LOG_LEVEL=ERROR" #The log level of the IoT Agent
>       - "IOTA_TIMESTAMP=true" # whether to include or not the timestamp
>       - "IOTA_MONGO_HOST=mongo-db" # The host name of MongoDB
>       - "IOTA_MONGO_PORT=27017" # The port mongoDB is listening on
>       - "IOTA_MONGO_DB=iotagentlwm2m" # The name of the database used in mongoDB
>       - "IOTA_HTTP_PORT=5683" # The port used for device traffic over HTTP
>       - "IOTA_PROVIDER_URL=http://iot-agent-lwm2m:4042" # URL of the agent
>       - "IOTA_AUTOCAST=true" # autocasting of values into NGSI standard
>     volumes:
>       - "./iota-lwm2m/config.js:/opt/iota-lwm2m/config.js"
>       - "./iota-lwm2m/omaRegistry.json:/opt/iota-lwm2m/omaRegistry.json"
>       - "./iota-lwm2m/omaInverseRegistry.json:/opt/iota-lwm2m/omaInverseRegistry.json"
>     restart: on-failure
>     depends_on:
>       - mongo-db
>       - orion
>     networks:
>       - default
>   iot-agent-json:
>     image: fiware/iotagent-json:latest
>     hostname: iot-agent-json
>     container_name: fiware-iot-agent-json
>     depends_on:
>         - mongo-db
>         - mosquitto
>     expose:
>         - "4043"
>         - "7896"                          # No traffic,7896 is the http listening port for sensors
>     ports:
>         - "4043:4043"
>         - "7898:7898"                     # No traffic
>     environment:
>       - "IOTA_CB_HOST=orion"              # name of the context broker to update context
>       - "IOTA_CB_PORT=1026"               # port the context broker listens on to update context
>       - "IOTA_NORTH_PORT=4043"            # port for devices provisioning
>       - "IOTA_REGISTRY_TYPE=mongodb"      # Whether to hold IoT device info in memory or in a database
>       - "IOTA_LOG_LEVEL=DEBUG"            # The log level of the IoT Agent
>       - "IOTA_TIMESTAMP=true"             # whether to include or not the timestamp
>       - "IOTA_CB_NGSI_VERSION=v2"         # NGSI version to use
>       - "IOTA_AUTOCAST=true"              # autocasting of values into NGSI standard
>       - "IOTA_MONGO_HOST=mongo-db"        # The host name of MongoDB
>       - "IOTA_MONGO_PORT=27017"           # The port mongoDB is listening on
>       - "IOTA_MONGO_DB=iotagentjson"      # The name of the database used in mongoDB
>       - "IOTA_HTTP_PORT=7898"             # The port used for device traffic over HTTP
>       - "IOTA_PROVIDER_URL=http://iot-agent:4043" # URL of the agent
>       - "IOTA_DEFAULT_RESOURCE=/iot/json" # IOTA_PROVIDER_URL, the default path the IoT Agent uses listening for JSON measures over HTTP.
>       - "IOTA_MQTT_HOST=mosquitto"        # MQTT broker service
>       - "IOTA_MQTT_PORT=1883"             # MQTT service port
>       - "IOTA_DEFAULT_TRANSPORT=MQTT"     # ---
>       - "IOTA_MQTT_USERNAME=myusername"
>       - "IOTA_MQTT_PASSWORD=mypassword"
>     networks:
>         - default
> 2 After docker containers start-up, some error log printed out:
> fiware-iot-agent-ul | time=2022-08-23T09:19:32.404Z | lvl=ERROR | corr=650cc5a7-e0b0-406a-bb7d-84db422bb0e3 | trans=650cc5a7-e0b0-406a-bb7d-84db422bb0e3 | op=IOTAUL.AMQP.Binding | from=n/a | srv=n/a | subsrv=n/a | msg=connect ECONNREFUSED 127.0.0.1:5672 | comp=IoTAgent
> fiware-iot-agent-ul | time=2022-08-23T09:19:32.405Z | lvl=FATAL | corr=650cc5a7-e0b0-406a-bb7d-84db422bb0e3 | trans=650cc5a7-e0b0-406a-bb7d-84db422bb0e3 | op=IoTAgentNGSI.ContextServer | from=n/a | srv=n/a | subsrv=n/a | msg=GLOBAL-002: Couldn't connect with MQTT broker: {"errno":-111,"code":"ECONNREFUSED","syscall":"connect","address":"127.0.0.1","port":1883} | comp=IoTAgent
> fiware-iot-agent-ul | time=2022-08-23T09:19:32.409Z | lvl=ERROR | corr=n/a | trans=n/a | op=IoTAgentNGSI.DomainControl | from=n/a | srv=n/a | subsrv=n/a | msg=Error: Callback was already called.
> fiware-iot-agent-ul |     at /opt/iotaul/node_modules/async/dist/async.js:969:32
> fiware-iot-agent-ul |     at MqttClient.<anonymous> (/opt/iotaul/lib/bindings/MQTTBinding.js:375:17)
> fiware-iot-agent-ul |     at MqttClient.emit (node:events:539:35)
> fiware-iot-agent-ul |     at MqttClient.emit (node:domain:475:12)
> fiware-iot-agent-ul |     at Socket.streamErrorHandler (/opt/iotaul/node_modules/mqtt/lib/client.js:460:12)
> fiware-iot-agent-ul |     at Socket.emit (node:events:527:28)
> fiware-iot-agent-ul |     at Socket.emit (node:domain:475:12)
> fiware-iot-agent-ul |     at emitErrorNT (node:internal/streams/destroy:157:8)
> fiware-iot-agent-ul |     at emitErrorCloseNT (node:internal/streams/destroy:122:3)
> fiware-iot-agent-ul |     at processTicksAndRejections (node:internal/process/task_queues:83:21) {
> fiware-iot-agent-ul |   domainThrown: true
> fiware-iot-agent-ul | } | comp=IoTAgent
> fiware-iot-agent-ul | time=2022-08-23T09:19:33.425Z | lvl=FATAL | corr=n/a | trans=n/a | op=n/a | from=n/a | srv=n/a | subsrv=n/a | msg=GLOBAL-002: Couldn't connect with MQTT broker: {"errno":-111,"code":"ECONNREFUSED","syscall":"connect","address":"127.0.0.1","port":1883} | comp=IoTAgent
> fiware-iot-agent-ul | time=2022-08-23T09:19:33.426Z | lvl=FATAL | corr=n/a | trans=n/a | op=IoTAgentNGSI.Global | from=n/a | srv=n/a | subsrv=n/a | msg=An unexpected exception has been raised. Ignoring: Error: Callback was already called.
> fiware-iot-agent-ul |     at /opt/iotaul/node_modules/async/dist/async.js:969:32
> fiware-iot-agent-ul |     at MqttClient.<anonymous> (/opt/iotaul/lib/bindings/MQTTBinding.js:375:17)
> fiware-iot-agent-ul |     at MqttClient.emit (node:events:539:35)
> fiware-iot-agent-ul |     at MqttClient.emit (node:domain:475:12)
> fiware-iot-agent-ul |     at Socket.streamErrorHandler (/opt/iotaul/node_modules/mqtt/lib/client.js:460:12)
> fiware-iot-agent-ul |     at Socket.emit (node:events:527:28)
> fiware-iot-agent-ul |     at Socket.emit (node:domain:475:12)
> fiware-iot-agent-ul |     at emitErrorNT (node:internal/streams/destroy:157:8)
> fiware-iot-agent-ul |     at emitErrorCloseNT (node:internal/streams/destroy:122:3)
> fiware-iot-agent-ul |     at processTicksAndRejections (node:internal/process/task_queues:83:21) | comp=IoTAgent
> fiware-iot-agent-json | time=2022-08-23T09:19:35.473Z | lvl=INFO | corr=76c65807-e6f8-4ed0-ab3c-ead581e9d6bd | trans=76c65807-e6f8-4ed0-ab3c-ead581e9d6bd | op=IOTAJSON.MQTT.Binding | from=n/a | srv=n/a | subsrv=n/a | msg=connected | comp=IoTAgent
> fiware-iot-agent-json | time=2022-08-23T09:19:35.486Z | lvl=ERROR | corr=76c65807-e6f8-4ed0-ab3c-ead581e9d6bd | trans=76c65807-e6f8-4ed0-ab3c-ead581e9d6bd | op=IOTAJSON.AMQP.Binding | from=n/a | srv=n/a | subsrv=n/a | msg=connect ECONNREFUSED 127.0.0.1:5672 | comp=IoTAgent



--
This message was sent by Atlassian JIRA
(v6.4.1#64016)


More information about the Backlogmanager mailing list

You can get more information about our cookies and privacy policies clicking on the following links: Privacy policy   Cookies policy