azure-iot-edge - IoT Edge 中心异常 - 无法启动 Kestrel
问题描述
我在自定义 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()
解决方案
我们通过在 Azure 门户(主页 -> IoT Edge(预览版)-> 设备详细信息-> 设置模块 -> 高级 Edge 设置)中的 Edge Hub 的“创建选项”中添加以下行来解决此问题:
{"Env":["EdgeHubUser=root"]}
推荐阅读
- java - 为什么改造响应列表为空?
- php - php artisan serve 后在 8000 端口获取 PHP 容器
- python - SQLAlchemy - 依赖于外部系统的属性
- r - 安装 R 包时设置 C 依赖位置
- docker - Hyperledger Fabric 对等容器未出现
- javascript - 如何将逐步键和值添加到三个不同的选择选项值
- symfony - 将 Twig 全局变量导入 symfony 控制器
- world-of-warcraft - 客户端卡在“身份验证”阶段
- apache-spark - Apache Spark 不使用来自 Hive 分区外部表的分区信息
- rust - 如何使用 rust 语言在图像中绘制矩形