avahi-daemon chroot failed

Another annoying journal error:

avahi-daemon[301]: chroot.c: open() failed: No such file or directory
avahi-daemon[285]: Failed to open /etc/resolv.conf: Invalid argument

Copy avahi-daemon.service from /lib/systemd/system to /etc/systemd/system. Edit /etc/systemd/system/avahi-daemon.service and add the “After=systemd-resolved.service” line like below and restart. This should result in no error:

avahi-daemon[364]: Successfully called chroot().
avahi-daemon[364]: Successfully dropped remaining capabilities.


# 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.

[Unit]
Description=Avahi mDNS/DNS-SD Stack
After=systemd-resolved.service
Requires=avahi-daemon.socket

[Service]
Type=dbus
BusName=org.freedesktop.Avahi
ExecStart=/usr/sbin/avahi-daemon -s
ExecReload=/usr/sbin/avahi-daemon -r
NotifyAccess=main

[Install]
WantedBy=multi-user.target
Also=avahi-daemon.socket
Alias=dbus-org.freedesktop.Avahi.service

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.