Repository navigation
Description
IoT Agent JSON version the issue has been seen with
3.14
Bound or port used (API interaction)
Southbound (Devices data API)
NGSI version
NGSIv2
Are you running a container?
None
Image type
None
Expected behaviour you didn't see
When device with a simple command:
The command endpoint response is unexpected (not 200 json), then iotagent
time=2026-11-10T09:26:44.191Z | lvl=DEBUG | corr=f92333e2-62dc-46e8-9532-92cfeac5d02f; cbfwd=1 | trans=040f2c6d-4c56-4730-8ed0-b535ca875b2a | op=IoTAgentNGSI.Request | from=172.19.0.1 | srv=smartcity | subsrv=/ | msg=Options: {
"url": "https://prueba-avg.free.beeceptor.com/nada",
"method": "POST",
"body": "{"ping":"MMMM"}",
"headers": {
"fiware-service": "smartcity",
"fiware-servicepath": "/",
"content-type": "application/json"
}
} | comp=IoTAgent
time=2026-11-10T09:26:44.751Z | lvl=DEBUG | corr=f92333e2-62dc-46e8-9532-92cfeac5d02f; cbfwd=1 | trans=040f2c6d-4c56-4730-8ed0-b535ca875b2a | op=IoTAgentNGSI.Request | from=172.19.0.1 | srv=smartcity | subsrv=/ | msg=Error: "RequestError: Unexpected token 'H', "Hey ya! Gr"... is not valid JSON in "https://prueba-avg.free.beeceptor.com/nada\"\n at Object.parseBody [as default] (/opt/iotagent-json/node_modules/got/dist/source/as-promise/parse-body.js:22:15)\n at Request. (/opt/iotagent-json/node_modules/got/dist/source/as-promise/index.js:72:61)\n at JSON.parse ()\n at parseJson (/opt/iotagent-json/node_modules/got/dist/source/index.js:118:35)\n at Object.parseBody [as default] (/opt/iotagent-json/node_modules/got/dist/source/as-promise/parse-body.js:11:48)\n at Request. (/opt/iotagent-json/node_modules/got/dist/source/as-promise/index.js:72:61)\n at process.processTicksAndRejections (node:internal/process/task_queues:104:5) {\n name: 'ParseError',\n code: 'ERR_BODY_PARSE_FAILURE',\n timings: {\n start: 1794302804194,\n socket: 1794302804194,\n lookup: 1794302804232,\n connect: 1794302804404,\n secureConnect: 1794302804575,\n upload: 1794302804576,\n response: 1794302804748,\n end: 1794302804749,\n error: undefined,\n abort: undefined,\n phases: {\n wait: 0,\n dns: 38,\n tcp: 172,\n tls: 171,\n request: 1,\n firstByte: 172,\n download: 1,\n total: 555\n }\n }\n}" | comp=IoTAgent
time=2026-11-10T09:26:44.751Z | lvl=DEBUG | corr=f92333e2-62dc-46e8-9532-92cfeac5d02f; cbfwd=1 | trans=040f2c6d-4c56-4730-8ed0-b535ca875b2a | op=IoTAgentNGSI.ContextServer-v2 | from=172.19.0.1 | srv=smartcity | subsrv=/ | msg=There was an error handling the update action: {"name":"HTTP_COMMAND_RESPONSE_ERROR","message":"There was an error in the response of a device to a command [400 ]:{"name":"ParseError","code":"ERR_BODY_PARSE_FAILURE","timings":{"start":1794302804194,"socket":1794302804194,"lookup":1794302804232,"connect":1794302804404,"secureConnect":1794302804575,"upload":1794302804576,"response":1794302804748,"end":1794302804749,"phases":{"wait":0,"dns":38,"tcp":172,"tls":171,"request":1,"firstByte":172,"download":1,"total":555}}}","code":400}. | comp=IoTAgent
time=2026-11-10T09:26:44.752Z | lvl=DEBUG | corr=f92333e2-62dc-46e8-9532-92cfeac5d02f; cbfwd=1 | trans=040f2c6d-4c56-4730-8ed0-b535ca875b2a | op=IoTAgentNGSI.ContextServer-v2 | from=172.19.0.1 | srv=smartcity | subsrv=/ | msg=Update NGSIv2 error [{"name":"HTTP_COMMAND_RESPONSE_ERROR","message":"There was an error in the response of a device to a command [400 ]:{"name":"ParseError","code":"ERR_BODY_PARSE_FAILURE","timings":{"start":1794302804194,"socket":1794302804194,"lookup":1794302804232,"connect":1794302804404,"secureConnect":1794302804575,"upload":1794302804576,"response":1794302804748,"end":1794302804749,"phases":{"wait":0,"dns":38,"tcp":172,"tls":171,"request":1,"firstByte":172,"download":1,"total":555}}}","code":400}] handing request: {"entities":[{"id":"thing:test125","type":"thing","ping":{"type":"command","value":"MMMM","metadata":{},"name":"ping"}}],"actionType":"update"} | comp=IoTAgent
and orion:
time=2026-11-10T09:26:44.754Z | lvl=INFO | corr=f92333e2-62dc-46e8-9532-92cfeac5d02f; cbfwd=1 | trans=1794293534-433-00000000820 | from=172.19.0.2 | srv=smartcity | subsrv=/ | comp=Orion | op=logTracing.cpp[383]:logInfoFwdRequest | msg=Request forwarded (regId: 6af2e34cdcff4b063c0b80b8): POST http://172.17.0.1:4052/op/update, request payload (129 bytes): {"entities":[{"id":"thing:test125","type":"thing","ping":{"type":"command","value":"MMMM","metadata":{}}}],"actionType":"update"}, response payload (436 bytes): {"error":"HTTP_COMMAND_RESPONSE_ERROR","description":"There was an error in the response of a device to a command [400 ]:{name:ParseError,code:ERR_BODY_PARSE_FAILURE,timings:{start:1794302804194,socket:1794302804194,lookup:1794302804232,connect:1794302804404,secureConnect:1794302804575,upload:1794302804576,response:1794302804748,end:1794302804749,phases:{wait:0,dns:38,tcp:172,tls:171,request:1,firstByte:172,download:1,total:555}}}"}, response code: 400
time=2026-11-10T09:26:44.754Z | lvl=WARN | corr=f92333e2-62dc-46e8-9532-92cfeac5d02f; cbfwd=1 | trans=1794293534-433-00000000820 | from=172.19.0.2 | srv=smartcity | subsrv=/ | comp=Orion | op=AlarmManager.cpp[555]:forwardingError | msg=Raising alarm ForwardingError 172.17.0.1:4052//op/update: unexpected response from context provider: %sHTTP/1.1 400 Bad Request
X-Powered-By: Express
Fiware-Correlator: f92333e2-62dc-46e8-9532-92cfeac5d02f; cbfwd=1
Content-Type: application/json; charset=utf-8
Content-Length: 436
ETag: W/"1b4-bVcGR2D8DLHdLqygz9Z4WONHHH4"
Date: Tue, 10 Nov 2026 09:26:44 GMT
Connection: keep-alive
Keep-Alive: timeout=5
{"error":"HTTP_COMMAND_RESPONSE_ERROR","description":"There was an error in the response of a device to a command [400 ]:{name:ParseError,code:ERR_BODY_PARSE_FAILURE,timings:{start:1794302804194,socket:1794302804194,lookup:1794302804232,connect:1794302804404,secureConnect:1794302804575,upload:1794302804576,response:1794302804748,end:1794302804749,phases:{wait:0,dns:38,tcp:172,tls:171,request:1,firstByte:172,download:1,total:555}}}"}
time=2026-11-10T09:26:44.754Z | lvl=WARN | corr=f92333e2-62dc-46e8-9532-92cfeac5d02f | trans=1794293534-433-00000000819 | from=172.19.0.2 | srv=smartcity | subsrv=/ | comp=Orion | op=AlarmManager.cpp[502]:badInput | msg=Raising alarm BadInput 172.19.0.9: The requested entity has not been found. Check type and id
Unexpected behaviour you saw
No response
Steps to reproduce the problem
No response
Configs
environment:
- "IOTA_CB_HOST=orion"
- "IOTA_CB_PORT=1026"
- "IOTA_NORTH_PORT=4041"
- "IOTA_REGISTRY_TYPE=mongodb"
- "IOTA_MONGO_HOST=mongodb"
- "IOTA_MONGO_PORT=27017"
- "IOTA_MONGO_DB=iotagent-json"
- "IOTA_HTTP_PORT=7896"
- "IOTA_PROVIDER_URL=http://iot-agent:4041"
Activity
AlvaroVega commentedon Nov 10, 2026
iotagent is responding
{
"name":"HTTP_COMMAND_RESPONSE_ERROR","message":"There was an error in the response of a device to a command [400 ]"
}
to orion, but orion responses:
{
"error": "NotFound",
"description": "The requested entity has not been found. Check type and id"
}
fgalan commentedon Nov 24, 2026
Should this issue be closed now that PR #1017 has been merged?