avahi-daemon won't start

Dave Lister

New Member
Joined
Apr 17, 2020
Messages
21
Reaction score
1
Credits
222
I have a problem with a printer not printing that appears to be down to the avahi-daemon not starting.

/var/log/cups error_log reports "Unable to communicate with avahi-daemon: Daemon not running"

avahi-daemon has been set to run at start-up in my Boot Services Manager application, but shows as not active after booting.

I tried to start avahi-daemon from the command line and get:-
# service --status-all​
[ - ] 00sys_logger​
[ - ] 10alsa​
[ - ] avahi-daemon​
[ + ] cups​
[ + ] dbus​
[ - ] frisbee.sh​
[ - ] javaif.sh​
[ + ] messagebus​
[ - ] psync​
[ ? ] rc.acpi​
[ + ] rc.firewall​
[ - ] rc.pcmcia​
[ + ] saned​
[ + ] setserial​
[ - ] start_cpu_freq​
[ ? ] sysfsutils​
[ - ] usb-modeswitch​
# service avahi-daemon start​
* Starting Avahi mDNS/DNS-SD Daemon avahi-daemon Timeout reached while wating for return value​
Could not receive return value from daemon process.​
[fail]​
#​

[EDIT: All dependencies of avahi-daemon have been checked as being installed with all necessary files present in their correct directories]

Hope someone can offer any suggestions. I can provide a strace output if it'll help.
 
Last edited:


For what it is worth if it may benefit anyone else, I managed to get avahi-daemon running by following the advice of this esteemed wizard.....

user ETP's 3rd post down, steps one, two and three including the link for part 2 of step three - the ArchWiki section copied below after the link and steps.


Step One:

Use PPM to install in order the following items. N/B For each item on the list you must install all of the dependencies.

1. avahi-daemon_0.7|Avahi mDNS/DNS-SD daemon
2. avahi-discover_0.7|Service discover user interface for avahi
3. libnss-mdns_0.10
4. python-protobuf_3.0.0
5. python3_protobuf_3.0.0

Step Two:

A brief explanation.
In Linux microdns relies upon avahi for discovery and protobuf for streaming to the Chromecast.
Avahi is not normally implemented in Puppy and the daemon has to be run under its own group & user name.
To create those open a terminal and issue the following commands:
Code:
# addgroup -S -g 120 avahi​
# adduser -D -S -h /var/run/avahi-daemon -g "Avahi mDNS daemon" avahi -G avahi​


There is no output but you can check the result with the following commands:
Code:
# cat /etc/group​
# cat /etc/passwd​


Step Three:

Install the attached pet which contains two items:
1. A launcher placed in /root/Startup to start the avahi-daemon as the initial attempt to launch it from /etc/init.d
within Puppy fails as dbus (messagebus) has not at that early stage created a socket. Probably not an issue if using systemd.

2. A custom /etc/nsswitch.conf in accordance with this advice. https://wiki.archlinux.org/index.php/avahi

ArchWiki section.
Using Avahi​

Hostname resolution​

Avahi provides local hostname resolution using a "hostname.local" naming scheme. To enable it, install the nss-mdns package and start avahi-daemon.service.​
Then, edit the file /etc/nsswitch.conf and change the hosts line to include mdns_minimal [NOTFOUND=return] before resolve and dns:​

I found the "mdns_minimal [NOTFOUND=return]" line already in nsswitch.conf as is so there was no need to change it.

Unfortunately, CUPS admin doesn't detect my Epson printer now, so I'm still no better off for getting this far, c'est la vie.
 

Members online


Latest posts

Top