[英]IoTAgent unable to send notification to Orion CB
I can confirm my LwM2M client
is sending observation to the IoTAgent
, I can also see the IoTAgent
trying to forward observed measure to Orion CB, but failed with following log:我可以证实我的LwM2M client
在发送观察到IoTAgent
,我还可以看到IoTAgent
试图观察测量正向猎户座CB,但以下日志失败:
time=2019-02-26T13:34:47.877Z | lvl=DEBUG | corr=n/a | trans=n/a | op=LWM2MLib.Registration | msg=Registration request ended successfully
time=2019-02-26T13:34:47.927Z | lvl=DEBUG | corr=n/a | trans=n/a | op=LWM2MLib.InformationReporting | msg=Observing value from resource /3303/0/5700 in device [1]
time=2019-02-26T13:34:47.947Z | lvl=ERROR | corr=519dbe74-0142-48b7-8290-444f86df5053 | trans=519dbe74-0142-48b7-8290-444f86df5053 | op=IoTAgentNGSI.DomainControl | srv=n/a | subsrv=n/a | msg=Error: No matching format found | comp=IoTAgent
time=2019-02-26T13:34:47.948Z | lvl=DEBUG | corr=519dbe74-0142-48b7-8290-444f86df5053 | trans=519dbe74-0142-48b7-8290-444f86df5053 | op=IoTAgentNGSI.DomainControl | srv=n/a | subsrv=n/a | msg=response-time: 79406 | comp=IoTAgent
time=2019-02-26T13:35:02.965Z | lvl=FATAL | corr=n/a | trans=n/a | op=IoTAgentNGSI.Global | srv=n/a | subsrv=n/a | msg=An unexpected exception has been raised. Ignoring: Error: No matching format found | comp=IoTAgent
time=2019-02-26T13:35:17.981Z | lvl=FATAL | corr=n/a | trans=n/a | op=IoTAgentNGSI.Global | srv=n/a | subsrv=n/a | msg=An unexpected exception has been raised. Ignoring: Error: No matching format found | comp=IoTAgent
time=2019-02-26T13:35:48.012Z | lvl=FATAL | corr=n/a | trans=n/a | op=IoTAgentNGSI.Global | srv=n/a | subsrv=n/a | msg=An unexpected exception has been raised. Ignoring: Error: No matching format found | comp=IoTAgent
time=2019-02-26T13:36:03.030Z | lvl=FATAL | corr=n/a | trans=n/a | op=IoTAgentNGSI.Global | srv=n/a | subsrv=n/a | msg=An unexpected exception has been raised. Ignoring: Error: No matching format found | comp=IoTAgent
time=2019-02-26T13:36:23.059Z | lvl=FATAL | corr=n/a | trans=n/a | op=IoTAgentNGSI.Global | srv=n/a | subsrv=n/a | msg=An unexpected exception has been raised. Ignoring: Error: No matching format found | comp=IoTAgent
time=2019-02-26T13:36:53.086Z | lvl=FATAL | corr=n/a | trans=n/a | op=IoTAgentNGSI.Global | srv=n/a | subsrv=n/a | msg=An unexpected exception has been raised. Ignoring: Error: No matching format found | comp=IoTAgent
Below is what the Orion CB reports in its log:以下是 Orion CB 在其日志中报告的内容:
time=Tuesday 26 Feb 13:34:47 2019.838Z | lvl=INFO | corr=48de7b18-39cb-11e9-8c5b-0242ac1b0006 | trans=1551188006-596-00000000004 | from=172.27.0.5 | srv=smartgondor | subsrv=/gardens | comp=Orion | op=logMsg.h[1916]:lmTransactionEnd | msg=Transaction ended
time=Tuesday 26 Feb 13:35:28 2019.446Z | lvl=INFO | corr=N/A | trans=N/A | from=N/A | srv=N/A | subsrv=N/A | comp=Orion | op=connectionOperations.cpp[701]:runCollectionCommand | msg=Database Operation Successful (command: { listDatabases: 1 })
time=Tuesday 26 Feb 13:35:28 2019.447Z | lvl=INFO | corr=N/A | trans=N/A | from=N/A | srv=N/A | subsrv=N/A | comp=Orion | op=connectionOperations.cpp[94]:collectionQuery | msg=Database Operation Successful (query: {})
time=Tuesday 26 Feb 13:35:28 2019.447Z | lvl=INFO | corr=N/A | trans=N/A | from=N/A | srv=N/A | subsrv=N/A | comp=Orion | op=connectionOperations.cpp[94]:collectionQuery | msg=Database Operation Successful (query: {})
time=Tuesday 26 Feb 13:36:28 2019.450Z | lvl=INFO | corr=N/A | trans=N/A | from=N/A | srv=N/A | subsrv=N/A | comp=Orion | op=connectionOperations.cpp[701]:runCollectionCommand | msg=Database Operation Successful (command: { listDatabases: 1 })
Any idea why this error, what is causing it?知道为什么会出现这个错误,是什么原因造成的?
Figure out the problem.找出问题所在。 A mismatch between client-agent data encode (TLV and JSON).客户端-代理数据编码(TLV 和 JSON)之间的不匹配。
Changed the encode style in the client wakaama/core/liblwm2m.h to match that of IoTAgent.更改客户端 wakaama/core/liblwm2m.h 中的编码样式以匹配 IoTAgent 的编码样式。 ..wakaama/core/liblwm2m.h:
LWM2M_CONTENT_TEXT = 0, // Also used as undefined
LWM2M_CONTENT_LINK = 40,
LWM2M_CONTENT_OPAQUE = 42,
LWM2M_CONTENT_TLV_OLD = 1542, // Keep old value for backward-compatibility
LWM2M_CONTENT_TLV = 11542,
LWM2M_CONTENT_JSON_OLD = 1543, // Keep old value for backward-compatibility
LWM2M_CONTENT_JSON = 11543
LWM2M_CONTENT_TLV_OLD = 11542, // Keep old value for backward-compatibility
LWM2M_CONTENT_TLV = 1542,
LWM2M_CONTENT_JSON_OLD = 11543, // Keep old value for backward-compatibility
LWM2M_CONTENT_JSON = 1543
} lwm2m_media_type_t;
Matching the IoTAgent config.js configuration file:匹配 IoTAgent config.js 配置文件:
delayedObservationTimeout: 50,
formats: [
{
name: 'application-vnd-oma-lwm2m/text',
value: 1541
},
{
name: 'application-vnd-oma-lwm2m/tlv',
value: 1542
},
{
name: 'application-vnd-oma-lwm2m/json',
value: 1543
},
{
name: 'application-vnd-oma-lwm2m/opaque',
value: 1544
}
],
writeFormat: 'application-vnd-oma-lwm2m/text',
types: [ ]
};
Now working...工作中...
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.