avahi-daemon does not start with default parameters
There is a similar issue here, that should have handled this bug. As the problem still remains, I reopen a bug report.
Current situation Installing the avahi-daemon with the bundle avahi-daemon, then enabling it and starting it fails with the following error.
● avahi-daemon.service - Avahi mDNS/DNS-SD Stack
Loaded: loaded (/usr/lib/systemd/system/avahi-daemon.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Fri 2020-11-20 17:45:51 UTC; 2min 42s ago
TriggeredBy: ● avahi-daemon.socket
Process: 376 ExecStart=/usr/bin/avahi-daemon -s (code=exited, status=255/EXCEPTION)
Main PID: 376 (code=exited, status=255/EXCEPTION)
Status: "avahi-daemon 0.8 exiting."
Nov 20 17:45:51 chameleon avahi-daemon[376]: Found user 'avahi' (UID 350) and group 'avahi' (GID 350).
Nov 20 17:45:51 chameleon avahi-daemon[376]: Successfully dropped root privileges.
Nov 20 17:45:51 chameleon avahi-daemon[376]: avahi-daemon 0.8 starting up.
Nov 20 17:45:51 chameleon avahi-daemon[376]: WARNING: No NSS support for mDNS detected, consider installing nss-mdns!
Nov 20 17:45:51 chameleon avahi-daemon[376]: dbus_bus_request_name(): Connection ":1.1" is not allowed to own the service "org.freedesktop.Avahi" due to security policies in the configuration file
Nov 20 17:45:51 chameleon avahi-daemon[376]: WARNING: Failed to contact D-Bus daemon.
Nov 20 17:45:51 chameleon avahi-daemon[376]: avahi-daemon 0.8 exiting.
Nov 20 17:45:51 chameleon systemd[1]: avahi-daemon.service: Main process exited, code=exited, status=255/EXCEPTION
Nov 20 17:45:51 chameleon systemd[1]: avahi-daemon.service: Failed with result 'exit-code'.
Nov 20 17:45:51 chameleon systemd[1]: Failed to start Avahi mDNS/DNS-SD Stack.
Expected situation The avahi-daemon is starting with a default configuration without failing.
Identified problems
- There is a missing configuration file for D-Bus in /etc/dbus-1/. (see other bug report for more information).
- The configuration of the avahi-daemon (avahi-daemon.conf) is not read by default from the directory /etc/avahi/.
Proposed solutions
- Add the configuration file system-local.conf in /etc/dbus-1 with the following content
<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-Bus Bus Configuration 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
<busconfig>
<policy context="default">
<allow own="org.freedesktop.Avahi" />
</policy>
</busconfig>
-
Add a sensible configuration for avahi-deamon.conf in /etc/avahi/. The content could be empty, which is better than the default configuration.
-
Override the configuration of avahi-daemon service to read the configuration from the correct location (with systemctl edit avahi-daemon)
[Unit]
After=network-online.target
[Service]
ExecStart=
ExecStart=/usr/bin/avahi-daemon -s -f /etc/avahi/avahi-daemon.conf
With these adaptations, I could get the avahi-daemon to work properly.
Thanks for your help.
The config file is available here: https://github.com/clearlinux-pkgs/avahi/blob/d934e15ad4fee9c694c06921eac351db0e432e01/avahi.spec#L291
The probable cause is avahi is not patched correctly to read /etc
Yes, I know this file is there, but I can't modify it there because it is the wrong place to modify it and its default content is totally useless. It should be empty by default.
Adding that /etc/dbus-1/system-local.conf to my machine seems to break dbus (systemctl command stops working!)
@ljmccarthy, I moved to a more standard Gnu/Linux distribution. All my problems have been solved. (And I know this is no solution to this problem)
Is this ever gonna work?
Avahi by default ... the security stance we use is likely not going to make that happen. Can you enable it yourself by writing the proper config? yes that shuold
On Tue, Oct 17, 2023 at 6:16 PM QushyQushy @.***> wrote:
Is this ever gonna work?
— Reply to this email directly, view it on GitHub https://github.com/clearlinux/distribution/issues/2202#issuecomment-1767445386, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJ54FKR4FURFYD43GXFRFDX74UXHAVCNFSM4T5CTNS2U5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCNZWG42DINJTHA3A . You are receiving this because you are subscribed to this thread.Message ID: @.***>