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

FIWARE.Question.Tech.Data.OrionContextBroker.CBNotNotifiesCorrectlyWhenDataComesFromIOTAgent

    Details

      Description

      Created question in FIWARE Q/A platform on 28-02-2016 at 15:02
      Please, ANSWER this question AT http://stackoverflow.com/questions/35683758/orion-contextbroker-dont-notifies-correctly-when-data-comes-from-iotagent

      Question:
      Orion contextBroker don't notifies correctly when data comes from IoTAgent

      Description:
      I have in the same machine an IoTAgent, an Orion contextBroker, Cygnus and a MySQL database.

      When I update a value via POST directly to the contextBroker, it is succesfully updated and the onchange subscription raises the notification to cygnus and then the value is persisted to MySQL database.
      The problem comes when I update the value via POST to the IoTAgent. The agent forward correctly the value to the contextBroker, and it is updated in his mongo DB. In this case the onchange subscription raise the notification to cygnus but it doesn't send the value to the MySQL database.

      There is no significant errors in any of the logs.

      This is the contextBroker log when receives and updateContext directly via my POST:

      time=2016-02-28T14:42:57.669CET | lvl=INFO | trans=1456501859-068-00000000028 | srv=<default> | subsrv=/ | from=83.50.53.181 | function=collectionUpdate | comp=Orion | msg=connectionOperations.cpp[401]: Database Operation Successful (update: <

      { _id.id: "D000", _id.type: "thing", _id.servicePath: /\// }

      , { $set: { attrs.Temperature0: { value: "10", type: "Number", md: [

      { name: "TimeInstant", type: "ISO8601", value: "2016-02-28T13:21:43.156957Z" }

      ], creDate: 1456351643, modDate: 1456666977 }, modDate: 1456666977 }, $unset:

      { location: 1 }

      }>)
      time=2016-02-28T14:42:57.670CET | lvl=INFO | trans=1456501859-068-00000000029 | srv=pending | subsrv=pending | from=pending | function=lmTransactionStart | comp=Orion | msg=logMsg.h[1803]: Starting transaction to localhost:5050/notify
      time=2016-02-28T14:42:57.670CET | lvl=INFO | trans=1456501859-068-00000000028 | srv=<default> | subsrv=/ | from=83.50.53.181 | function=lmTransactionEnd | comp=Orion | msg=logMsg.h[1887]: Transaction ended
      time=2016-02-28T14:42:57.692CET | lvl=INFO | trans=1456501859-068-00000000029 | srv=pending | subsrv=pending | from=pending | function=httpRequestSendWithCurl | comp=Orion | msg=httpRequestSend.cpp[446]: Notification Successfully Sent to localhost:5050/notify
      time=2016-02-28T14:42:57.692CET | lvl=INFO | trans=1456501859-068-00000000029 | srv=pending | subsrv=pending | from=pending | function=lmTransactionEnd | comp=Orion | msg=logMsg.h[1887]: Transaction ended
      time=2016-02-28T14:43:06.330CET | lvl=INFO | trans=N/A | srv=N/A | subsrv=N/A | from=N/A | function=collectionQuery | comp=Orion | msg=connectionOperations.cpp[79]: Database Operation Successful (query:

      { conditions.type: "ONCHANGE" }

      )
      time=2016-02-28T14:43:06.331CET | lvl=INFO | trans=N/A | srv=N/A | subsrv=N/A | from=N/A | function=collectionUpdate | comp=Orion | msg=connectionOperations.cpp[401]: Database Operation Successful (update: <

      { _id: ObjectId('56d2f43a919d4b4fe286b100') }

      , { $inc:

      { count: 1 }

      }>)
      time=2016-02-28T14:43:06.332CET | lvl=INFO | trans=N/A | srv=N/A | subsrv=N/A | from=N/A | function=collectionUpdate | comp=Orion | msg=connectionOperations.cpp[401]: Database Operation Successful (update: <{ _id: ObjectId('56d2f43a919d4b4fe286b100'), lastNotification:

      { $lt: 1456666977 }

      }, { $set:

      { lastNotification: 1456666977 }

      }>)

      or via IoTAgent:

      time=2016-02-28T14:54:11.427CET | lvl=INFO | trans=1456501859-068-00000000030 | srv=fiware | subsrv=/ | from=0.0.0.0 | function=collectionUpdate | comp=Orion | msg=connectionOperations.cpp[401]: Database Operation Successful (update: <

      { _id.id: "D000", _id.type: "thing", _id.servicePath: /\// }

      , { $set: { attrs.Temperature0: { value: "43", type: "Number", md: [

      { name: "TimeInstant", type: "ISO8601", value: "2016-02-28T13:54:11.416335Z" }

      ], creDate: 1456351643, modDate: 1456667651 }, attrs.TimeInstant:

      { value: "2016-02-28T13:54:11.416335Z", type: "ISO8601", creDate: 1456351372, modDate: 1456667651 }

      , modDate: 1456667651 }, $unset:

      { location: 1 }

      }>)
      time=2016-02-28T14:54:11.428CET | lvl=INFO | trans=1456501859-068-00000000030 | srv=fiware | subsrv=/ | from=0.0.0.0 | function=lmTransactionEnd | comp=Orion | msg=logMsg.h[1887]: Transaction ended
      time=2016-02-28T14:54:11.428CET | lvl=INFO | trans=1456501859-068-00000000031 | srv=fiware | subsrv=/ | from=0.0.0.0 | function=collectionQuery | comp=Orion | msg=connectionOperations.cpp[79]: Database Operation Successful (query:

      { _id.id: "D000", _id.type: "thing", _id.servicePath: /^\/$/ }

      )
      time=2016-02-28T14:54:11.430CET | lvl=INFO | trans=1456501859-068-00000000031 | srv=fiware | subsrv=/ | from=0.0.0.0 | function=collectionUpdate | comp=Orion | msg=connectionOperations.cpp[401]: Database Operation Successful (update: <

      { _id.id: "D000", _id.type: "thing", _id.servicePath: /\// }

      , { $set: { attrs.Humidity0: { value: "61", type: "Number", md: [

      { name: "TimeInstant", type: "ISO8601", value: "2016-02-28T13:54:11.417399Z" }

      ], creDate: 1456351679, modDate: 1456667651 }, attrs.TimeInstant:

      { value: "2016-02-28T13:54:11.417399Z", type: "ISO8601", creDate: 1456351372, modDate: 1456667651 }

      , modDate: 1456667651 }, $unset:

      { location: 1 }

      }>)
      time=2016-02-28T14:54:11.430CET | lvl=INFO | trans=1456501859-068-00000000031 | srv=fiware | subsrv=/ | from=0.0.0.0 | function=lmTransactionEnd | comp=Orion | msg=logMsg.h[1887]: Transaction ended
      time=2016-02-28T14:55:06.349CET | lvl=INFO | trans=N/A | srv=N/A | subsrv=N/A | from=N/A | function=collectionQuery | comp=Orion | msg=connectionOperations.cpp[79]: Database Operation Successful (query:

      { conditions.type: "ONCHANGE" }

      )

      Thanks.

        Activity

        Hide
        backlogmanager Backlog Manager added a comment -

        2016-02-28 18:05|CREATED monitor | # answers= 0, accepted answer= False

        Show
        backlogmanager Backlog Manager added a comment - 2016-02-28 18:05|CREATED monitor | # answers= 0, accepted answer= False
        Hide
        fermin Fermín Galán added a comment -

        Waiting for user input. Impeded.

        Show
        fermin Fermín Galán added a comment - Waiting for user input. Impeded.
        Hide
        fermin Fermín Galán added a comment -

        I'm still trying to figure out the actual cause of the issue and discussion with the user continues in SOF comments. Thus, it is correct to have the issue in Impeded status.

        Show
        fermin Fermín Galán added a comment - I'm still trying to figure out the actual cause of the issue and discussion with the user continues in SOF comments. Thus, it is correct to have the issue in Impeded status.
        Hide
        fermin Fermín Galán added a comment -

        An answer has been provided. Closing.

        Show
        fermin Fermín Galán added a comment - An answer has been provided. Closing.

          People

          • Assignee:
            fermin Fermín Galán
            Reporter:
            backlogmanager Backlog Manager
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: