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

Error in IoT Broker on contacting iot discovery

    Details

    • Type: extRequest
    • Status: Closed
    • Priority: Major
    • Resolution: Done
    • Fix Version/s: 2021
    • Component/s: FIWARE-TECH-HELP
    • Labels:
      None

      Description

      i'v delpoyed an iot discovery instance successfully , the " fiware ngsi9
      iot discovery" package . Now , when i forward an successful update to the
      iot Broker for a certain entity (while the entity is registered
      successfully in the iot discovery) , the iot broker doesn't contact either
      the discovery's URL or the context broker URL and only showing in the logs
      this errors.

      2017-02-13 03:31:48 WARN HttpRequester:281 - Unable to connect with the
      URL:http://127.0.0.1:5984/historicalrepository/entity__ahmedov~Room::$
      2017-02-13 03:31:48 ERROR CouchDB:230 - No response from CouchDB!!!
      2017-02-13 03:31:49 INFO SubscriptionStorage:1440 - Check Subscription
      query:org.hsqldb.jdbc.JDBCPreparedStatement@70cc76dc[sql=[( SELECT sub$
      2017-02-13 03:31:49 INFO IotBrokerCore:1394 - Started Contact pub/sub
      broker: http://localhost:8001/ngsi10/
      2017-02-13 03:31:49 INFO FullHttpRequester:90 -
      Sending 'POST' request to URL : http://localhost:8001/ngsi10/updateContext
      POST parameters : {"updateAction":"UPDATE","contextElements":[{"entityId":

      {"id":"ahmedov","type":"Room","isPattern":false}

      ,"domainMetadata":[{$

      2017-02-13 03:31:49 WARN FullHttpRequester:138 - Unable to connect with
      the URL:http://localhost:8001/ngsi10/updateContext. Reason: Connectio$
      2017-02-13 03:31:49 WARN Southbound:644 - Service Unavailable. URL:
      http://localhost:8001/ngsi10/updateContext. Service Unavailable

      although i have configured the the discovery's and the context broker's
      addresses in both fiwarerelease config.xml and the
      iotbroker-runner/iotbroker.conf.default this way

      in the iotbroker.conf.default:

      pub_sub_addr='http://147.27.60.58:1026'
      iotbroker_ngsi9uri='http://212.128.217.119:8080'

      and in the FiwareRelease config.xml this way :

      <entry key="ngsi9Uri">http://212.128.217.119:8080</entry>
      <entry key="ngsi9RemoteUrl">http://212.128.217.119:8080</entry>
      <entry key="pub_sub_addr">http://147.27.60.58:1026</entry>

      is it an error in the configuration itself .. and what could be done in
      this case ?

      Thanks
      Regards

      [Created via e-mail received from: ahmad essam <ahmad.elsayfy@gmail.com>]

        Activity

        Hide
        fcirillo Flavio Cirillo added a comment - - edited

        Hi,

        thanks for trying out the IoT Broker.
        As first I would like to recommend to change the configuration variable into the iotbroker.conf.local and leave the iotbroker.conf.default as the default configuration (https://github.com/Aeronbroker/Aeron#configure-the-iot-broker-with-setup-scripts). This because all the configuration variables in the iotbroker.conf.local will overwrite the configuration variables of the iotbroker.conf.default.
        Furthermore if you set the variables directly in the config.xml, or in one of the others configuration files, those will be reset to the ones specified in the iotbroker.conf.local or in the iotbroker.conf.default everytime the IoT Broker is restarted.

        Regarding the setting of an IoT Consumer of the IoT Broker (such as the Context Broker or whether application which has a role of data sink, see https://github.com/Aeronbroker/Aeron/tree/master/eu.neclab.iotplatform.ngsiemulator#iot-consumer), it should be used the "iotbroker_consumers" variable (see https://github.com/Aeronbroker/Aeron/blob/master/IoTBroker-runner/iotbroker.conf.default#L41):

        # IoT Consumers
        # If more than one, they can be comma-separate. e.g. 'http://localhost:8001,http://localhost:8002'
        # The path needs to include the full path but the final resource. IoT Broker will add only "updateContext".
        iotbroker_consumers='http://localhost:8001/ngsi10/'
        

        Moreover, it seems that there are no issues regarding the IoT Discovery. The latter is contacted by the IoT Broker in case of UpdateContext (https://forge.fiware.org/plugins/mediawiki/wiki/fiware/index.php/FIWARE.ArchitectureDescription.IoT.Backend.IoTBroker#Update_Context_handling) only if the "Association feature" (see https://forge.fiware.org/plugins/mediawiki/wiki/fiware/index.php/FIWARE.ArchitectureDescription.IoT.Backend.IoTBroker#Associations_in_FI-WARE_NGSI) is enabled in the iotbroker.conf.local (by default it is enabled in the iotbroker.conf.default https://github.com/Aeronbroker/Aeron/blob/master/IoTBroker-runner/iotbroker.conf.default#L9):

        iotbroker_association="enabled"
        

        If you do not care using the Association feature, you can disable it in order to improve performances:

        iotbroker_association="disabled"
        

        Finally, from you log it seems that you have the historical agent (https://github.com/Aeronbroker/Aeron/blob/master/doc/historyqueries.md) activated but there are issues with the connection to the big data storage (CouchDB), which is probally not installed:

        2017-02-13 03:31:48 WARN HttpRequester:281 - Unable to connect with the URL:http://127.0.0.1:5984/historicalrepository/entity__ahmedov~Room::$
        2017-02-13 03:31:48 ERROR CouchDB:230 - No response from CouchDB!!!

        If you are not interested in such feature, in order again to improve performances (and avoid such errors in the log), you can disable it by adding the following line to the iotbroker.conf.local:

                   iotbroker_historicalagent="disabled"
        

        Hope this solve all you issues.

        Best Regards
        Flavio

        Show
        fcirillo Flavio Cirillo added a comment - - edited Hi, thanks for trying out the IoT Broker. As first I would like to recommend to change the configuration variable into the iotbroker.conf.local and leave the iotbroker.conf.default as the default configuration ( https://github.com/Aeronbroker/Aeron#configure-the-iot-broker-with-setup-scripts ). This because all the configuration variables in the iotbroker.conf.local will overwrite the configuration variables of the iotbroker.conf.default. Furthermore if you set the variables directly in the config.xml, or in one of the others configuration files, those will be reset to the ones specified in the iotbroker.conf.local or in the iotbroker.conf.default everytime the IoT Broker is restarted. Regarding the setting of an IoT Consumer of the IoT Broker (such as the Context Broker or whether application which has a role of data sink, see https://github.com/Aeronbroker/Aeron/tree/master/eu.neclab.iotplatform.ngsiemulator#iot-consumer ), it should be used the "iotbroker_consumers" variable (see https://github.com/Aeronbroker/Aeron/blob/master/IoTBroker-runner/iotbroker.conf.default#L41): # IoT Consumers # If more than one, they can be comma-separate. e.g. 'http: //localhost:8001,http://localhost:8002' # The path needs to include the full path but the final resource. IoT Broker will add only "updateContext" . iotbroker_consumers='http: //localhost:8001/ngsi10/' Moreover, it seems that there are no issues regarding the IoT Discovery. The latter is contacted by the IoT Broker in case of UpdateContext ( https://forge.fiware.org/plugins/mediawiki/wiki/fiware/index.php/FIWARE.ArchitectureDescription.IoT.Backend.IoTBroker#Update_Context_handling ) only if the "Association feature" (see https://forge.fiware.org/plugins/mediawiki/wiki/fiware/index.php/FIWARE.ArchitectureDescription.IoT.Backend.IoTBroker#Associations_in_FI-WARE_NGSI ) is enabled in the iotbroker.conf.local (by default it is enabled in the iotbroker.conf.default https://github.com/Aeronbroker/Aeron/blob/master/IoTBroker-runner/iotbroker.conf.default#L9): iotbroker_association= "enabled" If you do not care using the Association feature, you can disable it in order to improve performances: iotbroker_association= "disabled" Finally, from you log it seems that you have the historical agent ( https://github.com/Aeronbroker/Aeron/blob/master/doc/historyqueries.md ) activated but there are issues with the connection to the big data storage (CouchDB), which is probally not installed: 2017-02-13 03:31:48 WARN HttpRequester:281 - Unable to connect with the URL: http://127.0.0.1:5984/historicalrepository/entity__ahmedov~Room::$ 2017-02-13 03:31:48 ERROR CouchDB:230 - No response from CouchDB!!! If you are not interested in such feature, in order again to improve performances (and avoid such errors in the log), you can disable it by adding the following line to the iotbroker.conf.local: iotbroker_historicalagent= "disabled" Hope this solve all you issues. Best Regards Flavio

          People

          • Assignee:
            gprivat Gilles Privat
            Reporter:
            fw.ext.user FW External User
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: