在Raspberry Pi上部署基于Python的IoT Edge模块的问题 [英] Issue Deploying Python Based IoT Edge Module to Raspberry Pi

查看:147
本文介绍了在Raspberry Pi上部署基于Python的IoT Edge模块的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好

我正在尝试部署一个简单的自定义模块,该模块读取我的raspberry pi(运行Raspbian OS)中的文件,然后使用VS Code将其发送到云中.< o:p></o:p>

但是,在树莓派pi上运行的自定义模块似乎存在问题.< o:p></o:p>

我以这种方式在部署JSON文件上设置模块配置:< o:p></o:p>

 < o:p></o:p>

"PythonModuleNest" :{< o:p></o:p>

      版本" "1.0";       类型" 泊坞窗"       状态" 正在运行"       "restartPolicy" 始终"       设置"         图像" " $ {MODULES.PythonModuleNest.arm32v7}"         "createcreates" " { \"" \&; \"" : [{{ \&; \"" : \&; \" \"" \&; \" \"" \&; \&"; < o:p></o:p>

      } < o:p></o:p>

 < o:p></o:p>

当我将图像"选项设置为 " $ {MODULES.PythonModuleNest.arm32v7}" ,我尝试使用VScode进行构建和推送,但在集成终端中出现此错误:< ; o:p></o:p>

  < o:p></o:p>

第3/9步:运行apt-get update&&      apt-get install -y --no-install-推荐libboost-python1.55.0&&     rm -rf/var/lib/apt/lists/* < o:p></o:p>

--->在f68e79aa957f < o:p></o:p>

中运行

standard_init_linux.go:190:exec用户进程导致"exec格式错误" < o :p></o:p>

命令'/bin/sh -c apt-get update&&      apt-get install -y --no-install-推荐libboost-python1.55.0&&     rm -rf/var/lib/apt/lists/*' 返回非零代码:1 < o:p></o:p>

  < o:p></o:p>

所以我还尝试将其更改为默认值"$ {MODULES.PythonModuleNest.amd64}".这次构建并推送到云容器存储库,但是当我将其部署到边缘设备时,它确实 不行.在azure门户上,它显示退避"和"500:边缘运行时错误".尽管edgehub,edgeagent和模拟温度传感器模块工作正常,但它在边缘上不起作用,并且在键入"iotedge list"时仅显示"failed".日志 边缘代理位于下方,几乎每分钟重复一次.当我尝试其他图像设置(包括"image")时遇到相同的问题:"first.azurecr.io/pythonmodulenest:0.0.1-amd64" ,图片":"first.azurecr.io/pythonmodulenest:0.0.1-arm32v7" 和" mcr.microsoft.com/azureiotedge-functions -binding:1.0.0-linux-arm32v7".当我部署示例CSharp模块时,也发生了退避"状态 < o:p></o:p>

对于理解问题的任何帮助,我将不胜感激可能是这样,如果我的"createOptions"配置足以读取我的文件 树莓派.我还应该提到我正在使用python进行开发.

非常感谢.

Ike < o:p>< ;/o:p>

日志

  [停止模块PythonModuleNest]
  [启动模块PythonModuleNest]
  [保存要保存的PythonModuleNest]
)
2018-08-21 17:40:50.276 +00:00 [INF]-部署8的计划执行已结束
2018-08-21 17:40:50.280 +00:00 [ERR]-边缘代理计划执行失败.
System.AggregateException:发生一个或多个错误. (错误调用启动模块PythonModuleNest:容器运行时错误-ApiError(ApiError {代码:InternalServerError,内容:Some(Object({"message" :: String("linux runtime spec devices: 添加自定义设备\"/home/pi/Offering2/test/Nest \":不是设备节点)})))))时错误地收集设备信息. Microsoft.Azure.Devices.Edge.Agent.Edgelet.EdgeletCommunicationException:调用启动模块PythonModuleNest时出错: 容器运行时错误-ApiError(ApiError {代码:InternalServerError,内容:Some(Object({"message":String("Linux运行时规范设备:在添加自定义设备\"/home/pi/Offering2时收集设备信息时出错/test/Nest \": 不是设备节点")}))})
  /n/opt/vsts/work/1/s/edge-agent/src/Microsoft中的Microsoft.Azure.Devices.Edge.Agent.Edgelet.ModuleManagementHttpClient.Execute [T](Func`1函数,字符串操作). Azure.Devices.Edge.Agent.Edgelet/ModuleManagementHttpClient.cs:线194
 在/opt/vsts/work/1/s/edge-agent/src/Microsoft.Azure.Devices.Edge.Agent中的Microsoft.Azure.Devices.Edge.Agent.Edgelet.ModuleManagementHttpClient.StartModuleAsync(String name)中. Edgelet/ModuleManagementHttpClient.cs:第142行
 在/opt/vsts/work/1/s/edge-agent/src/Microsoft.Azure.Devices.Edge中的Microsoft.Azure.Devices.Edge.Agent.Core.LoggingCommandFactory.LoggingCommand.ExecuteAsync(CancellationToken令牌)中. Agent.Core/LoggingCommandFactory.cs:第60行
 在/opt/vsts/work/1/s/edge-agent/src/Microsoft.Azure.Devices.Edge中的Microsoft.Azure.Devices.Edge.Agent.Core.Commands.GroupCommand.ExecuteAsync(CancellationToken令牌)中. Agent.Core/commands/GroupCommand.cs:第36行
 在/opt/vsts/work/1/s/edge-agent/src/Microsoft.Azure.Devices.Edge中的Microsoft.Azure.Devices.Edge.Agent.Core.LoggingCommandFactory.LoggingCommand.ExecuteAsync(CancellationToken令牌)中. Agent.Core/LoggingCommandFactory.cs:第60行
  /opt/vsts/work/1/s/edge-agent/src/Microsoft中的Microsoft.Azure.Devices.Edge.Agent.Core.PlanRunners.OrderedRetryPlanRunner.ExecuteAsync(Int64部署ID,计划计划,CancellationToken令牌). Azure.Devices.Edge.Agent.Core/planrunners/OrdererdRetryPlanRunner.cs:line 82
    ---内部异常堆栈跟踪的结尾---
    Microsoft.Azure.Devices.Edge.Agent.Core.PlanRunners.OrderedRetryPlanRunner.<> c.< ExecuteAsync> b__7_0(List`1 f)在/opt/vsts/work/1/s/edge-中agent/src/Microsoft.Azure.Devices.Edge.Agent.Core/planrunners/OrdererdRetryPlanRunner.cs:line 117
 在/opt/vsts/work/1/s/edge-util/src/Microsoft.Azure.Devices.Edge中的Microsoft.Azure.Devices.Edge.Util.Option`1.ForEach(Action`1 action)中. Util/Option.cs:第135行
  /opt/vsts/work/1/s/edge-agent/src/Microsoft中的Microsoft.Azure.Devices.Edge.Agent.Core.PlanRunners.OrderedRetryPlanRunner.ExecuteAsync(Int64部署ID,计划计划,CancellationToken令牌). Azure.Devices.Edge.Agent.Core/planrunners/OrdererdRetryPlanRunner.cs:line 117
 在/opt/vsts/work/1/s/edge-agent/src/Microsoft.Azure.Devices.Edge.Agent中的Microsoft.Azure.Devices.Edge.Agent.Core.Agent.ReconcileAsync(CancellationToken令牌)中. Core/Agent.cs:第172行
---> (内部异常#0)Microsoft.Azure.Devices.Edge.Agent.Edgelet.EdgeletCommunicationException-消息:调用启动模块PythonModuleNest时出错:容器运行时错误-ApiError(ApiError {代码:InternalServerError,内容:Some(Object({ ;: 字符串("Linux运行时规范设备:在添加自定义设备\"/home/pi/Offering2/test/Nest \":不是设备节点的同时收集设备信息时出错),}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}()在: Microsoft.Azure.Devices.Edge.Agent.Edgelet.ModuleManagementHttpClient.Execute [T](Func`1 func,字符串操作)在/opt/vsts/work/1/s/edge-agent/src/Microsoft.Azure.Devices.Edge.Agent.Edgelet/ModuleManagementHttpClient.cs:line 194
 在/opt/vsts/work/1/s/edge-agent/src/Microsoft.Azure.Devices.Edge.Agent中的Microsoft.Azure.Devices.Edge.Agent.Edgelet.ModuleManagementHttpClient.StartModuleAsync(String name)中. Edgelet/ModuleManagementHttpClient.cs:第142行
 在/opt/vsts/work/1/s/edge-agent/src/Microsoft.Azure.Devices.Edge中的Microsoft.Azure.Devices.Edge.Agent.Core.LoggingCommandFactory.LoggingCommand.ExecuteAsync(CancellationToken令牌)中. Agent.Core/LoggingCommandFactory.cs:第60行
 在/opt/vsts/work/1/s/edge-agent/src/Microsoft.Azure.Devices.Edge中的Microsoft.Azure.Devices.Edge.Agent.Core.Commands.GroupCommand.ExecuteAsync(CancellationToken令牌)中. Agent.Core/commands/GroupCommand.cs:第36行
 在/opt/vsts/work/1/s/edge-agent/src/Microsoft.Azure.Devices.Edge中的Microsoft.Azure.Devices.Edge.Agent.Core.LoggingCommandFactory.LoggingCommand.ExecuteAsync(CancellationToken令牌)中. Agent.Core/LoggingCommandFactory.cs:第60行
  /opt/vsts/work/1/s/edge-agent/src/Microsoft中的Microsoft.Azure.Devices.Edge.Agent.Core.PlanRunners.OrderedRetryPlanRunner.ExecuteAsync(Int64部署ID,计划计划,CancellationToken令牌). Azure.Devices.Edge.Agent.Core/planrunners/OrdererdRetryPlanRunner.cs:line 82< ---

2018-08-21 17:40:50.352 +00:00 [WRN]-调解由于异常而失败
System.AggregateException:发生一个或多个错误. (错误调用启动模块PythonModuleNest:容器运行时错误-ApiError(ApiError {代码:InternalServerError,内容:Some(Object({"message" :: String("linux runtime spec devices: 添加自定义设备\"/home/pi/Offering2/test/Nest \":不是设备节点)})))))时错误地收集设备信息. Microsoft.Azure.Devices.Edge.Agent.Edgelet.EdgeletCommunicationException:调用启动模块PythonModuleNest时出错: 容器运行时错误-ApiError(ApiError {代码:InternalServerError,内容:Some(Object({"message":String("Linux运行时规范设备:在添加自定义设备\"/home/pi/Offering2时收集设备信息时出错/test/Nest \": 不是设备节点")}))})
  /n/opt/vsts/work/1/s/edge-agent/src/Microsoft中的Microsoft.Azure.Devices.Edge.Agent.Edgelet.ModuleManagementHttpClient.Execute [T](Func`1函数,字符串操作). Azure.Devices.Edge.Agent.Edgelet/ModuleManagementHttpClient.cs:线194
 在/opt/vsts/work/1/s/edge-agent/src/Microsoft.Azure.Devices.Edge.Agent中的Microsoft.Azure.Devices.Edge.Agent.Edgelet.ModuleManagementHttpClient.StartModuleAsync(String name)中. Edgelet/ModuleManagementHttpClient.cs:第142行
 在/opt/vsts/work/1/s/edge-agent/src/Microsoft.Azure.Devices.Edge中的Microsoft.Azure.Devices.Edge.Agent.Core.LoggingCommandFactory.LoggingCommand.ExecuteAsync(CancellationToken令牌)中. Agent.Core/LoggingCommandFactory.cs:第60行
 在/opt/vsts/work/1/s/edge-agent/src/Microsoft.Azure.Devices.Edge中的Microsoft.Azure.Devices.Edge.Agent.Core.Commands.GroupCommand.ExecuteAsync(CancellationToken令牌)中. Agent.Core/commands/GroupCommand.cs:第36行
 在/opt/vsts/work/1/s/edge-agent/src/Microsoft.Azure.Devices.Edge中的Microsoft.Azure.Devices.Edge.Agent.Core.LoggingCommandFactory.LoggingCommand.ExecuteAsync(CancellationToken令牌)中. Agent.Core/LoggingCommandFactory.cs:第60行
  /opt/vsts/work/1/s/edge-agent/src/Microsoft中的Microsoft.Azure.Devices.Edge.Agent.Core.PlanRunners.OrderedRetryPlanRunner.ExecuteAsync(Int64部署ID,计划计划,CancellationToken令牌). Azure.Devices.Edge.Agent.Core/planrunners/OrdererdRetryPlanRunner.cs:line 82
    ---内部异常堆栈跟踪的结尾---
    Microsoft.Azure.Devices.Edge.Agent.Core.PlanRunners.OrderedRetryPlanRunner.<> c.< ExecuteAsync> b__7_0(List`1 f)在/opt/vsts/work/1/s/edge-中agent/src/Microsoft.Azure.Devices.Edge.Agent.Core/planrunners/OrdererdRetryPlanRunner.cs:line 117
 在/opt/vsts/work/1/s/edge-util/src/Microsoft.Azure.Devices.Edge中的Microsoft.Azure.Devices.Edge.Util.Option`1.ForEach(Action`1 action)中. Util/Option.cs:第135行
  /opt/vsts/work/1/s/edge-agent/src/Microsoft中的Microsoft.Azure.Devices.Edge.Agent.Core.PlanRunners.OrderedRetryPlanRunner.ExecuteAsync(Int64部署ID,计划计划,CancellationToken令牌). Azure.Devices.Edge.Agent.Core/planrunners/OrdererdRetryPlanRunner.cs:line 117
 在/opt/vsts/work/1/s/edge-agent/src/Microsoft.Azure.Devices.Edge.Agent中的Microsoft.Azure.Devices.Edge.Agent.Core.Agent.ReconcileAsync(CancellationToken令牌)中. Core/Agent.cs:第172行
 在/opt/vsts/work/1/s/edge-agent/src/Microsoft.Azure.Devices.Edge.Agent中的Microsoft.Azure.Devices.Edge.Agent.Core.Agent.ReconcileAsync(CancellationToken令牌)中. Core/Agent.cs:第183行
---> (内部异常#0)Microsoft.Azure.Devices.Edge.Agent.Edgelet.EdgeletCommunicationException-消息:调用启动模块PythonModuleNest时出错:容器运行时错误-ApiError(ApiError {代码:InternalServerError,内容:Some(Object({ ;: 字符串("Linux运行时规范设备:在添加自定义设备\"/home/pi/Offering2/test/Nest \":不是设备节点的同时收集设备信息时出错),}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}()在: Microsoft.Azure.Devices.Edge.Agent.Edgelet.ModuleManagementHttpClient.Execute [T](Func`1 func,字符串操作)在/opt/vsts/work/1/s/edge-agent/src/Microsoft.Azure.Devices.Edge.Agent.Edgelet/ModuleManagementHttpClient.cs:line 194
 在/opt/vsts/work/1/s/edge-agent/src/Microsoft.Azure.Devices.Edge.Agent中的Microsoft.Azure.Devices.Edge.Agent.Edgelet.ModuleManagementHttpClient.StartModuleAsync(String name)中. Edgelet/ModuleManagementHttpClient.cs:第142行
 在/opt/vsts/work/1/s/edge-agent/src/Microsoft.Azure.Devices.Edge中的Microsoft.Azure.Devices.Edge.Agent.Core.LoggingCommandFactory.LoggingCommand.ExecuteAsync(CancellationToken令牌)中. Agent.Core/LoggingCommandFactory.cs:第60行
 在/opt/vsts/work/1/s/edge-agent/src/Microsoft.Azure.Devices.Edge中的Microsoft.Azure.Devices.Edge.Agent.Core.Commands.GroupCommand.ExecuteAsync(CancellationToken令牌)中. Agent.Core/commands/GroupCommand.cs:第36行
 在/opt/vsts/work/1/s/edge-agent/src/Microsoft.Azure.Devices.Edge中的Microsoft.Azure.Devices.Edge.Agent.Core.LoggingCommandFactory.LoggingCommand.ExecuteAsync(CancellationToken令牌)中. Agent.Core/LoggingCommandFactory.cs:第60行
  /opt/vsts/work/1/s/edge-agent/src/Microsoft中的Microsoft.Azure.Devices.Edge.Agent.Core.PlanRunners.OrderedRetryPlanRunner.ExecuteAsync(Int64部署ID,计划计划,CancellationToken令牌). Azure.Devices.Edge.Agent.Core/planrunners/OrdererdRetryPlanRunner.cs:line 82< ---

2018-08-21 17:40:50.600 +00:00 [INF]-更新了报告的属性
2018-08-21 17:40:55.919 +00:00 [INF]-开始执行部署8的计划
2018-08-21 17:40:55.920 +00:00 [INF]-执行命令:"命令组:(
  [停止模块PythonModuleNest]
  [启动模块PythonModuleNest]
  [保存要保存的PythonModuleNest]



解决方案

你好lke59,

看来您无法从VS代码成功构建arm32v7的模块映像,对吗?

要在Raspberry Pi上运行,构建arm32v7映像是正确的.

但是不支持在Linux AMD64主机上构建ARM映像,因此我们需要首先确认您的运行VS代码以构建边缘模块的主机平台.

最诚挚的问候,

丽塔


Hello,

I am trying to deploy a simple custom module that reads a file in my raspberry pi (running Raspbian OS) and sends it to the cloud using VS Code.<o:p></o:p>

However, there seems to be an issue with custom modules running on raspberry pi.<o:p></o:p>

I set the module configuration on the deployment JSON file this way:<o:p></o:p>

 <o:p></o:p>

"PythonModuleNest": {<o:p></o:p>

            "version": "1.0",<o:p></o:p>

            "type": "docker",<o:p></o:p>

            "status": "running",<o:p></o:p>

            "restartPolicy": "always",<o:p></o:p>

            "settings": {<o:p></o:p>

              "image": "${MODULES.PythonModuleNest.arm32v7}",<o:p></o:p>

              "createOptions": "{\"HostConfig\":{\"Devices\": [{\"PathOnHost\": \"/home/pi/Offering2/test/Nest\",\"PathInContainer\": \"/home/pi/Offering2/test/Nest\",\"CgroupPermissions\": \"rwm\"}]}}"<o:p></o:p>

            }<o:p></o:p>

 <o:p></o:p>

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:<o:p></o:p>

 <o:p></o:p>

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<o:p></o:p>

standard_init_linux.go:190: exec user process caused "exec format error"<o:p></o:p>

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<o:p></o:p>

 <o:p></o:p>

So I also tried changing it to the default which was "${MODULES.PythonModuleNest.amd64}". This time it built and was pushed to the cloud container repository, but when I deployed it to the edge device it did not work. On the azure portal it shows a "backoff" and "500: edge runtime error". It does not work on the edge and simply shows "failed" when I type "iotedge list" although the edgehub, edgeagent and simulated temp sensor modules are working fine. The logs for the edge agent are below and it pretty much repeats every minute. 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.<o:p></o:p>

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.

Thanks a lot.

Ike<o:p></o:p>

LOGS

 [Stop module PythonModuleNest]
  [Start module PythonModuleNest]
  [Saving PythonModuleNest to store]
)
2018-08-21 17:40:50.276 +00:00 [INF] - Plan execution ended for deployment 8
2018-08-21 17:40:50.280 +00:00 [ERR] - Edge agent plan execution failed.
System.AggregateException: One or more errors occurred. (Error calling start module PythonModuleNest: Container runtime error - ApiError(ApiError { code: InternalServerError, content: Some(Object({"message": String("linux runtime spec devices: error gathering device information while adding custom device \"/home/pi/Offering2/test/Nest\": not a device node")})) })) ---> Microsoft.Azure.Devices.Edge.Agent.Edgelet.EdgeletCommunicationException: Error calling start module PythonModuleNest: Container runtime error - ApiError(ApiError { code: InternalServerError, content: Some(Object({"message": String("linux runtime spec devices: error gathering device information while adding custom device \"/home/pi/Offering2/test/Nest\": not a device node")})) })
   at Microsoft.Azure.Devices.Edge.Agent.Edgelet.ModuleManagementHttpClient.Execute[T](Func`1 func, String operation) in /opt/vsts/work/1/s/edge-agent/src/Microsoft.Azure.Devices.Edge.Agent.Edgelet/ModuleManagementHttpClient.cs:line 194
   at Microsoft.Azure.Devices.Edge.Agent.Edgelet.ModuleManagementHttpClient.StartModuleAsync(String name) in /opt/vsts/work/1/s/edge-agent/src/Microsoft.Azure.Devices.Edge.Agent.Edgelet/ModuleManagementHttpClient.cs:line 142
   at Microsoft.Azure.Devices.Edge.Agent.Core.LoggingCommandFactory.LoggingCommand.ExecuteAsync(CancellationToken token) in /opt/vsts/work/1/s/edge-agent/src/Microsoft.Azure.Devices.Edge.Agent.Core/LoggingCommandFactory.cs:line 60
   at Microsoft.Azure.Devices.Edge.Agent.Core.Commands.GroupCommand.ExecuteAsync(CancellationToken token) in /opt/vsts/work/1/s/edge-agent/src/Microsoft.Azure.Devices.Edge.Agent.Core/commands/GroupCommand.cs:line 36
   at Microsoft.Azure.Devices.Edge.Agent.Core.LoggingCommandFactory.LoggingCommand.ExecuteAsync(CancellationToken token) in /opt/vsts/work/1/s/edge-agent/src/Microsoft.Azure.Devices.Edge.Agent.Core/LoggingCommandFactory.cs:line 60
   at Microsoft.Azure.Devices.Edge.Agent.Core.PlanRunners.OrderedRetryPlanRunner.ExecuteAsync(Int64 deploymentId, Plan plan, CancellationToken token) in /opt/vsts/work/1/s/edge-agent/src/Microsoft.Azure.Devices.Edge.Agent.Core/planrunners/OrdererdRetryPlanRunner.cs:line 82
   --- End of inner exception stack trace ---
   at Microsoft.Azure.Devices.Edge.Agent.Core.PlanRunners.OrderedRetryPlanRunner.<>c.<ExecuteAsync>b__7_0(List`1 f) in /opt/vsts/work/1/s/edge-agent/src/Microsoft.Azure.Devices.Edge.Agent.Core/planrunners/OrdererdRetryPlanRunner.cs:line 117
   at Microsoft.Azure.Devices.Edge.Util.Option`1.ForEach(Action`1 action) in /opt/vsts/work/1/s/edge-util/src/Microsoft.Azure.Devices.Edge.Util/Option.cs:line 135
   at Microsoft.Azure.Devices.Edge.Agent.Core.PlanRunners.OrderedRetryPlanRunner.ExecuteAsync(Int64 deploymentId, Plan plan, CancellationToken token) in /opt/vsts/work/1/s/edge-agent/src/Microsoft.Azure.Devices.Edge.Agent.Core/planrunners/OrdererdRetryPlanRunner.cs:line 117
   at Microsoft.Azure.Devices.Edge.Agent.Core.Agent.ReconcileAsync(CancellationToken token) in /opt/vsts/work/1/s/edge-agent/src/Microsoft.Azure.Devices.Edge.Agent.Core/Agent.cs:line 172
---> (Inner Exception #0) Microsoft.Azure.Devices.Edge.Agent.Edgelet.EdgeletCommunicationException- Message:Error calling start module PythonModuleNest: Container runtime error - ApiError(ApiError { code: InternalServerError, content: Some(Object({"message": String("linux runtime spec devices: error gathering device information while adding custom device \"/home/pi/Offering2/test/Nest\": not a device node")})) }), StatusCode:500, at:   at Microsoft.Azure.Devices.Edge.Agent.Edgelet.ModuleManagementHttpClient.Execute[T](Func`1 func, String operation) in /opt/vsts/work/1/s/edge-agent/src/Microsoft.Azure.Devices.Edge.Agent.Edgelet/ModuleManagementHttpClient.cs:line 194
   at Microsoft.Azure.Devices.Edge.Agent.Edgelet.ModuleManagementHttpClient.StartModuleAsync(String name) in /opt/vsts/work/1/s/edge-agent/src/Microsoft.Azure.Devices.Edge.Agent.Edgelet/ModuleManagementHttpClient.cs:line 142
   at Microsoft.Azure.Devices.Edge.Agent.Core.LoggingCommandFactory.LoggingCommand.ExecuteAsync(CancellationToken token) in /opt/vsts/work/1/s/edge-agent/src/Microsoft.Azure.Devices.Edge.Agent.Core/LoggingCommandFactory.cs:line 60
   at Microsoft.Azure.Devices.Edge.Agent.Core.Commands.GroupCommand.ExecuteAsync(CancellationToken token) in /opt/vsts/work/1/s/edge-agent/src/Microsoft.Azure.Devices.Edge.Agent.Core/commands/GroupCommand.cs:line 36
   at Microsoft.Azure.Devices.Edge.Agent.Core.LoggingCommandFactory.LoggingCommand.ExecuteAsync(CancellationToken token) in /opt/vsts/work/1/s/edge-agent/src/Microsoft.Azure.Devices.Edge.Agent.Core/LoggingCommandFactory.cs:line 60
   at Microsoft.Azure.Devices.Edge.Agent.Core.PlanRunners.OrderedRetryPlanRunner.ExecuteAsync(Int64 deploymentId, Plan plan, CancellationToken token) in /opt/vsts/work/1/s/edge-agent/src/Microsoft.Azure.Devices.Edge.Agent.Core/planrunners/OrdererdRetryPlanRunner.cs:line 82<---

2018-08-21 17:40:50.352 +00:00 [WRN] - Reconcile failed because of the an exception
System.AggregateException: One or more errors occurred. (Error calling start module PythonModuleNest: Container runtime error - ApiError(ApiError { code: InternalServerError, content: Some(Object({"message": String("linux runtime spec devices: error gathering device information while adding custom device \"/home/pi/Offering2/test/Nest\": not a device node")})) })) ---> Microsoft.Azure.Devices.Edge.Agent.Edgelet.EdgeletCommunicationException: Error calling start module PythonModuleNest: Container runtime error - ApiError(ApiError { code: InternalServerError, content: Some(Object({"message": String("linux runtime spec devices: error gathering device information while adding custom device \"/home/pi/Offering2/test/Nest\": not a device node")})) })
   at Microsoft.Azure.Devices.Edge.Agent.Edgelet.ModuleManagementHttpClient.Execute[T](Func`1 func, String operation) in /opt/vsts/work/1/s/edge-agent/src/Microsoft.Azure.Devices.Edge.Agent.Edgelet/ModuleManagementHttpClient.cs:line 194
   at Microsoft.Azure.Devices.Edge.Agent.Edgelet.ModuleManagementHttpClient.StartModuleAsync(String name) in /opt/vsts/work/1/s/edge-agent/src/Microsoft.Azure.Devices.Edge.Agent.Edgelet/ModuleManagementHttpClient.cs:line 142
   at Microsoft.Azure.Devices.Edge.Agent.Core.LoggingCommandFactory.LoggingCommand.ExecuteAsync(CancellationToken token) in /opt/vsts/work/1/s/edge-agent/src/Microsoft.Azure.Devices.Edge.Agent.Core/LoggingCommandFactory.cs:line 60
   at Microsoft.Azure.Devices.Edge.Agent.Core.Commands.GroupCommand.ExecuteAsync(CancellationToken token) in /opt/vsts/work/1/s/edge-agent/src/Microsoft.Azure.Devices.Edge.Agent.Core/commands/GroupCommand.cs:line 36
   at Microsoft.Azure.Devices.Edge.Agent.Core.LoggingCommandFactory.LoggingCommand.ExecuteAsync(CancellationToken token) in /opt/vsts/work/1/s/edge-agent/src/Microsoft.Azure.Devices.Edge.Agent.Core/LoggingCommandFactory.cs:line 60
   at Microsoft.Azure.Devices.Edge.Agent.Core.PlanRunners.OrderedRetryPlanRunner.ExecuteAsync(Int64 deploymentId, Plan plan, CancellationToken token) in /opt/vsts/work/1/s/edge-agent/src/Microsoft.Azure.Devices.Edge.Agent.Core/planrunners/OrdererdRetryPlanRunner.cs:line 82
   --- End of inner exception stack trace ---
   at Microsoft.Azure.Devices.Edge.Agent.Core.PlanRunners.OrderedRetryPlanRunner.<>c.<ExecuteAsync>b__7_0(List`1 f) in /opt/vsts/work/1/s/edge-agent/src/Microsoft.Azure.Devices.Edge.Agent.Core/planrunners/OrdererdRetryPlanRunner.cs:line 117
   at Microsoft.Azure.Devices.Edge.Util.Option`1.ForEach(Action`1 action) in /opt/vsts/work/1/s/edge-util/src/Microsoft.Azure.Devices.Edge.Util/Option.cs:line 135
   at Microsoft.Azure.Devices.Edge.Agent.Core.PlanRunners.OrderedRetryPlanRunner.ExecuteAsync(Int64 deploymentId, Plan plan, CancellationToken token) in /opt/vsts/work/1/s/edge-agent/src/Microsoft.Azure.Devices.Edge.Agent.Core/planrunners/OrdererdRetryPlanRunner.cs:line 117
   at Microsoft.Azure.Devices.Edge.Agent.Core.Agent.ReconcileAsync(CancellationToken token) in /opt/vsts/work/1/s/edge-agent/src/Microsoft.Azure.Devices.Edge.Agent.Core/Agent.cs:line 172
   at Microsoft.Azure.Devices.Edge.Agent.Core.Agent.ReconcileAsync(CancellationToken token) in /opt/vsts/work/1/s/edge-agent/src/Microsoft.Azure.Devices.Edge.Agent.Core/Agent.cs:line 183
---> (Inner Exception #0) Microsoft.Azure.Devices.Edge.Agent.Edgelet.EdgeletCommunicationException- Message:Error calling start module PythonModuleNest: Container runtime error - ApiError(ApiError { code: InternalServerError, content: Some(Object({"message": String("linux runtime spec devices: error gathering device information while adding custom device \"/home/pi/Offering2/test/Nest\": not a device node")})) }), StatusCode:500, at:   at Microsoft.Azure.Devices.Edge.Agent.Edgelet.ModuleManagementHttpClient.Execute[T](Func`1 func, String operation) in /opt/vsts/work/1/s/edge-agent/src/Microsoft.Azure.Devices.Edge.Agent.Edgelet/ModuleManagementHttpClient.cs:line 194
   at Microsoft.Azure.Devices.Edge.Agent.Edgelet.ModuleManagementHttpClient.StartModuleAsync(String name) in /opt/vsts/work/1/s/edge-agent/src/Microsoft.Azure.Devices.Edge.Agent.Edgelet/ModuleManagementHttpClient.cs:line 142
   at Microsoft.Azure.Devices.Edge.Agent.Core.LoggingCommandFactory.LoggingCommand.ExecuteAsync(CancellationToken token) in /opt/vsts/work/1/s/edge-agent/src/Microsoft.Azure.Devices.Edge.Agent.Core/LoggingCommandFactory.cs:line 60
   at Microsoft.Azure.Devices.Edge.Agent.Core.Commands.GroupCommand.ExecuteAsync(CancellationToken token) in /opt/vsts/work/1/s/edge-agent/src/Microsoft.Azure.Devices.Edge.Agent.Core/commands/GroupCommand.cs:line 36
   at Microsoft.Azure.Devices.Edge.Agent.Core.LoggingCommandFactory.LoggingCommand.ExecuteAsync(CancellationToken token) in /opt/vsts/work/1/s/edge-agent/src/Microsoft.Azure.Devices.Edge.Agent.Core/LoggingCommandFactory.cs:line 60
   at Microsoft.Azure.Devices.Edge.Agent.Core.PlanRunners.OrderedRetryPlanRunner.ExecuteAsync(Int64 deploymentId, Plan plan, CancellationToken token) in /opt/vsts/work/1/s/edge-agent/src/Microsoft.Azure.Devices.Edge.Agent.Core/planrunners/OrdererdRetryPlanRunner.cs:line 82<---

2018-08-21 17:40:50.600 +00:00 [INF] - Updated reported properties
2018-08-21 17:40:55.919 +00:00 [INF] - Plan execution started for deployment 8
2018-08-21 17:40:55.920 +00:00 [INF] - Executing command: "Command Group: (
  [Stop module PythonModuleNest]
  [Start module PythonModuleNest]
  [Saving PythonModuleNest to store]



解决方案

Hello lke59,

It seems you can't build the module image for arm32v7 from VS code successfully, right?

For running on Raspberry Pi, it is right to build arm32v7 image.

But building ARM images on a linux AMD64 host is not supported so we need first to confirm your host platform that running VS code to build the edge module.

Best regards,

Rita


这篇关于在Raspberry Pi上部署基于Python的IoT Edge模块的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆