Skip to content

Commit 48edb17

Browse files
authored
Merge pull request #191970 from raisalitch/config-file
Troubleshooting update - security daemon could not start
2 parents e42fcba + b18b7dc commit 48edb17

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

articles/iot-edge/troubleshoot-common-errors.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -494,6 +494,28 @@ When migrating to the new IoT hub (assuming not using DPS), follow these steps i
494494
:::moniker-end
495495
<!-- end 1.2 -->
496496
497+
## Security daemon couldn't start successfully
498+
499+
**Observed behavior:**
500+
501+
The security daemon fails to start and module containers aren't created. The `edgeAgent`, `edgeHub` and other custom modules aren't started by IoT Edge service. In `aziot-edged` logs, you see this error:
502+
503+
> - The daemon could not start up successfully: Could not start management service
504+
> - caused by: An error occurred for path /var/run/iotedge/mgmt.sock
505+
> - caused by: Permission denied (os error 13)
506+
507+
508+
**Root cause:**
509+
510+
For all Linux distros except CentOS 7, IoT Edge's default configuration is to use `systemd` socket activation. A permission error happens if you change the configuration file to not use socket activation but leave the URLs as `/var/run/iotedge/*.sock`, since the `iotedge` user can't write to `/var/run/iotedge` meaning it can't unlock and mount the sockets itself.
511+
512+
**Resolution:**
513+
514+
You do not need to disable socket activation on a distro where socket activation is supported. However, if you prefer to not use socket activation at all, put the sockets in `/var/lib/iotedge/`. To do this
515+
1. Run `systemctl disable iotedge.socket iotedge.mgmt.socket` to disable the socket units so that systemd doesn't start them unnecessarily
516+
1. Change the iotedge config to use `/var/lib/iotedge/*.sock` in both `connect` and `listen` sections
517+
1. If you already have modules, they have the old `/var/run/iotedge/*.sock` mounts, so `docker rm -f` them.
518+
497519
## Next steps
498520
499521
Do you think that you found a bug in the IoT Edge platform? [Submit an issue](https://github.com/Azure/iotedge/issues) so that we can continue to improve.

0 commit comments

Comments
 (0)