LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This 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


Reply
  Search this Thread
Old 03-29-2020, 02:40 PM   #1
Steve R.
Member
 
Registered: Jun 2009
Location: Morehead City, NC
Distribution: Mint 19.3
Posts: 452

Rep: Reputation: 91
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
 
Old 03-31-2020, 01:33 AM   #2
ferrari
Senior Member
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 4,543

Rep: Reputation: 806Reputation: 806Reputation: 806Reputation: 806Reputation: 806Reputation: 806Reputation: 806
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).

Useful reference...
https://wiki.archlinux.org/index.php/Avahi

See if these yield more information...
Code:
sudo systemctl status avahi-daemon
Code:
sudo journalctl -u avahi-daemon
 
Old 03-31-2020, 01:45 AM   #3
ferrari
Senior Member
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 4,543

Rep: Reputation: 806Reputation: 806Reputation: 806Reputation: 806Reputation: 806Reputation: 806Reputation: 806
BTW, I make use of Avahi for LAN hostname resolution and these are my only uncommented entries...
Code:
use-ipv4=yes
use-ipv6=yes

#entries-per-entry-group-max=32
ratelimit-interval-usec=1000000
ratelimit-burst=1000

[wide-area]
enable-wide-area=yes
I note that you also have
Code:
enable-dbus=no
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.)
 
1 members found this post helpful.
Old 03-31-2020, 03:30 PM   #4
Steve R.
Member
 
Registered: Jun 2009
Location: Morehead City, NC
Distribution: Mint 19.3
Posts: 452

Original Poster
Rep: Reputation: 91
Quote:
Originally Posted by ferrari View Post
I note that you also have
Code:
enable-dbus=no
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.

Quote:
Originally Posted by ferrari View Post
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.

Quote:
● avahi-daemon.service - Avahi mDNS/DNS-SD Stack
Loaded: loaded (/lib/systemd/system/avahi-daemon.service; enabled; vendor preset: enabled)
Active: activating (start) since Tue 2020-03-31 15:53:32 EDT; 1min 20s ago
Main PID: 804 (avahi-daemon)
Status: "avahi-daemon 0.7 starting up."
Tasks: 2 (limit: 4915)
CGroup: /system.slice/avahi-daemon.service
├─804 avahi-daemon: running [Alcor.local]
└─835 avahi-daemon: chroot helper

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!!

Quote:
steve@Alcor:~$ sudo systemctl status avahi-daemon.service
● avahi-daemon.service - Avahi mDNS/DNS-SD Stack
Loaded: loaded (/lib/systemd/system/avahi-daemon.service; enabled; vendor preset: enabled)
Active: failed (Result: timeout) since Tue 2020-03-31 15:56:32 EDT; 9min ago
Process: 2504 ExecStart=/usr/sbin/avahi-daemon -s (code=exited, status=0/SUCCESS)
Main PID: 2504 (code=exited, status=0/SUCCESS)
Status: "avahi-daemon 0.7 starting up."

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?

Last edited by Steve R.; 03-31-2020 at 03:48 PM.
 
Old 03-31-2020, 04:15 PM   #5
ferrari
Senior Member
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 4,543

Rep: Reputation: 806Reputation: 806Reputation: 806Reputation: 806Reputation: 806Reputation: 806Reputation: 806
Quote:
Originally Posted by Steve R. View Post
"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.
 
Old 03-31-2020, 05:30 PM   #6
Steve R.
Member
 
Registered: Jun 2009
Location: Morehead City, NC
Distribution: Mint 19.3
Posts: 452

Original Poster
Rep: Reputation: 91
Quote:
Originally Posted by ferrari View Post
It will require more research.
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.

Last edited by Steve R.; 03-31-2020 at 05:31 PM.
 
Old 03-31-2020, 05:52 PM   #7
ferrari
Senior Member
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 4,543

Rep: Reputation: 806Reputation: 806Reputation: 806Reputation: 806Reputation: 806Reputation: 806Reputation: 806
Does it fail again if restarted manually?

Open a terminal and do
Code:
sudo journalctl -fu avahi-daemon.service
Keep that open and observe/capture the output.

In another terminal do
Code:
sudo systemctl restart avahi-daemon
I wonder if dbus is somehow causing to fail during boot. It may be that a bug report is required.
 
1 members found this post helpful.
Old 03-31-2020, 05:55 PM   #8
ferrari
Senior Member
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 4,543

Rep: Reputation: 806Reputation: 806Reputation: 806Reputation: 806Reputation: 806Reputation: 806Reputation: 806
Quote:
Originally Posted by Steve R. View Post
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.
No worries.
 
Old 03-31-2020, 06:19 PM   #9
Steve R.
Member
 
Registered: Jun 2009
Location: Morehead City, NC
Distribution: Mint 19.3
Posts: 452

Original Poster
Rep: Reputation: 91
Quote:
Originally Posted by ferrari View Post
Does it fail again if restarted manually?

Open a terminal and do
Code:
sudo journalctl -fu avahi-daemon.service
Keep that open and observe/capture the output.

In another terminal do
Code:
sudo systemctl restart avahi-daemon
I wonder if dbus is somehow causing to fail during boot. It may be that a bug report is required.
Tail-end of: "sudo journalctl -fu avahi-daemon.service"
Quote:
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.
 
Old 03-31-2020, 07:04 PM   #10
Steve R.
Member
 
Registered: Jun 2009
Location: Morehead City, NC
Distribution: Mint 19.3
Posts: 452

Original Poster
Rep: Reputation: 91
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.
 
Old 03-31-2020, 11:24 PM   #11
ferrari
Senior Member
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 4,543

Rep: Reputation: 806Reputation: 806Reputation: 806Reputation: 806Reputation: 806Reputation: 806Reputation: 806
Quote:
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.)
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
/var/log/messages avahi-daemon[2025]: Invalid query packet fgcoppola Linux - Newbie 1 02-17-2013 09:52 AM
Can't get avahi to install (trying to get Netatalk and Avahi running) MarcusWebb1966 Gentoo 4 07-28-2011 03:55 AM
(Ubuntu) Avahi-Daemon errors runneri.q Linux - Newbie 1 08-06-2008 07:18 AM
Avahi-daemon on startup OR13 Fedora 1 07-13-2006 12:24 PM
Ubuntu + avahi-daemon/tools Valhalla Linux - Software 0 12-10-2005 03:58 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:28 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration