I have DHCP and DNS (named) running on my server.
I have 3 network devices: one enslaved in a bridge (used for VM), one used for 4 vlan and the last used for external connection via pppd.
All managed by systemd-networkd, systemd-resolved.
I have also avahi-daemon running: I think it was automatically set during installation in 2021.
In journalctl I have this warning about avahi-daemon
Mar 24 08:06:02 hpprol2 avahi-daemon[1052]: No service file found in /etc/avahi/services.
Mar 24 08:06:02 hpprol2 avahi-daemon[1052]: *** WARNING: Detected another IPv4 mDNS stack running on this host. This makes mDNS unreliable and is thus not recommended. ***
Mar 24 08:06:02 hpprol2 avahi-daemon[1052]: *** WARNING: Detected another IPv6 mDNS stack running on this host. This makes mDNS unreliable and is thus not recommended. ***
Mar 24 08:06:02 hpprol2 avahi-daemon[1052]: Joining mDNS multicast group on interface lo.IPv4 with address 127.0.0.1.
Questions:
Is avahi-daemon needed by anything?
Can I stop and disable it?
erlangen:~ # systemctl list-unit-files avahi*
UNIT FILE STATE PRESET
avahi-daemon.service enabled enabled
avahi-dnsconfd.service enabled disabled
avahi-daemon.socket enabled disabled
3 unit files listed.
erlangen:~ #
The above settings ensure a smooth operation of NetworkManager using DHCP / DNS even when frequently booting my desktop machines into other operating systems. No errors encountered since making the switch in December 2022. No errors logged to journal:
erlangen:~ # journalctl -b -g avahi
Mar 23 17:44:59 erlangen systemd[1]: Listening on Avahi mDNS/DNS-SD Stack Activation Socket.
Mar 23 17:44:59 erlangen systemd[1]: Starting Avahi mDNS/DNS-SD Stack...
Mar 23 17:44:59 erlangen systemd[1]: Started Avahi DNS Configuration Daemon.
Mar 23 17:44:59 erlangen avahi-daemon[943]: Found user 'avahi' (UID 498) and group 'avahi' (GID 497).
Mar 23 17:44:59 erlangen avahi-daemon[943]: avahi-daemon 0.8 starting up.
Mar 23 17:44:59 erlangen systemd[1]: Started Avahi mDNS/DNS-SD Stack.
Mar 23 17:44:59 erlangen avahi-daemon[943]: Loading service file /etc/avahi/services/sftp-ssh.service.
Mar 23 17:44:59 erlangen avahi-daemon[943]: Loading service file /etc/avahi/services/ssh.service.
Mar 23 17:44:59 erlangen avahi-dnsconfd[944]: Successfully connected to Avahi daemon.
Mar 23 17:45:01 erlangen avahi-daemon[943]: Service "erlangen" (/etc/avahi/services/ssh.service) successfully established.
Mar 23 17:45:01 erlangen avahi-daemon[943]: Service "erlangen" (/etc/avahi/services/sftp-ssh.service) successfully established.
erlangen:~ #
Avahi may be used by other programs to query/announce information of mDNS. I guess the best way is to stop avahi and look for any fallout In the worst case some program will fail to find something on network.
Thanks,
I have set the avahi-daemon as “manually start”.
As far as I see installed programs requiring it, are mostly for printer and scanner backends.
My printers are using lpd and don’t use avahi-daemon.
My USB scanner seems using it , if avahi-daemon is not runing it is started automatically by the scanner program ( via avahi-daemon.socket I think)
hpprol2:~ # systemctl stop avahi-daemon
Warning: Stopping avahi-daemon.service, but it can still be activated by:
avahi-daemon.socket