Issue Deploying Python Based IoT Edge Module to Raspberry Pi












0















I am trying to deploy a simple custom Azure IoT edge module that reads a file in my raspberry pi (running Raspbian OS) and sends it to the cloud using VS Code on my windows 10 PC.



However, there seems to be an issue with custom modules running on raspberry pi.



I set the module configuration for the docker container in the deployment JSON file this way:



"PythonModuleNest": {
"version": "1.0",
"type": "docker",
"status": "running",
"restartPolicy": "always",
"settings": {
"image": "${MODULES.PythonModuleNest.arm32v7}",
"createOptions": "{"HostConfig":{"Devices": [{"PathOnHost": "/home/pi/Offering2/test/Nest","PathInContainer": "/home/pi/Offering2/test/Nest","CgroupPermissions": "rwm"}]}}"
}
}


When I set the “image” option to "${MODULES.PythonModuleNest.arm32v7}” and I try to build and push it using VScode, I get this error in the integrated terminal:



Step 3/9 : RUN apt-get update &&     apt-get install -y --no-install-recommends libboost-python1.55.0 &&     rm -rf /var/lib/apt/lists/*<o:p></o:p>

---> Running in f68e79aa957f

standard_init_linux.go:190: exec user process caused "exec format error"

The command '/bin/sh -c apt-get update && apt-get install -y --no-install-recommends libboost-python1.55.0 && rm -rf /var/lib/apt/lists/*' returned a non-zero code: 1


So I also tried changing it to the default which was "${MODULES.PythonModuleNest.amd64}". This time it built and was pushed to the azure container repository, but when I deployed it to the edge device it did not work. On the azure portal it shows a “backoff” state and “500: edge runtime error”. It does not work on the edge and simply shows “failed” when I run iotedge list although the edgehub, edgeagent and simulated temp sensor modules are working fine. I encounter the same issue when I try other image settings including "image": "first.azurecr.io/ pythonmodulenest:0.0.1-amd64" , "image": "first.azurecr.io/pythonmodulenest:0.0.1-arm32v7" and “mcr.microsoft.com/azureiotedge-functions-binding:1.0.0-linux-arm32v7”. The “backoff” state also happened when I deployed the sample CSharp module from the tutorial.https://docs.microsoft.com/en-us/azure/iot-edge/tutorial-deploy-function.



Please I would really appreciate any help in understanding what the issue may be and if my “createOptions” configuration suffices for reading a file on my Raspberry Pi. I should also mention that I am using python to develop.










share|improve this question

























  • Hi lke, I can't reproduce your issue and i can build the python module for arm32v7 on Windows 10 successfully. Can you show your version information of development resources list in this document? More detailed information you can reference this thread.

    – Rita Han - MSFT
    Aug 23 '18 at 6:09
















0















I am trying to deploy a simple custom Azure IoT edge module that reads a file in my raspberry pi (running Raspbian OS) and sends it to the cloud using VS Code on my windows 10 PC.



However, there seems to be an issue with custom modules running on raspberry pi.



I set the module configuration for the docker container in the deployment JSON file this way:



"PythonModuleNest": {
"version": "1.0",
"type": "docker",
"status": "running",
"restartPolicy": "always",
"settings": {
"image": "${MODULES.PythonModuleNest.arm32v7}",
"createOptions": "{"HostConfig":{"Devices": [{"PathOnHost": "/home/pi/Offering2/test/Nest","PathInContainer": "/home/pi/Offering2/test/Nest","CgroupPermissions": "rwm"}]}}"
}
}


When I set the “image” option to "${MODULES.PythonModuleNest.arm32v7}” and I try to build and push it using VScode, I get this error in the integrated terminal:



Step 3/9 : RUN apt-get update &&     apt-get install -y --no-install-recommends libboost-python1.55.0 &&     rm -rf /var/lib/apt/lists/*<o:p></o:p>

---> Running in f68e79aa957f

standard_init_linux.go:190: exec user process caused "exec format error"

The command '/bin/sh -c apt-get update && apt-get install -y --no-install-recommends libboost-python1.55.0 && rm -rf /var/lib/apt/lists/*' returned a non-zero code: 1


So I also tried changing it to the default which was "${MODULES.PythonModuleNest.amd64}". This time it built and was pushed to the azure container repository, but when I deployed it to the edge device it did not work. On the azure portal it shows a “backoff” state and “500: edge runtime error”. It does not work on the edge and simply shows “failed” when I run iotedge list although the edgehub, edgeagent and simulated temp sensor modules are working fine. I encounter the same issue when I try other image settings including "image": "first.azurecr.io/ pythonmodulenest:0.0.1-amd64" , "image": "first.azurecr.io/pythonmodulenest:0.0.1-arm32v7" and “mcr.microsoft.com/azureiotedge-functions-binding:1.0.0-linux-arm32v7”. The “backoff” state also happened when I deployed the sample CSharp module from the tutorial.https://docs.microsoft.com/en-us/azure/iot-edge/tutorial-deploy-function.



Please I would really appreciate any help in understanding what the issue may be and if my “createOptions” configuration suffices for reading a file on my Raspberry Pi. I should also mention that I am using python to develop.










share|improve this question

























  • Hi lke, I can't reproduce your issue and i can build the python module for arm32v7 on Windows 10 successfully. Can you show your version information of development resources list in this document? More detailed information you can reference this thread.

    – Rita Han - MSFT
    Aug 23 '18 at 6:09














0












0








0








I am trying to deploy a simple custom Azure IoT edge module that reads a file in my raspberry pi (running Raspbian OS) and sends it to the cloud using VS Code on my windows 10 PC.



However, there seems to be an issue with custom modules running on raspberry pi.



I set the module configuration for the docker container in the deployment JSON file this way:



"PythonModuleNest": {
"version": "1.0",
"type": "docker",
"status": "running",
"restartPolicy": "always",
"settings": {
"image": "${MODULES.PythonModuleNest.arm32v7}",
"createOptions": "{"HostConfig":{"Devices": [{"PathOnHost": "/home/pi/Offering2/test/Nest","PathInContainer": "/home/pi/Offering2/test/Nest","CgroupPermissions": "rwm"}]}}"
}
}


When I set the “image” option to "${MODULES.PythonModuleNest.arm32v7}” and I try to build and push it using VScode, I get this error in the integrated terminal:



Step 3/9 : RUN apt-get update &&     apt-get install -y --no-install-recommends libboost-python1.55.0 &&     rm -rf /var/lib/apt/lists/*<o:p></o:p>

---> Running in f68e79aa957f

standard_init_linux.go:190: exec user process caused "exec format error"

The command '/bin/sh -c apt-get update && apt-get install -y --no-install-recommends libboost-python1.55.0 && rm -rf /var/lib/apt/lists/*' returned a non-zero code: 1


So I also tried changing it to the default which was "${MODULES.PythonModuleNest.amd64}". This time it built and was pushed to the azure container repository, but when I deployed it to the edge device it did not work. On the azure portal it shows a “backoff” state and “500: edge runtime error”. It does not work on the edge and simply shows “failed” when I run iotedge list although the edgehub, edgeagent and simulated temp sensor modules are working fine. I encounter the same issue when I try other image settings including "image": "first.azurecr.io/ pythonmodulenest:0.0.1-amd64" , "image": "first.azurecr.io/pythonmodulenest:0.0.1-arm32v7" and “mcr.microsoft.com/azureiotedge-functions-binding:1.0.0-linux-arm32v7”. The “backoff” state also happened when I deployed the sample CSharp module from the tutorial.https://docs.microsoft.com/en-us/azure/iot-edge/tutorial-deploy-function.



Please I would really appreciate any help in understanding what the issue may be and if my “createOptions” configuration suffices for reading a file on my Raspberry Pi. I should also mention that I am using python to develop.










share|improve this question
















I am trying to deploy a simple custom Azure IoT edge module that reads a file in my raspberry pi (running Raspbian OS) and sends it to the cloud using VS Code on my windows 10 PC.



However, there seems to be an issue with custom modules running on raspberry pi.



I set the module configuration for the docker container in the deployment JSON file this way:



"PythonModuleNest": {
"version": "1.0",
"type": "docker",
"status": "running",
"restartPolicy": "always",
"settings": {
"image": "${MODULES.PythonModuleNest.arm32v7}",
"createOptions": "{"HostConfig":{"Devices": [{"PathOnHost": "/home/pi/Offering2/test/Nest","PathInContainer": "/home/pi/Offering2/test/Nest","CgroupPermissions": "rwm"}]}}"
}
}


When I set the “image” option to "${MODULES.PythonModuleNest.arm32v7}” and I try to build and push it using VScode, I get this error in the integrated terminal:



Step 3/9 : RUN apt-get update &&     apt-get install -y --no-install-recommends libboost-python1.55.0 &&     rm -rf /var/lib/apt/lists/*<o:p></o:p>

---> Running in f68e79aa957f

standard_init_linux.go:190: exec user process caused "exec format error"

The command '/bin/sh -c apt-get update && apt-get install -y --no-install-recommends libboost-python1.55.0 && rm -rf /var/lib/apt/lists/*' returned a non-zero code: 1


So I also tried changing it to the default which was "${MODULES.PythonModuleNest.amd64}". This time it built and was pushed to the azure container repository, but when I deployed it to the edge device it did not work. On the azure portal it shows a “backoff” state and “500: edge runtime error”. It does not work on the edge and simply shows “failed” when I run iotedge list although the edgehub, edgeagent and simulated temp sensor modules are working fine. I encounter the same issue when I try other image settings including "image": "first.azurecr.io/ pythonmodulenest:0.0.1-amd64" , "image": "first.azurecr.io/pythonmodulenest:0.0.1-arm32v7" and “mcr.microsoft.com/azureiotedge-functions-binding:1.0.0-linux-arm32v7”. The “backoff” state also happened when I deployed the sample CSharp module from the tutorial.https://docs.microsoft.com/en-us/azure/iot-edge/tutorial-deploy-function.



Please I would really appreciate any help in understanding what the issue may be and if my “createOptions” configuration suffices for reading a file on my Raspberry Pi. I should also mention that I am using python to develop.







docker raspberry-pi3 azure-iot-sdk azure-iot-edge






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Aug 22 '18 at 20:08









m1ch4ls

1,732822




1,732822










asked Aug 22 '18 at 19:05









IkeIke

13




13













  • Hi lke, I can't reproduce your issue and i can build the python module for arm32v7 on Windows 10 successfully. Can you show your version information of development resources list in this document? More detailed information you can reference this thread.

    – Rita Han - MSFT
    Aug 23 '18 at 6:09



















  • Hi lke, I can't reproduce your issue and i can build the python module for arm32v7 on Windows 10 successfully. Can you show your version information of development resources list in this document? More detailed information you can reference this thread.

    – Rita Han - MSFT
    Aug 23 '18 at 6:09

















Hi lke, I can't reproduce your issue and i can build the python module for arm32v7 on Windows 10 successfully. Can you show your version information of development resources list in this document? More detailed information you can reference this thread.

– Rita Han - MSFT
Aug 23 '18 at 6:09





Hi lke, I can't reproduce your issue and i can build the python module for arm32v7 on Windows 10 successfully. Can you show your version information of development resources list in this document? More detailed information you can reference this thread.

– Rita Han - MSFT
Aug 23 '18 at 6:09












0






active

oldest

votes











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
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f51973556%2fissue-deploying-python-based-iot-edge-module-to-raspberry-pi%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































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.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f51973556%2fissue-deploying-python-based-iot-edge-module-to-raspberry-pi%23new-answer', 'question_page');
}
);

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







Popular posts from this blog

Bressuire

Vorschmack

Quarantine