[SOLVED] Avahi-daemon Error Messages that May be Solved by Editing the Configuration File
Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Avahi-daemon Error Messages that May be Solved by Editing the Configuration File
My /var/log/syslog file has been displaying some messages related to the avahi-daemon that warrant investigation. Though, the messages below are in the syslog file, I have not noticed any problem with the operation of the computer.
Quote:
No service file found in /etc/avahi/services.
avahi-daemon.service: Failed with result 'timeout'.
Failed to start Avahi mDNS/DNS-SD Stack.
The avahi-daemon manpage has not been that informative and unfortunately lacked usable examples.
Quote:
host-name= Set the host name avahi-daemon tries to register on the LAN. If omited defaults to the system host name as set with the sethostname() system call. domain-name= Set the default domain name avahi-daemon tries to register its host name and services on the LAN in. If omitted defaults to ".local".
I took a wild stab and used the domain-name identified on my router. For the host-name, I used localhost. I was unable to find an example of a "properly configured" /etc/avahi/avahi-daemon.conf file. See my file below.
Code:
# This file is part of avahi.
#
# avahi is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as
# published by the Free Software Foundation; either version 2 of the
# License, or (at your option) any later version.
#
# avahi is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
# License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with avahi; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
# USA.
# See avahi-daemon.conf(5) for more information on this configuration
# file!
[server]
#host-name=foo
host-name=localhost
#domain-name=local
domain-name=Stargate
#browse-domains=0pointer.de, zeroconf.org
use-ipv4=yes
use-ipv6=yes
#allow-interfaces=eth0
#deny-interfaces=eth1
#check-response-ttl=no
#use-iff-running=no
#enable-dbus=yes
#--------------------------
# modified 3/24/2020
# https://askubuntu.com/questions/676863/how-do-i-get-rid-of-a-ghost-printer-in-gnome/70021
# Apparrantly line below is now obsolete
# restart service with; sudo service avahi-daemon restart
# https://forums.linuxmint.com/viewtopic.php?t=296554
# sudo systemctl restart avahi-daemon.service
enable-dbus=no
#--------------------------
#disallow-other-stacks=no
#allow-point-to-point=no
#cache-entries-max=4096
#clients-max=4096
#objects-per-client-max=1024
#entries-per-entry-group-max=32
ratelimit-interval-usec=1000000
ratelimit-burst=1000
[wide-area]
enable-wide-area=yes
[publish]
#disable-publishing=no
#disable-user-service-publishing=no
#add-service-cookie=no
#publish-addresses=yes
publish-hinfo=no
publish-workstation=no
#publish-domain=yes
#publish-dns-servers=192.168.50.1, 192.168.50.2
#publish-resolv-conf-dns-servers=yes
#publish-aaaa-on-ipv4=yes
#publish-a-on-ipv6=no
[reflector]
#enable-reflector=no
#reflect-ipv=no
[rlimits]
#rlimit-as=
#rlimit-core=0
#rlimit-data=8388608
#rlimit-fsize=0
#rlimit-nofile=768
#rlimit-stack=8388608
#rlimit-nproc=3
For most users, no explicit configuration should be needed. I would comment out the 'host-name' and 'domain-name' and the domain name should be left as default (ie no configuration) so that .local is used for the TLD (unless in use for other purposes on the LAN).
That will prevent Avahi communicating via D-Bus to other apps and components in your desktop environment. (If not specified it will default to being enabled.)
That will prevent Avahi communicating via D-Bus to other apps and components in your desktop environment. (If not specified it will default to being enabled.)
"enable-dbus=no" was set that way to prevent the same printer from showing-up twice. I reset the /etc/avahi/avahi-daemon.conf file back to it's original (default) state.
Based on getting the error messages: "avahi-daemon.service: Failed with result 'timeout'." and "Failed to start Avahi mDNS/DNS-SD Stack.", I revised my "/etc/nsswitch.conf" to match the one suggested in Archlinux. Revised line reads: "hosts: files mdns4_minimal [NOTFOUND=return] resolve [!UNAVAIL=return] dns myhostname"
Mar 31 15:53:32 Alcor avahi-daemon[804]: Network interface enumeration completed.
Mar 31 15:53:32 Alcor avahi-daemon[804]: Registering new address record for ::1 on lo.*.
Mar 31 15:53:32 Alcor avahi-daemon[804]: Registering new address record for 127.0.0.1 on lo.IPv4.
Mar 31 15:53:33 Alcor avahi-daemon[804]: Server startup complete. Host name is Alcor.local. Local service cookie is 313686448.
Mar 31 15:53:41 Alcor avahi-daemon[804]: Joining mDNS multicast group on interface eno1.IPv4 with address 192.168.1.59.
Mar 31 15:53:41 Alcor avahi-daemon[804]: New relevant interface eno1.IPv4 for mDNS.
Mar 31 15:53:41 Alcor avahi-daemon[804]: Registering new address record for 192.168.1.59 on eno1.IPv4.
Mar 31 15:53:42 Alcor avahi-daemon[804]: Joining mDNS multicast group on interface eno1.IPv6 with address fe80::58aa:5cf4:cdb2:f9f.
Mar 31 15:53:42 Alcor avahi-daemon[804]: New relevant interface eno1.IPv6 for mDNS.
Mar 31 15:53:42 Alcor avahi-daemon[804]: Registering new address record for fe80::58aa:5cf4:cdb2:f9f on eno1.*.
~
But then two minutes later, I reran "sudo systemctl status avahi-daemon" and got the old error message back!!
Mar 31 15:55:03 Alcor avahi-daemon[2504]: Server startup complete. Host name is Alcor.local. Local service cookie is 2843288101.
Mar 31 15:56:32 Alcor systemd[1]: avahi-daemon.service: Start operation timed out. Terminating.
Mar 31 15:56:32 Alcor avahi-daemon[2504]: Got SIGTERM, quitting.
Mar 31 15:56:32 Alcor avahi-daemon[2504]: Leaving mDNS multicast group on interface eno1.IPv6 with address fe80::58aa:5cf4:cdb2:f9f.
Mar 31 15:56:32 Alcor avahi-daemon[2504]: Leaving mDNS multicast group on interface eno1.IPv4 with address 192.168.1.59.
Mar 31 15:56:32 Alcor avahi-daemon[2504]: Leaving mDNS multicast group on interface lo.IPv6 with address ::1.
Mar 31 15:56:32 Alcor avahi-daemon[2504]: Leaving mDNS multicast group on interface lo.IPv4 with address 127.0.0.1.
Mar 31 15:56:32 Alcor avahi-daemon[2504]: avahi-daemon 0.7 exiting.
Mar 31 15:56:32 Alcor systemd[1]: avahi-daemon.service: Failed with result 'timeout'.
Mar 31 15:56:32 Alcor systemd[1]: Failed to start Avahi mDNS/DNS-SD Stack.
Interesting, as Spock would say. After this post, I rebooted the computer and reran "sudo systemctl status avahi-daemon.service". Avahi once again looked to be working correctly, but failed a few minutes later. It would appear that the very act of issuing the command "sudo systemctl status avahi-daemon.service" has an adverse effect on Avahi?
"enable-dbus=no" was set that way to prevent the same printer from showing-up twice. I reset the /etc/avahi/avahi-daemon.conf file back to it's original (default) state.
I recall that bug, but it was a workaround at best so best left enabled.
Quote:
Based on getting the error messages: "avahi-daemon.service: Failed with result 'timeout'." and "Failed to start Avahi mDNS/DNS-SD Stack.", I revised my "/etc/nsswitch.conf" to match the one suggested in Archlinux. Revised line reads: "hosts: files mdns4_minimal [NOTFOUND=return] resolve [!UNAVAIL=return] dns myhostname"
At reboot, everything looked OK.
That won't have caused an error though....if 'mdsn4_minimal' is missing there will just be no Avahi hostname resolution.
For reference I have
Code:
hosts: files mdns_minimal [NOTFOUND=return] dns
but I'm not using resolve in openSUSE.
Quote:
But then two minutes later, I reran "sudo systemctl status avahi-daemon" and got the old error message back!!
It will require more research.
Quote:
Interesting, as Spock would say. After this post, I rebooted the computer and reran "sudo systemctl status avahi-daemon.service". Avahi once again looked to be working correctly, but failed a few minutes later. It would appear that the very act of issuing the command "sudo systemctl status avahi-daemon.service" has an adverse effect on Avahi?
No, it just reports the current state of the service, and messaging associated with it.
I have not observed any performance issues that can be attributed to Avahi. To my knowledge, nothing on my computer or local LAN depends on Avahi. This would seem to be an issue to be aware of and to track, but not a high priority concern. Thanks for responding.
I have not observed any performance issues that can be attributed to Avahi. To my knowledge, nothing on my computer or local LAN depends on Avahi.
That's quite likely the case. I only use it, because in my small home network I find it useful (even though I know how to reach all my servers via IP address anyway). It can also be useful when 'auto-discovering' printers. Not necessary for most users I guess.
Quote:
This would seem to be an issue to be aware of and to track, but not a high priority concern. Thanks for responding.
Mar 31 19:13:06 cygnus systemd[1]: avahi-daemon.service: Failed with result 'timeout'.
Mar 31 19:13:06 cygnus systemd[1]: Failed to start Avahi mDNS/DNS-SD Stack.
Issued "sudo systemctl restart avahi-daemon" in another terminal.
New output appended to the prior output.
Quote:
Mar 31 19:15:58 cygnus systemd[1]: Starting Avahi mDNS/DNS-SD Stack...
Mar 31 19:15:58 cygnus avahi-daemon[4036]: Process 3982 died: No such process; trying to remove PID file. (/run/avahi-daemon//pid)
Mar 31 19:15:58 cygnus avahi-daemon[4036]: Found user 'avahi' (UID 116) and group 'avahi' (GID 123).
Mar 31 19:15:58 cygnus avahi-daemon[4036]: Successfully dropped root privileges.
Mar 31 19:15:58 cygnus avahi-daemon[4036]: avahi-daemon 0.7 starting up.
Mar 31 19:15:58 cygnus avahi-daemon[4036]: Successfully called chroot().
Mar 31 19:15:58 cygnus avahi-daemon[4036]: Successfully dropped remaining capabilities.
Mar 31 19:15:58 cygnus avahi-daemon[4036]: No service file found in /etc/avahi/services.
Mar 31 19:15:58 cygnus avahi-daemon[4036]: Joining mDNS multicast group on interface enp3s0.IPv6 with address fe80::6fc9:37b5:ee0f:791a.
Mar 31 19:15:58 cygnus avahi-daemon[4036]: New relevant interface enp3s0.IPv6 for mDNS.
Mar 31 19:15:58 cygnus avahi-daemon[4036]: Joining mDNS multicast group on interface enp3s0.IPv4 with address 192.168.1.12.
Mar 31 19:15:58 cygnus avahi-daemon[4036]: New relevant interface enp3s0.IPv4 for mDNS.
Mar 31 19:15:58 cygnus avahi-daemon[4036]: Joining mDNS multicast group on interface lo.IPv6 with address ::1.
Mar 31 19:15:58 cygnus avahi-daemon[4036]: New relevant interface lo.IPv6 for mDNS.
Mar 31 19:15:58 cygnus avahi-daemon[4036]: Joining mDNS multicast group on interface lo.IPv4 with address 127.0.0.1.
Mar 31 19:15:58 cygnus avahi-daemon[4036]: New relevant interface lo.IPv4 for mDNS.
Mar 31 19:15:58 cygnus avahi-daemon[4036]: Network interface enumeration completed.
Mar 31 19:15:58 cygnus avahi-daemon[4036]: Registering new address record for fe80::6fc9:37b5:ee0f:791a on enp3s0.*.
Mar 31 19:15:58 cygnus avahi-daemon[4036]: Registering new address record for 192.168.1.12 on enp3s0.IPv4.
Mar 31 19:15:58 cygnus avahi-daemon[4036]: Registering new address record for ::1 on lo.*.
Mar 31 19:15:58 cygnus avahi-daemon[4036]: Registering new address record for 127.0.0.1 on lo.IPv4.
Mar 31 19:15:59 cygnus avahi-daemon[4036]: Server startup complete. Host name is cygnus.local. Local service cookie is 4251844127.
I guess you get to choose how avahi is to "fail". As a test, deleted the the line "enable-dbus=no" in the "/etc/avahi/avahi-daemon.conf" file. That apparently "fixed" avahi issue this thread is about. Unfortunately, the "ghost" printer now shows up. Given a choice, living with a "ghost" printer would seem to be a better choice.
I guess you get to choose how avahi is to "fail". As a test, deleted the the line "enable-dbus=no" in the "/etc/avahi/avahi-daemon.conf" file. That apparently "fixed" avahi issue this thread is about.
Ok, I thought you'd done that already. Thanks for the update.
Quote:
Unfortunately, the "ghost" printer now shows up. Given a choice, living with a "ghost" printer would seem to be a better choice.
That's an issue with the particular desktop environment, and I'm surprised it hasn't been fixed already. (KDE thankfully does not suffer from it.)
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.