Details
-
Type: Monitor
-
Status: Closed
-
Priority: Major
-
Resolution: Done
-
Affects Version/s: None
-
Fix Version/s: 2021
-
Component/s: FIWARE-TECH-HELP
-
Labels:
-
HD-Chapter:Data
-
HD-Enabler:Orion
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:
)
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: <
, { $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:
}, { $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:
)
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: <
, { $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:
)
Thanks.
2016-02-28 18:05|CREATED monitor | # answers= 0, accepted answer= False