[SOLVED] Avahi service fails

This forum is for discussion about general software issues.

[SOLVED] Avahi service fails

Postby slaecker » Tue Oct 31, 2017 7:48 pm

Hi,

I installed archlinux arm on my Raspberry Pi 3 using the BTRFS filesystem.
After installing Avahi starting it fails, see below. I think the critical part is
$this->bbcode_second_pass_code('', 'dbus_bus_request_name(): Connection ":1.83" is not allowed to own the service')

$this->bbcode_second_pass_code('', '
slaecker@PiWhale /> systemctl status avahi-daemon.service
* avahi-daemon.service - Avahi mDNS/DNS-SD Stack
Loaded: loaded (/usr/lib/systemd/system/avahi-daemon.service; disabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Tue 2017-10-31 14:22:10 UTC; 3s ago
Process: 2110 ExecStart=/usr/bin/avahi-daemon -s (code=exited, status=255)
Main PID: 2110 (code=exited, status=255)
Status: "avahi-daemon 0.7 exiting."

Oct 31 14:22:10 PiWhale systemd[1]: Starting Avahi mDNS/DNS-SD Stack...
Oct 31 14:22:10 PiWhale avahi-daemon[2110]: Found user 'avahi' (UID 84) and group 'avahi' (GID 84).
Oct 31 14:22:10 PiWhale avahi-daemon[2110]: Successfully dropped root privileges.
Oct 31 14:22:10 PiWhale avahi-daemon[2110]: avahi-daemon 0.7 starting up.
Oct 31 14:22:10 PiWhale avahi-daemon[2110]: dbus_bus_request_name(): Connection ":1.83" is not allowed to own the service
Oct 31 14:22:10 PiWhale avahi-daemon[2110]: WARNING: Failed to contact D-Bus daemon.
Oct 31 14:22:10 PiWhale avahi-daemon[2110]: avahi-daemon 0.7 exiting.
Oct 31 14:22:10 PiWhale systemd[1]: avahi-daemon.service: Main process exited, code=exited, status=255/n/a
Oct 31 14:22:10 PiWhale systemd[1]: avahi-daemon.service: Failed with result 'exit-code'.
Oct 31 14:22:10 PiWhale systemd[1]: Failed to start Avahi mDNS/DNS-SD Stack.
')
There is another unanswered forum post about this issue from 2015, I hope I have more luck ;)
According to this stackoverflow post I checked the avahi-dbus.conf and it seems fine (?)
$this->bbcode_second_pass_code('', '
slaecker@PiWhale /> cat /etc/dbus-1/system.d/avahi-dbus.conf
<!DOCTYPE busconfig PUBLIC
"-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
<busconfig>

<!-- Only root or user avahi can own the Avahi service -->
<policy user="avahi">
<allow own="org.freedesktop.Avahi"/>
</policy>
<policy user="root">
<allow own="org.freedesktop.Avahi"/>
</policy>

<!-- Allow anyone to invoke methods on Avahi server, except SetHostName -->
<policy context="default">
<allow send_destination="org.freedesktop.Avahi"/>
<allow receive_sender="org.freedesktop.Avahi"/>

<deny send_destination="org.freedesktop.Avahi"
send_interface="org.freedesktop.Avahi.Server" send_member="SetHostName"/>
</policy>

<!-- Allow everything, including access to SetHostName to users of the group "network" -->
<policy group="network">
<allow send_destination="org.freedesktop.Avahi"/>
<allow receive_sender="org.freedesktop.Avahi"/>
</policy>
<policy user="root">
<allow send_destination="org.freedesktop.Avahi"/>
<allow receive_sender="org.freedesktop.Avahi"/>
</policy>
</busconfig>
')

Thanks in advance for any hint.

Regs,
slaecker

EDIT

Sometimes it's worth reading more than the accepted answer in a stackoverflow post. The 2nd answer in the post linked above did the trick, simply restart the dbus service and start avahi. Looks like without a restart dbus is not aware of the config file avahi places.

$this->bbcode_second_pass_code('', 'slaecker@PiWhale ~> sudo systemctl restart dbus.service
slaecker@PiWhale ~> sudo systemctl start avahi-daemon.service
slaecker@PiWhale ~> systemctl status avahi-daemon.service
* avahi-daemon.service - Avahi mDNS/DNS-SD Stack
Loaded: loaded (/usr/lib/systemd/system/avahi-daemon.service; disabled; vendor preset: disabled)
Active: active (running) since Sat 2017-11-04 11:26:01 UTC; 15s ago
Main PID: 8080 (avahi-daemon)
Status: "avahi-daemon 0.7 starting up."
Tasks: 2 (limit: 4915)
CGroup: /system.slice/avahi-daemon.service
|-8080 avahi-daemon: running [PiWhale.local]
`-8081 avahi-daemon: chroot helper

Nov 04 11:26:01 PiWhale avahi-daemon[8080]: New relevant interface eth0.IPv6 for mDNS.
Nov 04 11:26:01 PiWhale avahi-daemon[8080]: Joining mDNS multicast group on interface eth0.IPv4 with address 192.168.178.40.
Nov 04 11:26:01 PiWhale avahi-daemon[8080]: New relevant interface eth0.IPv4 for mDNS.
Nov 04 11:26:01 PiWhale avahi-daemon[8080]: Network interface enumeration completed.
Nov 04 11:26:01 PiWhale avahi-daemon[8080]: Registering new address record for 172.17.0.1 on docker0.IPv4.
Nov 04 11:26:01 PiWhale avahi-daemon[8080]: Registering new address record for fe80::ba27:ebff:fee6:fc13 on eth0.*.
Nov 04 11:26:01 PiWhale avahi-daemon[8080]: Registering new address record for 192.168.178.40 on eth0.IPv4.
Nov 04 11:26:02 PiWhale avahi-daemon[8080]: Server startup complete. Host name is PiWhale.local. Local service cookie is 1750767470.
Nov 04 11:26:03 PiWhale avahi-daemon[8080]: Service "PiWhale" (/services/ssh.service) successfully established.
Nov 04 11:26:03 PiWhale avahi-daemon[8080]: Service "PiWhale" (/services/sftp-ssh.service) successfully established.')
slaecker
 
Posts: 1
Joined: Tue Oct 31, 2017 2:33 pm

Return to General

Who is online

Users browsing this forum: No registered users and 7 guests