IoT Edge Hub异常 - 无法启动Kestrel

时间:2018-05-09 02:53:58

标签: azure-iot-edge

我在自定义Debian Linux发行版上运行IoT Edge透明网关但是我遇到了这个错误"无法启动Kestrel"时不时地。有谁知道这个错误的原因是什么?

2018-05-06 23:54:49.750 +00:00 [INF] - Starting Edge Hub
2018-05-06 23:54:49.756 +00:00 [INF] - Version - 1.0.0-preview022.11567621 (12a8e1bb63e619b17ca685efd470ad3f412034f4)
2018-05-06 23:54:49.757 +00:00 [INF] - 
        █████╗ ███████╗██╗   ██╗██████╗ ███████╗
       ██╔══██╗╚══███╔╝██║   ██║██╔══██╗██╔════╝
       ███████║  ███╔╝ ██║   ██║██████╔╝█████╗
       ██╔══██║ ███╔╝  ██║   ██║██╔══██╗██╔══╝
       ██║  ██║███████╗╚██████╔╝██║  ██║███████╗
       ╚═╝  ╚═╝╚══════╝ ╚═════╝ ╚═╝  ╚═╝╚══════╝

 ██╗ ██████╗ ████████╗    ███████╗██████╗  ██████╗ ███████╗
 ██║██╔═══██╗╚══██╔══╝    ██╔════╝██╔══██╗██╔════╝ ██╔════╝
 ██║██║   ██║   ██║       █████╗  ██║  ██║██║  ███╗█████╗
 ██║██║   ██║   ██║       ██╔══╝  ██║  ██║██║   ██║██╔══╝
 ██║╚██████╔╝   ██║       ███████╗██████╔╝╚██████╔╝███████╗
 ╚═╝ ╚═════╝    ╚═╝       ╚══════╝╚═════╝  ╚═════╝ ╚══════╝

2018-05-06 23:54:49.763 +00:00 [INF] - Initializing configuration
2018-05-06 23:54:51.071 +00:00 [INF] - Created persistent store   at /tmp/edgeHub
2018-05-06 23:54:51.293 +00:00 [INF] - Attempting to connect to IoT Hub for client SIVgateway/$edgeHub via AMQP...
2018-05-06 23:54:54.723 +00:00 [INF] - Connected to IoT Hub for client SIVgateway/$edgeHub via AMQP, with client operation timeout 60000.
2018-05-06 23:54:54.769 +00:00 [INF] - Created cloud connection for client SIVgateway/$edgeHub
2018-05-06 23:54:54.782 +00:00 [INF] - New cloud connection created for device SIVgateway/$edgeHub
2018-05-06 23:54:54.887 +00:00 [INF] - New device connection for device SIVgateway/$edgeHub
2018-05-06 23:54:56.330 +00:00 [INF] - Created new message store
2018-05-06 23:54:56.344 +00:00 [INF] - Started task to cleanup processed and stale messages
2018-05-06 23:54:58.266 +00:00 [INF] - Obtained edge hub config from module twin
2018-05-06 23:54:58.773 +00:00 [INF] - Set the following 1 route(s) in edge hub
2018-05-06 23:54:58.790 +00:00 [INF] - route: FROM /* INTO $upstream
2018-05-06 23:54:58.794 +00:00 [INF] - Updated message store TTL to 7200 seconds
2018-05-06 23:54:58.802 +00:00 [INF] - Updated the edge hub store and forward configuration
2018-05-06 23:54:58.804 +00:00 [INF] - Initialized edge hub configuration
2018-05-06 23:54:59.039 +00:00 [INF] - Starting protocol heads - (HTTP, MQTT)
2018-05-06 23:54:59.050 +00:00 [INF] - Starting HTTP head
2018-05-06 23:54:59.294 +00:00 [INF] - Starting MQTT head
2018-05-06 23:55:00.347 +00:00 [INF] - Initializing TLS endpoint on port 8883 for MQTT head.
2018-05-06 23:55:00.686 +00:00 [INF] - Started MQTT head
2018-05-06 23:55:00.759 +00:00 [FTL] - Unable to start Kestrel.
Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.UvException: Error -13 EACCES permission denied
   at Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.LibuvFunctions.ThrowError(Int32 statusCode)
   at Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.UvTcpHandle.Bind(IPEndPoint endPoint)
   at Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Listener.ListenTcp(Boolean useFileHandle)
   at Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Listener.c.b__8_0(Listener listener)
   at Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.LibuvThread.DoPostWork()

2 个答案:

答案 0 :(得分:1)

我们设法通过将以下行添加到Azure门户中的Edge Hub的“创建选项”(主页 - > IoT Edge(预览) - >设备详细信息 - >设置模块 - &gt)来解决此问题;高级边缘设置):

{ “的Env”:[ “EdgeHubUser =根”]}

答案 1 :(得分:0)

在代理环境中运行应用程序时,我遇到相同的问题。

在代理之外运行时,完全没有问题。

要在代理中运行,我必须打开UpstreamProtocolhttps_proxy环境变量。

{"Env":["EdgeHubUser=root"]}对创建选项的帮助不大,因为它在edgeagent日志执行中显示无效的环境变量。