clearlinux / distribution

Placeholder repository to allow filing of general bugs/issues/etc against the Clear Linux OS for Intel Architecture linux distribution
521 stars 29 forks source link

avahi-daemon does not start with default parameters #2202

Open hacketiwack opened 3 years ago

hacketiwack commented 3 years ago

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

Proposed solutions

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

lebensterben commented 3 years ago

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

hacketiwack commented 3 years ago

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.

ljmccarthy commented 2 years ago

Adding that /etc/dbus-1/system-local.conf to my machine seems to break dbus (systemctl command stops working!)

hacketiwack commented 2 years ago

@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)

QushyQushy commented 1 year ago

Is this ever gonna work?

fenrus75 commented 1 year ago

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: @.***>