Category: IoT Edge

Azure IoT Edge not starting

Sometimes a permission denied is a permission denied 🙁

[INFO] - Starting Azure IoT Edge Security Daemon
[INFO] - Version - 1.0.10~rc1
[INFO] - Using config file: /etc/iotedge/config.yaml
[INFO] - Configuring /var/lib/iotedge as the home directory.
[INFO] - Configuring certificates…
[INFO] - Transparent gateway certificates not found, operating in quick start mode…
[INFO] - Finished configuring provisioning environment variables and certificates.
[INFO] - Initializing hsm…
[INFO] - Finished initializing hsm.
[INFO] - Provisioning edge device…
[INFO] - Starting provisioning edge device via manual mode using a device connection string…
[INFO] - Manually provisioning device "iotedgedevice" in hub "iothub.azure-devices.net"
[INFO] - Finished provisioning edge device.
[INFO] - Initializing the module runtime…
[INFO] - Initializing module runtime…
[INFO] - Using runtime network id azure-iot-edge
[WARN] - Could not initialize module runtime
[WARN] - caused by: Container runtime error
[WARN] - caused by: error trying to connect: Permission denied (os error 13)
[ERR!] - The daemon could not start up successfully: Could not initialize module runtime
[ERR!] - caused by: Could not initialize module runtime
[ERR!] - caused by: Container runtime error
[ERR!] - caused by: error trying to connect: Permission denied (os error 13)

This is the output I got viajournalctl -u iotedge -f on a testinstallation.

For troubleshooting purpose I looked at the https://docs.microsoft.com/en-us/azure/iot-edge/troubleshoot guide. But nothing solved my problem. Then I disabled http and mqtt support as of https://docs.microsoft.com/en-us/azure/iot-edge/production-checklist. Still not starting.

Finally I got it up and running by creating a docker group, adding iotedge to it and changed the group ownership of the /var/run/docker.sock file sudo chown root:docker /var/run/docker.sock

This post is meant to be found via search engines if you (or me again) has the same startup problems.

My context: Ubuntu 20.04 with snap installed docker

VisionAI DevKit won’t deploy a module

Today my VisionAI DevKit was not deploying a module. In the logs (sudo journalctl -u iotedge -f) I could see the deployment was received:

Successfully pulled image machinelearndfd8df7d.azurecr.io/mobilenetimagenet:3
Creating module VisionSampleImagenet…
Could not create module VisionSampleImagenet
caused by: No such image: machinelearndfd8df7d.azurecr.io/mobilenetimagenet:3

Strange. During troubleshooting I started docker images and saw a lot of older images and versions. After deleting a log of them with docker image rm xyz the deployment succeeded and the module started. 🙂

Learning: Clean up the mess…