Boot time Avahi-daemon chroot open() failed

Hi,

I´m getting the following error at boot time using Apalis Ixora module. Seems to be a known error but I couldn’t find a solution.

Jun 13 17:39:11 apalis-imx6-4 avahi-daemon[482]: Found user ‘avahi’ (UID 993) and group ‘avahi’ (GID 990).

Jun 13 17:39:11 apalis-imx6-4 avahi-daemon[482]: Successfully dropped root privileges.

Jun 13 17:39:11 apalis-imx6-4 avahi-daemon[482]: avahi-daemon 0.6.31 starting up.

Jun 13 17:39:11 apalis-imx6-4 avahi-daemon[482]: Successfully called chroot().

Jun 13 17:39:11 apalis-imx6-4 avahi-daemon[482]: Successfully dropped remaining capabilities.

**Jun 13 17:39:11 apalis-imx6-4 avahi-daemon[487]: /home/oe-core/build/out-glibc/work/armv7at2hf-vfp-neon-angstrom-linux-gnueabi/avahi/0.6.31-r11.1/avahi-0.6.31/avahi-daemon/chroot.c: open() failed: No such file or directory

Jun 13 17:39:11 apalis-imx6-4 avahi-daemon[482]: Failed to open /etc/resolv.conf: Invalid argument**

Jun 13 17:39:11 apalis-imx6-4 avahi-daemon[482]: Loading service file /services/sftp-ssh.service.

Jun 13 17:39:11 apalis-imx6-4 avahi-daemon[482]: Loading service file /services/ssh.service.

Jun 13 17:39:11 apalis-imx6-4 avahi-daemon[482]: Network interface enumeration completed.

Jun 13 17:39:11 apalis-imx6-4 avahi-daemon[482]: Registering HINFO record with values ‘ARMV7L’/‘LINUX’.

Jun 13 17:39:11 apalis-imx6-4 avahi-daemon[482]: Server startup complete. Host name is apalis-imx6-4.local. Local service cookie is 1923023552.

Hi

It does not happen on my module.
What image version are you using? Did you change anything of the default configuration? e.g. disable connman.service and/or systemd-resolved.service.

I guess you’re issue is similar to this Debian bug. I.e. the networking manager responsible for creating /etc/resolv.conf did not yet create the file/symlink.


If you don’t need the Avahi services at all you could disable them.
e.g.

systemctl disable avahi-daemon.service
systemctl disable avahi.daemon.socket

or delete the relevant symlinks <image>/rootfs/etc/systemd/system/*target.wants/avahi-daemon* on your PC before creating the SD card for flashing.


If you need Avahi you could check if it works for you despite that the service does not find resolv.conf at startup.


You could try to delay the start of the Avahi service to after connman has been started.

--- /lib/systemd/system/avahi-daemon.service~
+++ /lib/systemd/system/avahi-daemon.service
@@ -20,2 +20,3 @@
 Requires=avahi-daemon.socket
+After=connman.service

Max

Hi,
Max, thanks for your response.

I created the image following Toradex Tutorial:

Have not changed configuration as long as I can remember.

I think I need avahi, but not so sure about it.

Regards
Fabiano