Orion Reports Error While Provisioning a Device
I am following up with the FIWARE-IOTAgent-LWM2M tutorial available here trying to pre-provision an LWM2M device. I cloned github repo, installed dependencies and created docker-compose.yml
file. All containers (including lightweightm2m-iotagent
) started successfully.
However, when I tried provisioning the device using:
(curl localhost:4041/iot/devices -s -S --header 'Content-Type: application/json'
--header 'Accept: application/json' --header 'fiware-service: factory' --header 'fiware-servicepath: /robots'
-d @- | python -mjson.tool) <<EOF
"devices": [
"device_id": "robot1",
"entity_type": "Robot",
"attributes": [
"name": "Battery",
"type": "number"
],
"lazy": [
"name": "Message",
"type": "string"
],
"commands": [
"name": "Position",
"type": "location"
],
"internal_attributes":
"lwm2mResourceMapping":
"Battery" :
"objectType": 7392,
"objectInstance": 0,
"objectResource": 1
,
"Message" :
"objectType": 7392,
"objectInstance": 0,
"objectResource": 2
,
"Position" :
"objectType": 7392,
"objectInstance": 0,
"objectResource": 3
]
EOF
I get the following error:
"message": "Request error connecting to the Context Broker: "code":"400","reasonPhrase":"Bad Request","details":"JSON Parse Error: unknown field: /contextRegistrations/contextRegistration/attributes/attribute/isDomain"",
"name": "BAD_REQUEST"
I am not sure how to debug this. Any idea how to fix it?
Question Edited: Below is the docker-compose file I'm using.
version: "3.1"
services:
mongo:
image: mongo:3.6
command: --nojournal
ports:
- "27017:27017"
expose:
- "27017"
orion:
image: fiware/orion
links:
- mongo
ports:
- "1026:1026"
command: -dbhost mongo -logLevel DEBUG
depends_on:
- mongo
expose:
- "1026"
lightweightm2m-iotagent:
image: telefonicaiot/lightweightm2m-iotagent
hostname: idas
links:
- orion
expose:
- "4041"
- "5684"
ports:
- "4041:4041"
- "5684:5684/udp"
mosquitto:
image: ansi/mosquitto
ports:
- "1883:1883"
expose:
- "1883"
fiware-orion
add a comment |
I am following up with the FIWARE-IOTAgent-LWM2M tutorial available here trying to pre-provision an LWM2M device. I cloned github repo, installed dependencies and created docker-compose.yml
file. All containers (including lightweightm2m-iotagent
) started successfully.
However, when I tried provisioning the device using:
(curl localhost:4041/iot/devices -s -S --header 'Content-Type: application/json'
--header 'Accept: application/json' --header 'fiware-service: factory' --header 'fiware-servicepath: /robots'
-d @- | python -mjson.tool) <<EOF
"devices": [
"device_id": "robot1",
"entity_type": "Robot",
"attributes": [
"name": "Battery",
"type": "number"
],
"lazy": [
"name": "Message",
"type": "string"
],
"commands": [
"name": "Position",
"type": "location"
],
"internal_attributes":
"lwm2mResourceMapping":
"Battery" :
"objectType": 7392,
"objectInstance": 0,
"objectResource": 1
,
"Message" :
"objectType": 7392,
"objectInstance": 0,
"objectResource": 2
,
"Position" :
"objectType": 7392,
"objectInstance": 0,
"objectResource": 3
]
EOF
I get the following error:
"message": "Request error connecting to the Context Broker: "code":"400","reasonPhrase":"Bad Request","details":"JSON Parse Error: unknown field: /contextRegistrations/contextRegistration/attributes/attribute/isDomain"",
"name": "BAD_REQUEST"
I am not sure how to debug this. Any idea how to fix it?
Question Edited: Below is the docker-compose file I'm using.
version: "3.1"
services:
mongo:
image: mongo:3.6
command: --nojournal
ports:
- "27017:27017"
expose:
- "27017"
orion:
image: fiware/orion
links:
- mongo
ports:
- "1026:1026"
command: -dbhost mongo -logLevel DEBUG
depends_on:
- mongo
expose:
- "1026"
lightweightm2m-iotagent:
image: telefonicaiot/lightweightm2m-iotagent
hostname: idas
links:
- orion
expose:
- "4041"
- "5684"
ports:
- "4041:4041"
- "5684:5684/udp"
mosquitto:
image: ansi/mosquitto
ports:
- "1883:1883"
expose:
- "1883"
fiware-orion
I think I have an idead of the problem cause but, before anwering, could you please edit your question post to provide a link to the docker-compose.yml file you are using? Thx!
– fgalan
Nov 16 '18 at 18:11
Hi @fgalan I added the docker-compose.yml file I used.
– arilwan
Nov 16 '18 at 22:04
This problem has been solved after updating the lightweightm2m-iotagent image.
– arilwan
Nov 18 '18 at 20:35
add a comment |
I am following up with the FIWARE-IOTAgent-LWM2M tutorial available here trying to pre-provision an LWM2M device. I cloned github repo, installed dependencies and created docker-compose.yml
file. All containers (including lightweightm2m-iotagent
) started successfully.
However, when I tried provisioning the device using:
(curl localhost:4041/iot/devices -s -S --header 'Content-Type: application/json'
--header 'Accept: application/json' --header 'fiware-service: factory' --header 'fiware-servicepath: /robots'
-d @- | python -mjson.tool) <<EOF
"devices": [
"device_id": "robot1",
"entity_type": "Robot",
"attributes": [
"name": "Battery",
"type": "number"
],
"lazy": [
"name": "Message",
"type": "string"
],
"commands": [
"name": "Position",
"type": "location"
],
"internal_attributes":
"lwm2mResourceMapping":
"Battery" :
"objectType": 7392,
"objectInstance": 0,
"objectResource": 1
,
"Message" :
"objectType": 7392,
"objectInstance": 0,
"objectResource": 2
,
"Position" :
"objectType": 7392,
"objectInstance": 0,
"objectResource": 3
]
EOF
I get the following error:
"message": "Request error connecting to the Context Broker: "code":"400","reasonPhrase":"Bad Request","details":"JSON Parse Error: unknown field: /contextRegistrations/contextRegistration/attributes/attribute/isDomain"",
"name": "BAD_REQUEST"
I am not sure how to debug this. Any idea how to fix it?
Question Edited: Below is the docker-compose file I'm using.
version: "3.1"
services:
mongo:
image: mongo:3.6
command: --nojournal
ports:
- "27017:27017"
expose:
- "27017"
orion:
image: fiware/orion
links:
- mongo
ports:
- "1026:1026"
command: -dbhost mongo -logLevel DEBUG
depends_on:
- mongo
expose:
- "1026"
lightweightm2m-iotagent:
image: telefonicaiot/lightweightm2m-iotagent
hostname: idas
links:
- orion
expose:
- "4041"
- "5684"
ports:
- "4041:4041"
- "5684:5684/udp"
mosquitto:
image: ansi/mosquitto
ports:
- "1883:1883"
expose:
- "1883"
fiware-orion
I am following up with the FIWARE-IOTAgent-LWM2M tutorial available here trying to pre-provision an LWM2M device. I cloned github repo, installed dependencies and created docker-compose.yml
file. All containers (including lightweightm2m-iotagent
) started successfully.
However, when I tried provisioning the device using:
(curl localhost:4041/iot/devices -s -S --header 'Content-Type: application/json'
--header 'Accept: application/json' --header 'fiware-service: factory' --header 'fiware-servicepath: /robots'
-d @- | python -mjson.tool) <<EOF
"devices": [
"device_id": "robot1",
"entity_type": "Robot",
"attributes": [
"name": "Battery",
"type": "number"
],
"lazy": [
"name": "Message",
"type": "string"
],
"commands": [
"name": "Position",
"type": "location"
],
"internal_attributes":
"lwm2mResourceMapping":
"Battery" :
"objectType": 7392,
"objectInstance": 0,
"objectResource": 1
,
"Message" :
"objectType": 7392,
"objectInstance": 0,
"objectResource": 2
,
"Position" :
"objectType": 7392,
"objectInstance": 0,
"objectResource": 3
]
EOF
I get the following error:
"message": "Request error connecting to the Context Broker: "code":"400","reasonPhrase":"Bad Request","details":"JSON Parse Error: unknown field: /contextRegistrations/contextRegistration/attributes/attribute/isDomain"",
"name": "BAD_REQUEST"
I am not sure how to debug this. Any idea how to fix it?
Question Edited: Below is the docker-compose file I'm using.
version: "3.1"
services:
mongo:
image: mongo:3.6
command: --nojournal
ports:
- "27017:27017"
expose:
- "27017"
orion:
image: fiware/orion
links:
- mongo
ports:
- "1026:1026"
command: -dbhost mongo -logLevel DEBUG
depends_on:
- mongo
expose:
- "1026"
lightweightm2m-iotagent:
image: telefonicaiot/lightweightm2m-iotagent
hostname: idas
links:
- orion
expose:
- "4041"
- "5684"
ports:
- "4041:4041"
- "5684:5684/udp"
mosquitto:
image: ansi/mosquitto
ports:
- "1883:1883"
expose:
- "1883"
fiware-orion
fiware-orion
edited Nov 16 '18 at 22:03
arilwan
asked Nov 16 '18 at 0:18
arilwanarilwan
145110
145110
I think I have an idead of the problem cause but, before anwering, could you please edit your question post to provide a link to the docker-compose.yml file you are using? Thx!
– fgalan
Nov 16 '18 at 18:11
Hi @fgalan I added the docker-compose.yml file I used.
– arilwan
Nov 16 '18 at 22:04
This problem has been solved after updating the lightweightm2m-iotagent image.
– arilwan
Nov 18 '18 at 20:35
add a comment |
I think I have an idead of the problem cause but, before anwering, could you please edit your question post to provide a link to the docker-compose.yml file you are using? Thx!
– fgalan
Nov 16 '18 at 18:11
Hi @fgalan I added the docker-compose.yml file I used.
– arilwan
Nov 16 '18 at 22:04
This problem has been solved after updating the lightweightm2m-iotagent image.
– arilwan
Nov 18 '18 at 20:35
I think I have an idead of the problem cause but, before anwering, could you please edit your question post to provide a link to the docker-compose.yml file you are using? Thx!
– fgalan
Nov 16 '18 at 18:11
I think I have an idead of the problem cause but, before anwering, could you please edit your question post to provide a link to the docker-compose.yml file you are using? Thx!
– fgalan
Nov 16 '18 at 18:11
Hi @fgalan I added the docker-compose.yml file I used.
– arilwan
Nov 16 '18 at 22:04
Hi @fgalan I added the docker-compose.yml file I used.
– arilwan
Nov 16 '18 at 22:04
This problem has been solved after updating the lightweightm2m-iotagent image.
– arilwan
Nov 18 '18 at 20:35
This problem has been solved after updating the lightweightm2m-iotagent image.
– arilwan
Nov 18 '18 at 20:35
add a comment |
1 Answer
1
active
oldest
votes
It is a known issue, already fixed in master branch.
It has been fixed recently on November 7th, 2018. On the other hand telefonicaiot/lightweightm2m-iotagent:latest
(and telefonicaiot/lightweightm2m-iotagent
should default to latest
) last update at the time of writting this is November 13th, 2018 so it should include the fix.
Probably your telefonicaiod/lightweightm2m-iotagent
image is out of date. Pulling it again from Dockerhub should solve the problem.
Hi @fgalan, Pulling the image agent solves the problem, but generate the following error again: ' ' ' "message": "Cannot read property 'findOne' of undefined", "name": "TypeError" ' ' ' Reported here.. #17
– arilwan
Nov 19 '18 at 8:35
I'd suggest to open a new question for the new problem.
– fgalan
Nov 19 '18 at 10:53
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53329679%2forion-reports-error-while-provisioning-a-device%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
It is a known issue, already fixed in master branch.
It has been fixed recently on November 7th, 2018. On the other hand telefonicaiot/lightweightm2m-iotagent:latest
(and telefonicaiot/lightweightm2m-iotagent
should default to latest
) last update at the time of writting this is November 13th, 2018 so it should include the fix.
Probably your telefonicaiod/lightweightm2m-iotagent
image is out of date. Pulling it again from Dockerhub should solve the problem.
Hi @fgalan, Pulling the image agent solves the problem, but generate the following error again: ' ' ' "message": "Cannot read property 'findOne' of undefined", "name": "TypeError" ' ' ' Reported here.. #17
– arilwan
Nov 19 '18 at 8:35
I'd suggest to open a new question for the new problem.
– fgalan
Nov 19 '18 at 10:53
add a comment |
It is a known issue, already fixed in master branch.
It has been fixed recently on November 7th, 2018. On the other hand telefonicaiot/lightweightm2m-iotagent:latest
(and telefonicaiot/lightweightm2m-iotagent
should default to latest
) last update at the time of writting this is November 13th, 2018 so it should include the fix.
Probably your telefonicaiod/lightweightm2m-iotagent
image is out of date. Pulling it again from Dockerhub should solve the problem.
Hi @fgalan, Pulling the image agent solves the problem, but generate the following error again: ' ' ' "message": "Cannot read property 'findOne' of undefined", "name": "TypeError" ' ' ' Reported here.. #17
– arilwan
Nov 19 '18 at 8:35
I'd suggest to open a new question for the new problem.
– fgalan
Nov 19 '18 at 10:53
add a comment |
It is a known issue, already fixed in master branch.
It has been fixed recently on November 7th, 2018. On the other hand telefonicaiot/lightweightm2m-iotagent:latest
(and telefonicaiot/lightweightm2m-iotagent
should default to latest
) last update at the time of writting this is November 13th, 2018 so it should include the fix.
Probably your telefonicaiod/lightweightm2m-iotagent
image is out of date. Pulling it again from Dockerhub should solve the problem.
It is a known issue, already fixed in master branch.
It has been fixed recently on November 7th, 2018. On the other hand telefonicaiot/lightweightm2m-iotagent:latest
(and telefonicaiot/lightweightm2m-iotagent
should default to latest
) last update at the time of writting this is November 13th, 2018 so it should include the fix.
Probably your telefonicaiod/lightweightm2m-iotagent
image is out of date. Pulling it again from Dockerhub should solve the problem.
answered Nov 19 '18 at 7:56
fgalanfgalan
6,79952551
6,79952551
Hi @fgalan, Pulling the image agent solves the problem, but generate the following error again: ' ' ' "message": "Cannot read property 'findOne' of undefined", "name": "TypeError" ' ' ' Reported here.. #17
– arilwan
Nov 19 '18 at 8:35
I'd suggest to open a new question for the new problem.
– fgalan
Nov 19 '18 at 10:53
add a comment |
Hi @fgalan, Pulling the image agent solves the problem, but generate the following error again: ' ' ' "message": "Cannot read property 'findOne' of undefined", "name": "TypeError" ' ' ' Reported here.. #17
– arilwan
Nov 19 '18 at 8:35
I'd suggest to open a new question for the new problem.
– fgalan
Nov 19 '18 at 10:53
Hi @fgalan, Pulling the image agent solves the problem, but generate the following error again: ' ' ' "message": "Cannot read property 'findOne' of undefined", "name": "TypeError" ' ' ' Reported here.. #17
– arilwan
Nov 19 '18 at 8:35
Hi @fgalan, Pulling the image agent solves the problem, but generate the following error again: ' ' ' "message": "Cannot read property 'findOne' of undefined", "name": "TypeError" ' ' ' Reported here.. #17
– arilwan
Nov 19 '18 at 8:35
I'd suggest to open a new question for the new problem.
– fgalan
Nov 19 '18 at 10:53
I'd suggest to open a new question for the new problem.
– fgalan
Nov 19 '18 at 10:53
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53329679%2forion-reports-error-while-provisioning-a-device%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
I think I have an idead of the problem cause but, before anwering, could you please edit your question post to provide a link to the docker-compose.yml file you are using? Thx!
– fgalan
Nov 16 '18 at 18:11
Hi @fgalan I added the docker-compose.yml file I used.
– arilwan
Nov 16 '18 at 22:04
This problem has been solved after updating the lightweightm2m-iotagent image.
– arilwan
Nov 18 '18 at 20:35