K8S 上的 IoTEdge,无法初始化模块运行时

时间:2021-07-09 22:32:30

标签: azure-iot-edge

我在 kubernetes 上运行 iotedge。使用 helm 安装 edge-kubernetes 后,创建的 pod 日志显示错误,短暂超时后 pod 重启。

K8S 集群是一个本地集群设置,主要使用“Kubernetes the hard way”方法,并进行了一些修改。

据我所知,iotedged 正在尝试与 Kubernetes 交互并遇到问题,但我不确定它正在尝试做什么以及如何让 iotedged 成功加载。

有什么想法吗?

Kubernetes 版本:

Client Version: version.Info{Major:"1", Minor:"21", GitVersion:"v1.21.0", GitCommit:"cb303e613a121a29364f75cc67d3d580833a7479", GitTreeState:"clean", BuildDate:"2021-04-08T16:31:21Z", GoVersion:"go1.16.1", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"21", GitVersion:"v1.21.0", GitCommit:"cb303e613a121a29364f75cc67d3d580833a7479", GitTreeState:"clean", BuildDate:"2021-04-08T16:25:06Z", GoVersion:"go1.16.1", Compiler:"gc", Platform:"linux/amd64"}

edgeiotd 错误:

<6>2021-07-09T22:00:02Z [INFO] - Starting Azure IoT Edge Security Daemon - Kubernetes mode
<6>2021-07-09T22:00:02Z [INFO] - Version - 1.1.3
<6>2021-07-09T22:00:02Z [INFO] - Using config file: /etc/iotedged/config.yaml
<6>2021-07-09T22:00:02Z [INFO] - Configuring /var/lib/iotedge as the home directory.
<6>2021-07-09T22:00:02Z [INFO] - Configuring certificates...
<6>2021-07-09T22:00:02Z [INFO] - Transparent gateway certificates not found, operating in quick start mode...
<6>2021-07-09T22:00:02Z [INFO] - Finished configuring provisioning environment variables and certificates.
<6>2021-07-09T22:00:02Z [INFO] - Initializing hsm...
<6>2021-07-09T22:00:02Z [INFO] - Finished initializing hsm.
<6>2021-07-09T22:00:02Z [INFO] - Provisioning edge device...
<6>2021-07-09T22:00:02Z [INFO] - Starting provisioning edge device via manual mode using a device connection string...
<6>2021-07-09T22:00:02Z [INFO] - Manually provisioning device "********" in hub "********.azure-devices.net"
<6>2021-07-09T22:00:02Z [INFO] - Finished provisioning edge device.
<6>2021-07-09T22:00:02Z [INFO] - Initializing the module runtime...
<6>2021-07-09T22:00:02Z [INFO] - Attempting to use config from /home/edgeletuser/.kube/config file.
<6>2021-07-09T22:00:02Z [INFO] - Using in-cluster config
<3>2021-07-09T22:00:34Z [ERR!] - The daemon could not start up successfully: Could not initialize module runtime
<3>2021-07-09T22:00:34Z [ERR!] -        caused by: Could not initialize kubernetes module runtime
<3>2021-07-09T22:00:34Z [ERR!] -        caused by: HTTP response error: SelfSubjectAccessReviewCreate
<3>2021-07-09T22:00:34Z [ERR!] -        caused by: Hyper HTTP error
<3>2021-07-09T22:00:34Z [ERR!] -        caused by: error trying to connect: Connection timed out (os error 110)
<6>2021-07-09T22:00:02Z [INFO] (/project/hsm-sys/azure-iot-hsm-c/src/hsm_log.c:log_init:41) Initialized logging

1 个答案:

答案 0 :(得分:0)

你还被屏蔽了吗?到目前为止您尝试过哪些故障排除步骤?你检查Common issues and resolutions for Azure IoT Edge了吗?根据错误消息未找到透明网关证书,在快速启动模式下运行守护进程无法成功启动:无法初始化模块运行时看起来设置不是正确配置。尝试重新启动服务器并检查透明网关设置。请参阅 transparent gateway setup 并检查您是否遗漏了任何内容。