Dear Maintainer,
*** Reporter, please consider answering these questions, where appropriate ***
* What led up to the situation?
Boot the PC
* What exactly did you do (or not do) that was effective (or
ineffective)?
Look for errors in journalctl
* What was the outcome of this action?
Aug 20 09:51:48 debian avahi-daemon[609]: chroot.c: open() failed: No such file
or directory
Aug 20 09:51:48 debian avahi-daemon[569]: Failed to open /etc/resolv.conf:
Invalid argument
Aug 20 09:51:48 debian avahi-daemon[569]: No service file found in
/etc/avahi/services.
* What outcome did you expect instead?
No errors
***
avahi-daemon starts too early, that is before the network resources are
available.
I modify the service addind a condition After=network-online.target
[Unit]
Description=Avahi mDNS/DNS-SD Stack
After=network-online.target
[Service]
Type=dbus
BusName=org.freedesktop.Avahi
ExecStart=/usr/sbin/avahi-daemon -s
ExecReload=/usr/sbin/avahi-daemon -r
NotifyAccess=main
[Install]
WantedBy=multi-user.target
Also=avahi-daemon.socket
Alias=dbus-org.freedesktop.Avahi.service
Result is now better
systemctl status avahi-daemon
● avahi-daemon.service - Avahi mDNS/DNS-SD Stack
Loaded: loaded (/lib/systemd/system/avahi-daemon.service; enabled; vendor
preset: enabled)
Active: active (running) since Sun 2017-08-20 10:04:33 CEST; 12min ago
Main PID: 712 (avahi-daemon)
Status: "avahi-daemon 0.6.32 starting up."
Tasks: 2 (limit: 4915)
CGroup: /system.slice/avahi-daemon.service
├─712 avahi-daemon: running [debian.local]
└─740 avahi-daemon: chroot helper
août 20 10:04:32 debian avahi-daemon[712]: avahi-daemon 0.6.32 starting up.
août 20 10:04:33 debian systemd[1]: Started Avahi mDNS/DNS-SD Stack.
août 20 10:04:33 debian avahi-daemon[712]: Successfully called chroot().
août 20 10:04:33 debian avahi-daemon[712]: Successfully dropped remaining
capabilities.
août 20 10:04:33 debian avahi-daemon[712]: No service file found in
/etc/avahi/services.
août 20 10:04:33 debian avahi-daemon[712]: Joining mDNS multicast group on
interface wlan0.IPv4 with address 192.168.1.6
août 20 10:04:33 debian avahi-daemon[712]: New relevant interface wlan0.IPv4
for mDNS.
août 20 10:04:33 debian avahi-daemon[712]: Network interface enumeration
completed.
août 20 10:04:33 debian avahi-daemon[712]: Registering new address record for
192.168.1.68 on wlan0.IPv4.
août 20 10:04:33 debian avahi-daemon[712]: Server startup complete. Host name
is debian.local. Local service cookie is 3
after
systemctl status network-online.target
● network-online.target - Network is Online
Loaded: loaded (/lib/systemd/system/network-online.target; static; vendor
preset: enabled)
Active: active since Sun 2017-08-20 10:04:32 CEST; 15min ago
Docs: man:systemd.special(7)
https://www.freedesktop.org/wiki/Software/systemd/NetworkTarget
août 20 10:04:32 debian systemd[1]: Reached target Network is Online.