Uploaded image for project: 'Help-Desk'
  1. Help-Desk
  2. HELP-3715

FIWARE.Request.Tech.IoT.IDAS.IoTAgentMQTTSegmentationFault

    Details

    • HD-Chapter:
      IoT
    • HD-Enabler:
      IDAS

      Description

      Hello,
      i have downloaded the code from github and compiled the code for the mqtt IoTAgent.
      After that i have build the RPM and installed the Base the UL2.0 and MQTT ones.

      Segmentation Fault on Execute

      ./ini_iotagent.sh: line 2: 4455 Segmentation fault (core dumped) /usr/local/iot/bin/iotagent -i 192.168.2.114 -p 80 -v DEBUG -d /usr/local/iot/lib -c /etc/iot/config.json

      I have tested the mosquitto broker and it is working well with the mosquitto_sub/pub i can see that i receive the payload i send on local mqtt broker.

      i am joining in attach the entire Log of the execution of the IoTAgent.

      This is my ini_iotagent.sh :

      export LD_LIBRARY_PATH=/usr/local/iot/lib
      /usr/local/iot/bin/iotagent -i 192.168.2.114 -p 80 -v DEBUG -d /usr/local/iot/lib -c /etc/iot/config.json
      

      This is my config.json:

      Unable to find source-code formatter for language: json. Available languages are: actionscript, html, java, javascript, none, sql, xhtml, xml
      {
             "resources": [
             {
              "resource": "/iot/kuraResources",
              "options": {
      	    "ConfigFile": "/etc/iot/MqttService.xml",
                  "FileName": "MqttService"
              }
             }
          ],
          "timezones": "/etc/iot/date_time_zonespec.csv",
          "storage": {
            "type": "mongodb",
            "dbname": "iot"
          },
          "ngsi_url": {
             "cbroker": "http://192.168.2.118:1026",
             "updateContext": "/NGSI10/updateContext",
             "registerContext": "/NGSI9/registerContext",
             "queryContext": "/NGSI10/queryContext"
           },
           "timeout": 11,
           "dir_log": "/var/log/"
         }
      

      This is the service i create :

      curl -X POST 'http://192.168.2.114/iot/services' \
      -i \
      -H "Content-Type: application/json" \
      -H "Fiware-Service: kura" \
      -H "Fiware-ServicePath: /kurapath" \
      -d '{"services": [{"apikey": "egmkey", "entity_type": "enocean", "cbroker": "htpp://192.168.2.118:1026", "resource": "/iot/kuraResources" }]}'
      

      Tell me if you need other info.
      But please it has been more than 3 months now i try to get mqtt in IDAS to work, help me!

      I am wiling to make a Skype call /screen share in order to understannnnnnnnnnnn whdat is going wrong. Even a phone call would be great!!

        Activity

        abbas.ahmad Abbas Ahmad created issue -
        Hide
        abbas.ahmad Abbas Ahmad added a comment - - edited

        The segfault apears only when he tries to connect to the MQTT broker.
        This is the Broker Log :

        1438267513: mosquitto version 1.4.2 (build date 2015-05-07 14:36:19+0000) starting
        1438267513: Config loaded from /etc/iot/mosquitto.conf.
        1438267513: Opening ipv4 listen socket on port 1883.
        1438267513: Opening ipv6 listen socket on port 1883.
        [egm@localhost scripts]$ 1438267519: New connection from ::1 on port 1883.
        1438267519: New connection from ::1 on port 1883.
        1438267519: Socket error on client <unknown>, disconnecting.
        1438267519: Socket error on client <unknown>, disconnecting.
        
        Show
        abbas.ahmad Abbas Ahmad added a comment - - edited The segfault apears only when he tries to connect to the MQTT broker. This is the Broker Log : 1438267513: mosquitto version 1.4.2 (build date 2015-05-07 14:36:19+0000) starting 1438267513: Config loaded from /etc/iot/mosquitto.conf. 1438267513: Opening ipv4 listen socket on port 1883. 1438267513: Opening ipv6 listen socket on port 1883. [egm@localhost scripts]$ 1438267519: New connection from ::1 on port 1883. 1438267519: New connection from ::1 on port 1883. 1438267519: Socket error on client <unknown>, disconnecting. 1438267519: Socket error on client <unknown>, disconnecting.
        Hide
        abbas.ahmad Abbas Ahmad added a comment -

        This is a view of the execution of IoT agent when the MQTT broker is not launched :

        DEBUG - | op=find | file=[139973757273856:collection.cc:704] | msg=Collection:find bbdd=iot.DEVICE query={ service: "kura", service_path: "/kurapath", protocol: "PDI-IoTA-MQTT-UltraLight" } limit=0 offset=0 options=16
        DEBUG - | op=find | file=[139973757273856:collection.cc:718] | msg=before getConnection
        DEBUG - | op=find | file=[139973757273856:collection.cc:723] | msg=before query
        30-07-2015 11:10:39 [DEBUG] : Trying to reconnect
        INFO - | op=find | file=[139973757273856:collection.cc:743] | msg=error: NO DATA  iot.DEVICE: { service: "kura", service_path: "/kurapath", protocol: "PDI-IoTA-MQTT-UltraLight" }
        DEBUG - | op=send_all_registrations_from_mongo | file=[139973757273856:command_handle.cc:604] | msg=END Registrations 
        INFO - Starting thread scheduler
        DEBUG - | op=get_info_agent | file=[139973832455936:admin_service.cc:1420] | msg=Stats /iot
        DEBUG - | op=get_statistics | file=[139973832455936:rest_handle.cc:635] | msg=Get statistics /iot Counters 0
        DEBUG - | op=get_statistics | file=[139973832455936:rest_handle.cc:635] | msg=Get statistics /iot/kuraResources Counters 0
        DEBUG - | op=get_statistics | file=[139973832455936:rest_handle.cc:635] | msg=Get statistics /iot/ngsi Counters 0
        INFO - | op=check_logs | file=[139973832455936:admin_service.cc:2304] | msg=Agent Activity {"statistics":[{"resource":"/iot","data":[]},{"resource":"/iot/kuraResources","data":[]},{"resource":"/iot/ngsi","data":[]}]}
        30-07-2015 11:10:40 [DEBUG] : Trying to reconnect
        30-07-2015 11:10:41 [DEBUG] : Trying to reconnect
        30-07-2015 11:10:42 [DEBUG] : Trying to reconnect
        30-07-2015 11:10:43 [DEBUG] : Trying to reconnect
        30-07-2015 11:10:44 [DEBUG] : Trying to reconnect
        30-07-2015 11:10:45 [DEBUG] : Trying to reconnect
        30-07-2015 11:10:46 [DEBUG] : Trying to reconnect
        30-07-2015 11:10:47 [DEBUG] : Trying to reconnect
        30-07-2015 11:10:48 [DEBUG] : Trying to reconnect
        30-07-2015 11:10:49 [DEBUG] : Trying to reconnect
        30-07-2015 11:10:50 [DEBUG] : Trying to reconnect
        30-07-2015 11:10:51 [DEBUG] : Trying to reconnect
        30-07-2015 11:10:52 [DEBUG] : Trying to reconnect
        30-07-2015 11:10:53 [DEBUG] : Trying to reconnect
        30-07-2015 11:10:54 [DEBUG] : Trying to reconnect
        30-07-2015 11:10:55 [DEBUG] : Trying to reconnect
        30-07-2015 11:10:56 [DEBUG] : Trying to reconnect
        30-07-2015 11:10:57 [DEBUG] : Trying to reconnect
        30-07-2015 11:10:58 [DEBUG] : Trying to reconnect
        30-07-2015 11:10:59 [DEBUG] : Trying to reconnect
        30-07-2015 11:11:00 [DEBUG] : Trying to reconnect
        30-07-2015 11:11:01 [DEBUG] : Trying to reconnect
        30-07-2015 11:11:02 [DEBUG] : Trying to reconnect
        30-07-2015 11:11:03 [DEBUG] : Trying to reconnect
        30-07-2015 11:11:04 [DEBUG] : Trying to reconnect
        30-07-2015 11:11:05 [DEBUG] : Trying to reconnect
        30-07-2015 11:11:06 [DEBUG] : Trying to reconnect
        30-07-2015 11:11:07 [DEBUG] : Trying to reconnect
        30-07-2015 11:11:08 [DEBUG] : Trying to reconnect
        30-07-2015 11:11:09 [DEBUG] : Trying to reconnect
        30-07-2015 11:11:10 [DEBUG] : Trying to reconnect
        30-07-2015 11:11:11 [DEBUG] : Trying to reconnect
        30-07-2015 11:11:12 [DEBUG] : Trying to reconnect
        30-07-2015 11:11:13 [DEBUG] : Trying to reconnect
        30-07-2015 11:11:14 [DEBUG] : Trying to reconnect
        30-07-2015 11:11:15 [DEBUG] : Trying to reconnect
        30-07-2015 11:11:16 [DEBUG] : Trying to reconnect
        30-07-2015 11:11:17 [DEBUG] : Trying to reconnect
        30-07-2015 11:11:18 [DEBUG] : Trying to reconnect
        30-07-2015 11:11:19 [DEBUG] : Trying to reconnect
        30-07-2015 11:11:20 [DEBUG] : Trying to reconnect
        30-07-2015 11:11:21 [DEBUG] : Trying to reconnect
        
        
        Show
        abbas.ahmad Abbas Ahmad added a comment - This is a view of the execution of IoT agent when the MQTT broker is not launched : DEBUG - | op=find | file=[139973757273856:collection.cc:704] | msg=Collection:find bbdd=iot.DEVICE query={ service: "kura", service_path: "/kurapath", protocol: "PDI-IoTA-MQTT-UltraLight" } limit=0 offset=0 options=16 DEBUG - | op=find | file=[139973757273856:collection.cc:718] | msg=before getConnection DEBUG - | op=find | file=[139973757273856:collection.cc:723] | msg=before query 30-07-2015 11:10:39 [DEBUG] : Trying to reconnect INFO - | op=find | file=[139973757273856:collection.cc:743] | msg=error: NO DATA iot.DEVICE: { service: "kura", service_path: "/kurapath", protocol: "PDI-IoTA-MQTT-UltraLight" } DEBUG - | op=send_all_registrations_from_mongo | file=[139973757273856:command_handle.cc:604] | msg=END Registrations INFO - Starting thread scheduler DEBUG - | op=get_info_agent | file=[139973832455936:admin_service.cc:1420] | msg=Stats /iot DEBUG - | op=get_statistics | file=[139973832455936:rest_handle.cc:635] | msg=Get statistics /iot Counters 0 DEBUG - | op=get_statistics | file=[139973832455936:rest_handle.cc:635] | msg=Get statistics /iot/kuraResources Counters 0 DEBUG - | op=get_statistics | file=[139973832455936:rest_handle.cc:635] | msg=Get statistics /iot/ngsi Counters 0 INFO - | op=check_logs | file=[139973832455936:admin_service.cc:2304] | msg=Agent Activity {"statistics":[{"resource":"/iot","data":[]},{"resource":"/iot/kuraResources","data":[]},{"resource":"/iot/ngsi","data":[]}]} 30-07-2015 11:10:40 [DEBUG] : Trying to reconnect 30-07-2015 11:10:41 [DEBUG] : Trying to reconnect 30-07-2015 11:10:42 [DEBUG] : Trying to reconnect 30-07-2015 11:10:43 [DEBUG] : Trying to reconnect 30-07-2015 11:10:44 [DEBUG] : Trying to reconnect 30-07-2015 11:10:45 [DEBUG] : Trying to reconnect 30-07-2015 11:10:46 [DEBUG] : Trying to reconnect 30-07-2015 11:10:47 [DEBUG] : Trying to reconnect 30-07-2015 11:10:48 [DEBUG] : Trying to reconnect 30-07-2015 11:10:49 [DEBUG] : Trying to reconnect 30-07-2015 11:10:50 [DEBUG] : Trying to reconnect 30-07-2015 11:10:51 [DEBUG] : Trying to reconnect 30-07-2015 11:10:52 [DEBUG] : Trying to reconnect 30-07-2015 11:10:53 [DEBUG] : Trying to reconnect 30-07-2015 11:10:54 [DEBUG] : Trying to reconnect 30-07-2015 11:10:55 [DEBUG] : Trying to reconnect 30-07-2015 11:10:56 [DEBUG] : Trying to reconnect 30-07-2015 11:10:57 [DEBUG] : Trying to reconnect 30-07-2015 11:10:58 [DEBUG] : Trying to reconnect 30-07-2015 11:10:59 [DEBUG] : Trying to reconnect 30-07-2015 11:11:00 [DEBUG] : Trying to reconnect 30-07-2015 11:11:01 [DEBUG] : Trying to reconnect 30-07-2015 11:11:02 [DEBUG] : Trying to reconnect 30-07-2015 11:11:03 [DEBUG] : Trying to reconnect 30-07-2015 11:11:04 [DEBUG] : Trying to reconnect 30-07-2015 11:11:05 [DEBUG] : Trying to reconnect 30-07-2015 11:11:06 [DEBUG] : Trying to reconnect 30-07-2015 11:11:07 [DEBUG] : Trying to reconnect 30-07-2015 11:11:08 [DEBUG] : Trying to reconnect 30-07-2015 11:11:09 [DEBUG] : Trying to reconnect 30-07-2015 11:11:10 [DEBUG] : Trying to reconnect 30-07-2015 11:11:11 [DEBUG] : Trying to reconnect 30-07-2015 11:11:12 [DEBUG] : Trying to reconnect 30-07-2015 11:11:13 [DEBUG] : Trying to reconnect 30-07-2015 11:11:14 [DEBUG] : Trying to reconnect 30-07-2015 11:11:15 [DEBUG] : Trying to reconnect 30-07-2015 11:11:16 [DEBUG] : Trying to reconnect 30-07-2015 11:11:17 [DEBUG] : Trying to reconnect 30-07-2015 11:11:18 [DEBUG] : Trying to reconnect 30-07-2015 11:11:19 [DEBUG] : Trying to reconnect 30-07-2015 11:11:20 [DEBUG] : Trying to reconnect 30-07-2015 11:11:21 [DEBUG] : Trying to reconnect
        mev Manuel Escriche made changes -
        Field Original Value New Value
        Issue Type eRequest [ 10101 ] extRequest [ 10104 ]
        Workflow FW eRequest Workflow [ 33763 ] FW extRequest Workflow-II [ 33763 ]
        mev Manuel Escriche made changes -
        Assignee Manuel Escriche [ mev ] Carlos Ralli Ucendo [ ralli ]
        ralli Carlos Ralli Ucendo made changes -
        Summary [IDAS][IoTAgent][MQTT] Segmentation Fault FIWARE.Request.Lab.IoT.IDAS.IoTAgentMQTTSegmentationFault
        ralli Carlos Ralli Ucendo made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        Hide
        ralli Carlos Ralli Ucendo added a comment -

        Hi,

        Let me pass this to the development team.

        However, because the vacations season the answer may come a bit later than expected.

        Thanks for using IDAS and hope we can address this ASAP.

        Cheers,

        Show
        ralli Carlos Ralli Ucendo added a comment - Hi, Let me pass this to the development team. However, because the vacations season the answer may come a bit later than expected. Thanks for using IDAS and hope we can address this ASAP. Cheers,
        Hide
        ralli Carlos Ralli Ucendo added a comment -

        Hi,

        I have just realized that this issue was already solved by our dev team and you confirmed that in the following e-mail:

        ******************************************************************************************************
        De: "Abbas Ahmad (EGM)" <abbas.ahmad@eglobalmark.com>
        Fecha: miércoles, 5 de agosto de 2015 12:43
        Para: DAVID GUTIERREZ FERNANDEZ <david.gutierrezfernandez@telefonica.com>, AGUSTIN GONZALEZ LUCAS <agustin.gonzalezlucas@telefonica.com>, JOSE MANUEL CANTERA FONSECA <josemanuel.canterafonseca@telefonica.com>
        CC: Carlos Ralli <carlos.ralliucendo@telefonica.com>, Franck Le Gall <franck.le-gall@eglobalmark.com>
        Asunto: RE: TR: FYI : Jira Ticket on MQTT Segfault

        Thanks to David we resolved the issue.

        It is now working. You can close the jira ticket.

        -oo-Ô-oo-
        Abbas AHMAD
        Phd Student at Easy Global Market (EGM)
        University of Franche-Comte, Femto-ST
        +33 (0) 6 47 56 85 94
        ******************************************************************************************************

        Therefore, I close the ticket.

        Thanks for using IDAS!
        Cheers,

        Show
        ralli Carlos Ralli Ucendo added a comment - Hi, I have just realized that this issue was already solved by our dev team and you confirmed that in the following e-mail: ****************************************************************************************************** De: "Abbas Ahmad (EGM)" <abbas.ahmad@eglobalmark.com> Fecha: miércoles, 5 de agosto de 2015 12:43 Para: DAVID GUTIERREZ FERNANDEZ <david.gutierrezfernandez@telefonica.com>, AGUSTIN GONZALEZ LUCAS <agustin.gonzalezlucas@telefonica.com>, JOSE MANUEL CANTERA FONSECA <josemanuel.canterafonseca@telefonica.com> CC: Carlos Ralli <carlos.ralliucendo@telefonica.com>, Franck Le Gall <franck.le-gall@eglobalmark.com> Asunto: RE: TR: FYI : Jira Ticket on MQTT Segfault Thanks to David we resolved the issue. It is now working. You can close the jira ticket. - oo-Ô-oo - Abbas AHMAD Phd Student at Easy Global Market (EGM) University of Franche-Comte, Femto-ST +33 (0) 6 47 56 85 94 ****************************************************************************************************** Therefore, I close the ticket. Thanks for using IDAS! Cheers,
        ralli Carlos Ralli Ucendo made changes -
        Status In Progress [ 3 ] Answered [ 10104 ]
        ralli Carlos Ralli Ucendo made changes -
        Fix Version/s Sprint 4.1.3 [ 10739 ]
        ralli Carlos Ralli Ucendo made changes -
        Resolution Done [ 10000 ]
        Status Answered [ 10104 ] Closed [ 6 ]
        Hide
        ralli Carlos Ralli Ucendo added a comment -

        Just for your information:

        The RPMs you must install are :

        mosquitto-1.2.3-1.1.x86_64
        libmosquittopp1-1.2.3-1.1.x86_64
        libmosquitto1-1.2.3-1.1.x86_64

        Links are in this doc:
        https://github.com/telefonicaid/fiware-IoTAgent-Cplusplus/blob/develop/doc/MQTT_protocol.md

        Cheers,

        Show
        ralli Carlos Ralli Ucendo added a comment - Just for your information: The RPMs you must install are : mosquitto-1.2.3-1.1.x86_64 libmosquittopp1-1.2.3-1.1.x86_64 libmosquitto1-1.2.3-1.1.x86_64 Links are in this doc: https://github.com/telefonicaid/fiware-IoTAgent-Cplusplus/blob/develop/doc/MQTT_protocol.md Cheers,
        mev Manuel Escriche made changes -
        Summary FIWARE.Request.Lab.IoT.IDAS.IoTAgentMQTTSegmentationFault FIWARE.Request.Tech.IoT.IDAS.IoTAgentMQTTSegmentationFault
        mev Manuel Escriche made changes -
        HD-Enabler IDAS [ 10884 ]
        HD-Chapter IoT [ 10839 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open In Progress In Progress
        24d 19h 1m 1 Carlos Ralli Ucendo 24/Aug/15 11:33 AM
        In Progress In Progress Answered Answered
        21h 44m 1 Carlos Ralli Ucendo 25/Aug/15 9:17 AM
        Answered Answered Closed Closed
        20s 1 Carlos Ralli Ucendo 25/Aug/15 9:18 AM

          People

          • Assignee:
            ralli Carlos Ralli Ucendo
            Reporter:
            abbas.ahmad Abbas Ahmad
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: