Page MenuHomeSolus

avahi-daemon: Failed to open /etc/resolv.conf: No such file or directory
Open, NormalPublic

Description

Solus 3 patched as of nov. 26. In my logs I see :

nov 26 16:53:31 dell-laptop avahi-daemon[558]: Failed to open /etc/resolv.conf: No such file or directory

Other distros seem have the same problem : "The avahi-daemon cannot open the /etc/resolv.conf file because it starts before systemd-resolved."

ref. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=800643

Event Timeline

ikey changed the task status from Open to In Progress.Nov 26 2017, 7:02 PM
ikey claimed this task.

Preemptively marking resolved but I'm gonna fart about with it in an ISO to make sure its fine now

Yerp the error is gone in my test ISO :)

man AppArmor initialization is really killing boot time.

You're patching faster than I can register bugs! Do you ever rest? ;)

Upgraded to v0.7-11 of Avahi. The patch doesn't work on my system:

déc 02 22:10:42 dell-laptop systemd[1]: Starting Avahi mDNS/DNS-SD Stack...
déc 02 22:10:42 dell-laptop systemd[1]: Started Service for snap application lxd.daemon.
déc 02 22:10:42 dell-laptop systemd[1]: Reached target Host and Network Name Lookups.
déc 02 22:10:42 dell-laptop systemd[1]: Started Accounts Service.
déc 02 22:10:42 dell-laptop dbus[570]: [system] Activating via systemd: service name='org.freedesktop.ColorManager' unit='colord.se>
déc 02 22:10:42 dell-laptop systemd[1]: Starting Manage, Install and Generate Color Profiles...
déc 02 22:10:42 dell-laptop NetworkManager[580]: <info>  [1512270642.2527] keyfile: new connection /etc/NetworkManager/system-conne>
déc 02 22:10:42 dell-laptop avahi-daemon[614]: Found user 'avahi' (UID 84) and group 'avahi' (GID 84).
déc 02 22:10:42 dell-laptop avahi-daemon[614]: Successfully dropped root privileges.
déc 02 22:10:42 dell-laptop avahi-daemon[614]: avahi-daemon 0.7 starting up.
déc 02 22:10:42 dell-laptop systemd[1]: Started Avahi mDNS/DNS-SD Stack.

déc 02 22:10:42 dell-laptop avahi-daemon[614]: Failed to open /etc/resolv.conf: No such file or directory

déc 02 22:10:42 dell-laptop avahi-daemon[614]: Loading service file /etc/avahi/services/sftp-ssh.service.
déc 02 22:10:42 dell-laptop avahi-daemon[614]: Loading service file /etc/avahi/services/ssh.service.
déc 02 22:10:42 dell-laptop avahi-daemon[614]: Network interface enumeration completed.
déc 02 22:10:42 dell-laptop avahi-daemon[614]: Server startup complete. Host name is dell-laptop.local. Local service cookie is 205>
déc 02 22:10:42 dell-laptop avahi-daemon[614]: Service "dell-laptop" (/etc/avahi/services/ssh.service) successfully established.
déc 02 22:10:42 dell-laptop avahi-daemon[614]: Service "dell-laptop" (/etc/avahi/services/sftp-ssh.service) successfully establishe>
déc 02 22:10:42 dell-laptop NetworkManager[580]: <info>  [1512270642.2679] keyfile: new connection /etc/NetworkManager/system-conne>
déc 02 22:10:42 dell-laptop NetworkManager[580]: <info>  [1512270642.2689] keyfile: new connection /etc/NetworkManager/system-conne>
déc 02 22:10:42 dell-laptop NetworkManager[580]: <info>  [1512270642.2820] keyfile: new connection /etc/NetworkManager/system-conne>
déc 02 22:10:42 dell-laptop systemd[1]: Started Virtualization daemon.

cat /usr/lib/systemd/system/avahi-daemon.service

...
[Unit]
Description=Avahi mDNS/DNS-SD Stack
Requires=avahi-daemon.socket
After=network-online.target
...

According to RedHat, the service NetworkManager-wait-online.service must be enabled :

systemctl enable NetworkManager-wait-online.service

I did that on my system and the error is gone but not sure if there are other impacts.

DataDrake added a subscriber: DataDrake.

I don't see this error message in my journalctl logs. If it is still an issue for you, please re-open. Otherwise I believe this is resolved.

Problem still present on another workstation. Solution proposed still valid (systemctl enable NetworkManager-wait-online.service)

DataDrake triaged this task as Normal priority.Oct 31 2018, 7:28 PM
DataDrake moved this task from Backlog to System and Configuration Fixes on the Software board.
JoshStrobl added a subscriber: ikey.