Closed simondegheselle closed 1 year ago
Failed to start module cam-40341771, error Failed to listen on workload socket: Is a directory (os error 21)
This is the problem. At some point something that isn't IoT Edge started the container. That meant the dedicated workload socket (/var/lib/aziot/edged/mnt/${module_id}.sock
) that is mounted in every module container did not exist, so dockerd helpfully created the volume mount as a directory. Now when IoT Edge tries to start it it can't create the socket because there's already a directory there.
You can verify that that path is a directory, and you can fix it by deleting it.
The next release after 1.4.18 will automatically delete the directory when this happens.
The next release after 1.4.18 will automatically delete the directory when this happens.
Description
When trying to run a custom Edge module via Azure IoT Edge runtime, it fails to start. However, when the module name is changed, the EdgeAgent is able to successfully start the module. This issue seems confined to Azure IoT as running the Docker container directly without Azure IoT runtime works as expected.
The manifest uses a local registry to pull the images. Images are verified to be stored correctly in the local registry. For example:
Error logs
Error logs from edgeAgent module
Azure iot edge system logs
Manifest
Fails for manifest with following options
And for a manifest without any create options
Iot edge check
Troubleshooting
sudo iotedge system restart
which recreates the worload socket"/etc/aziot/storage/:/iotedge/storage/"