Bug 1356304 - avahi-daemon[1394]: chroot.c: open() failed: No such file or directory
Summary: avahi-daemon[1394]: chroot.c: open() failed: No such file or directory
Keywords:
Status: ASSIGNED
Alias: None
Product: Fedora
Classification: Fedora
Component: avahi
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Rex Dieter
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 1405753 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-07-13 22:55 UTC by Paul DeStefano
Modified: 2022-05-11 11:41 UTC (History)
28 users (show)

Fixed In Version: avahi-0.6.32-4.fc24
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-08-15 13:47:34 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github lathiat avahi issues 153 0 None open avahi-daemon: Failed to open /etc/resolv.conf: Invalid argument 2021-01-21 02:02:20 UTC

Description Paul DeStefano 2016-07-13 22:55:06 UTC
Description of problem:
I don't know what is wrong.  Avahi had some problems and I don't understand them.

Version-Release number of selected component (if applicable):
avahi-0.6.32-1.fc24.x86_64

How reproducible:
Has failed three times since I upgraded to F24 vs four successes.

Steps to Reproduce:
1. upgrade to F24 workstation
2. do nothing (avahi should be configured to run)
3. wait?

Actual results:
Jul 09 13:09:09 <hostname> avahi-daemon[1394]: chroot.c: open() failed: No such file or directory
Jul 09 13:09:09 <hostname> avahi-daemon[1383]: Failed to open /usr/share/dbus-1/interfaces/org.freedesktop.A
Jul 09 13:09:09 <hostname> avahi-daemon[1383]: Failed to load introspection data.
Jul 09 13:09:09 <hostname> avahi-daemon[1383]: Error parsing Server::ResolveService message


Expected results:
no errors.

Additional info:

Comment 1 Rex Dieter 2016-08-04 15:43:19 UTC
%changelog
* Thu Aug 04 2016 Rex Dieter <rdieter> - 0.6.32-3
- include dbus xml interfaces in main pkg, apparently used there for runtime introspection

Comment 2 mertensb.mazda 2016-08-14 17:10:42 UTC
Is this related to https://bugzilla.redhat.com/show_bug.cgi?id=1354080 and/or https://github.com/systemd/systemd/issues/848 ?

I'm seeing this too after upgrading a Fedora 23 system to Fedora 24 with dnf system-upgrade.

systemd-networkd is not running
NetworkManager and avahi-daemon are running and according to PID's avahi-daemon was started before NetworkManager but /etc/resolv.conf points to a file managed by NetworkManager:
[m8ram@squeezenode ~]$ sudo systemctl status avahi-daemon
● avahi-daemon.service - Avahi mDNS/DNS-SD Stack
   Loaded: loaded (/usr/lib/systemd/system/avahi-daemon.service; enabled; vendor preset: enabled)
   Active: active (running) since Sun 2016-08-14 18:31:40 CEST; 34min ago
 Main PID: 695 (avahi-daemon)
   Status: "avahi-daemon 0.6.32 starting up."
    Tasks: 2 (limit: 512)
   CGroup: /system.slice/avahi-daemon.service
           ├─695 avahi-daemon: running [squeezenode.local
           └─700 avahi-daemon: chroot helpe

Aug 14 18:31:40 squeezenode avahi-daemon[695]: Successfully dropped remaining capabilities.
Aug 14 18:31:40 squeezenode avahi-daemon[700]: chroot.c: open() failed: No such file or directory
Aug 14 18:31:40 squeezenode avahi-daemon[695]: Failed to open /etc/resolv.conf: Invalid argument
Aug 14 18:31:40 squeezenode avahi-daemon[695]: No service file found in /etc/avahi/services.
Aug 14 18:31:40 squeezenode avahi-daemon[695]: Network interface enumeration completed.
Aug 14 18:31:40 squeezenode avahi-daemon[695]: Server startup complete. Host name is squeezenode.local. Local service cookie is .....
Aug 14 18:31:40 squeezenode systemd[1]: Started Avahi mDNS/DNS-SD Stack.
Aug 14 18:31:41 squeezenode avahi-daemon[695]: Joining mDNS multicast group on interface ens3.IPv4 with address 10.10.10.11.
Aug 14 18:31:41 squeezenode avahi-daemon[695]: New relevant interface ens3.IPv4 for mDNS.
Aug 14 18:31:41 squeezenode avahi-daemon[695]: Registering new address record for 10.10.10.11 on ens3.IPv4.
[m8ram@squeezenode ~]$ sudo systemctl status NetworkManager
● NetworkManager.service - Network Manager
   Loaded: loaded (/usr/lib/systemd/system/NetworkManager.service; enabled; vendor preset: enabled)
   Active: active (running) since Sun 2016-08-14 18:31:40 CEST; 34min ago
 Main PID: 741 (NetworkManager)
    Tasks: 4 (limit: 512)
   CGroup: /system.slice/NetworkManager.service
           ├─741 /usr/sbin/NetworkManager --no-daemon
           └─882 /sbin/dhclient -d -q -sf /usr/libexec/nm-dhcp-helper -pf /var/run/dhclient-ens3.pid -lf /var/lib/NetworkManager/dhclient-226288d8-aa14-4a7a-a13e-20e8c2d6bb9d-ens3.lease -cf 

Aug 14 18:31:41 squeezenode NetworkManager[741]: <info>  [1471192301.4563] device (ens3): state change: ip-config -> ip-check (reason 'none') [70 80 0]
Aug 14 18:31:41 squeezenode NetworkManager[741]: <info>  [1471192301.4625] device (ens3): state change: ip-check -> secondaries (reason 'none') [80 90 0]
Aug 14 18:31:41 squeezenode NetworkManager[741]: <info>  [1471192301.4628] device (ens3): state change: secondaries -> activated (reason 'none') [90 100 0]
Aug 14 18:31:41 squeezenode NetworkManager[741]: <info>  [1471192301.4631] manager: NetworkManager state is now CONNECTED_LOCAL
Aug 14 18:31:41 squeezenode dhclient[882]: bound to 10.10.10.11 -- renewal in 17807 seconds.
Aug 14 18:31:41 squeezenode NetworkManager[741]: <info>  [1471192301.6288] manager: NetworkManager state is now CONNECTED_SITE
Aug 14 18:31:41 squeezenode NetworkManager[741]: <info>  [1471192301.6291] policy: set 'Wired connection 1' (ens3) as default for IPv4 routing and DNS
Aug 14 18:31:41 squeezenode NetworkManager[741]: <info>  [1471192301.6326] device (ens3): Activation: successful, device activated.
Aug 14 18:31:41 squeezenode NetworkManager[741]: <info>  [1471192301.8800] manager: NetworkManager state is now CONNECTED_GLOBAL
Aug 14 18:31:46 squeezenode NetworkManager[741]: <info>  [1471192306.0179] manager: startup complete
[m8ram@squeezenode ~]$ ls -lisah /etc/resolv.conf 
317 0 lrwxrwxrwx. 1 root root 35 Aug 14 18:31 /etc/resolv.conf -> /var/run/NetworkManager/resolv.conf

If I restart avahi-daemon after NetworkManager has started this error is not reported:
[m8ram@squeezenode ~]$ sudo systemctl restart avahi-daemon
[m8ram@squeezenode ~]$ sudo systemctl status avahi-daemon
● avahi-daemon.service - Avahi mDNS/DNS-SD Stack
   Loaded: loaded (/usr/lib/systemd/system/avahi-daemon.service; enabled; vendor preset: enabled)
   Active: active (running) since Sun 2016-08-14 19:07:09 CEST; 5s ago
 Main PID: 1288 (avahi-daemon)
   Status: "avahi-daemon 0.6.32 starting up."
    Tasks: 2 (limit: 512)
   CGroup: /system.slice/avahi-daemon.service
           ├─1288 avahi-daemon: running [squeezenode.local
           └─1289 avahi-daemon: chroot helpe

Aug 14 19:07:09 squeezenode avahi-daemon[1288]: WARNING: No NSS support for mDNS detected, consider installing nss-mdns!
Aug 14 19:07:09 squeezenode systemd[1]: Started Avahi mDNS/DNS-SD Stack.
Aug 14 19:07:09 squeezenode avahi-daemon[1288]: Successfully called chroot().
Aug 14 19:07:09 squeezenode avahi-daemon[1288]: Successfully dropped remaining capabilities.
Aug 14 19:07:09 squeezenode avahi-daemon[1288]: No service file found in /etc/avahi/services.
Aug 14 19:07:09 squeezenode avahi-daemon[1288]: Joining mDNS multicast group on interface ens3.IPv4 with address 10.10.10.11.
Aug 14 19:07:09 squeezenode avahi-daemon[1288]: New relevant interface ens3.IPv4 for mDNS.
Aug 14 19:07:09 squeezenode avahi-daemon[1288]: Network interface enumeration completed.
Aug 14 19:07:09 squeezenode avahi-daemon[1288]: Registering new address record for 10.10.10.11 on ens3.IPv4.
Aug 14 19:07:10 squeezenode avahi-daemon[1288]: Server startup complete. Host name is squeezenode.local. Local service cookie is .....

Perhaps the order/dependency of these services needs to be changed?

Comment 3 Rex Dieter 2016-08-15 13:47:34 UTC
Should be fixed by:
https://bodhi.fedoraproject.org/updates/FEDORA-2016-5dd9a9ae41

Comment 4 Ilja Sekler 2016-08-16 18:21:36 UTC
Was this update really supposed to eliminate the "chroot.c: open() failed: No such file or directory" error message? I still get it with avahi-0.6.32-4.fc24.x86_64.

Comment 5 Rex Dieter 2016-08-17 04:35:15 UTC
Yes, the xml introspection files that didn't exist in the main package before, now do.

Except apparently, there's more to this problem than that simple solution, re-opening.

Comment 6 Paul Finnigan 2016-09-11 21:03:08 UTC
I am just going through all the messages I get on boot since the upgrade to Fedora 24. This is one I had just identified as worth reporting. I am not intending upsetting anyone, just tying to help.

Is this not happening because avahi deamon is starting before Network Manager? Certainly on my system it does and on the logs above the message appears to be issued about 1 second before Network Manager starts. /etc/resolv.conf on by system is symlinked to /var/run/NetworkManager/resolv.conf. I would have guessed that Network Manager generates the file on start up, that is it does not exist when the avahi deamon is starting. My vagueness and guessing is due to a total lack of knowledge so I could be wrong. 

I am using a system built from the Fedora 23 Live Workstation image and then upgraded to Fedora 24. But I have seen it on systems built from the Fedora 24 Live Workstation image.

Should systemd not start avahi after Network Manager, that way the resolv.conf will exist and be correct for the system?

Comment 7 Janvitus 2016-12-01 11:42:35 UTC
Same issue on Fedora 24 and 25:

avahi-daemon[692]: Successfully called chroot().
avahi-daemon[692]: Successfully dropped remaining capabilities.
avahi-daemon[706]: chroot.c: open() failed: No such file or directory
avahi-daemon[692]: Failed to open /etc/resolv.conf: Invalid argument
avahi-daemon[692]: No service file found in /etc/avahi/services.
avahi-daemon[692]: Network interface enumeration completed.
avahi-daemon[692]: Server startup complete. Host name is fedorabox.local. Local service cookie is 3296454744.

Comment 8 Paul Finnigan 2016-12-03 13:57:21 UTC
Same for me on F25.

Comment 9 Rex Dieter 2016-12-18 05:49:37 UTC
*** Bug 1405753 has been marked as a duplicate of this bug. ***

Comment 10 Rex Dieter 2016-12-18 06:05:32 UTC
setting FutureFeature to avoid this bug getting autoclosed

I'm tempted to change
avahi_log_error(__FILE__": open() failed: %s", strerror(errno));
to 
avahi_log_warn(...)

instead, since (apparently?) there's to guarantee or expectation for resolv.conf to exist in this context.

Comment 11 David Kaspar // Dee'Kej 2016-12-21 11:37:57 UTC
I'm seeing the same problem after doing upgrade to F25 after fresh installation of F24.

AFAIK, I didn't make any changes to the configuration in /etc/avahi/*.

Comment 12 Dmitry Minsky 2017-01-08 15:43:06 UTC
Same here F25, 4.8.15-300.fc25.x86_64

avahi-daemon[890]: Successfully called chroot().
systemd[1]: Starting Login Service...
avahi-daemon[890]: Successfully dropped remaining capabilities.
systemd[1]: Starting GSSAPI Proxy Daemon...
avahi-daemon[901]: chroot.c: open() failed: No such file or directory
systemd[1]: Starting Prefetch new Ksplice updates...
avahi-daemon[890]: Failed to open /etc/resolv.conf: Invalid argument
avahi-daemon[890]: No service file found in /etc/avahi/services.
avahi-daemon[890]: Network interface enumeration completed.
avahi-daemon[890]: Server startup complete. Host name is d.local. Local service cookie is 4212051819.

Comment 13 Ben Richter 2017-04-02 22:16:21 UTC
I got the problems after updating yesterday

F25 - 4.10.6-200.fc25.x86_64


avahi-daemon 0.6.32 starting up.
avahi-daemon[871]: Successfully called chroot().
avahi-daemon[871]: Successfully dropped remaining capabilities.
avahi-daemon[896]: chroot.c: open() failed: No such file or directory
avahi-daemon[871]: Failed to open /etc/resolv.conf: Invalid argument
avahi-daemon[871]: No service file found in /etc/avahi/services.
avahi-daemon[871]: System host name is set to 'localhost'. This is not a suitable mDNS host name, looking for alternatives.
avahi-daemon[871]: Network interface enumeration completed.
avahi-daemon[871]: Server startup complete. Host name is linux.local. Local service cookie is 2935228248.

Comment 14 Norbert Makula 2017-04-20 21:46:22 UTC
I have the same problem

23:19:57 avahi-daemon: Server startup complete. Host name is linux.local. Local service cookie is 1643619256.
23:19:57 avahi-daemon: Network interface enumeration completed.
23:19:57 kernel: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=avahi-daemon comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
23:19:57 avahi-daemon: System host name is set to 'localhost'. This is not a suitable mDNS host name, looking for alternatives.
23:19:57 avahi-daemon: No service file found in /etc/avahi/services.
23:19:57 avahi-daemon: Failed to open /etc/resolv.conf: Invalid argument
23:19:57 avahi-daemon: chroot.c: open() failed: No such file or directory
23:19:57 avahi-daemon: Successfully dropped remaining capabilities.
23:19:57 avahi-daemon: Successfully called chroot().
23:19:57 avahi-daemon: avahi-daemon 0.6.32 starting up.
23:19:57 avahi-daemon: Successfully dropped root privileges.
23:19:57 avahi-daemon: Found user 'avahi' (UID 70) and group 'avahi' (GID 70).
23:19:57 systemd: Starting Avahi mDNS/DNS-SD Stack...
23:19:57 systemd: Listening on Avahi mDNS/DNS-SD Stack Activation Socket.

Comment 15 mrummuka 2017-05-30 15:12:21 UTC
Same problem with Linux version 4.10.17-200.fc25.x86_64 (mockbuild.fedoraproject.org)

May 30 17:52:19  avahi-daemon[1207]: Successfully called chroot().
May 30 17:52:19  avahi-daemon[1207]: Successfully dropped remaining capabilities.
May 30 17:52:19  avahi-daemon[1214]: chroot.c: open() failed: No such file or directory
May 30 17:52:19  avahi-daemon[1207]: Failed to open /etc/resolv.conf: Invalid argument
May 30 17:52:19  rtkit-daemon[1179]: Successfully called chroot.
May 30 17:52:19  avahi-daemon[1207]: No service file found in /etc/avahi/services.
May 30 17:52:19  rtkit-daemon[1179]: Successfully dropped privileges.
May 30 17:52:19  rtkit-daemon[1179]: Successfully limited resources.
May 30 17:52:19  rtkit-daemon[1179]: Running.
May 30 17:52:19  rtkit-daemon[1179]: Watchdog thread running.
May 30 17:52:19  rtkit-daemon[1179]: Canary thread running.

Comment 16 Juha Tuomala 2017-06-28 12:03:53 UTC
Same here in 
% cat /etc/system-release
Fedora release 25 (Twenty Five)


kesä 26 17:31:04 wasa systemd[1]: Starting Avahi mDNS/DNS-SD Stack...
kesä 26 17:31:04 wasa avahi-daemon[945]: Found user 'avahi' (UID 70) and group 'avahi' (GID 70).
kesä 26 17:31:04 wasa avahi-daemon[945]: Successfully dropped root privileges.
kesä 26 17:31:04 wasa avahi-daemon[945]: avahi-daemon 0.6.32 starting up.
kesä 26 17:31:04 wasa systemd[1]: Started Avahi mDNS/DNS-SD Stack.
kesä 26 17:31:04 wasa avahi-daemon[945]: Successfully called chroot().
kesä 26 17:31:04 wasa avahi-daemon[945]: Successfully dropped remaining capabilities.
kesä 26 17:31:04 wasa avahi-daemon[978]: chroot.c: open() failed: No such file or directory
kesä 26 17:31:04 wasa avahi-daemon[945]: Failed to open /etc/resolv.conf: Invalid argument
kesä 26 17:31:04 wasa avahi-daemon[945]: No service file found in /etc/avahi/services.
kesä 26 17:31:04 wasa avahi-daemon[945]: Network interface enumeration completed.
kesä 26 17:31:04 wasa avahi-daemon[945]: Server startup complete. Host name is wasa.local. Local service cookie is 3569718928.
kesä 26 17:31:07 wasa avahi-daemon[945]: Joining mDNS multicast group on interface em1.IPv4 with address 172.16.1.11.
kesä 26 17:31:07 wasa avahi-daemon[945]: New relevant interface em1.IPv4 for mDNS.
kesä 26 17:31:07 wasa avahi-daemon[945]: Registering new address record for 172.16.1.11 on em1.IPv4.

I removed domain name from fqdn.

Comment 17 Davide Repetto 2017-08-14 14:15:51 UTC
Not solved anymore by adding "After=NetworkManager.service" in the service description. (once upon a time it was a viable workaround).

Comment 18 Dawid Zych 2017-08-16 21:08:21 UTC
The problem still persists on Fedora 26

-- Logs begin at Sat 2016-11-12 12:20:22 CET, end at Wed 2017-08-16 23:08:04 CEST. --
Aug 16 17:44:06 overlord systemd[1]: Starting Avahi mDNS/DNS-SD Stack...
Aug 16 17:44:06 overlord avahi-daemon[926]: Found user 'avahi' (UID 70) and group 'avahi' (GID 70).
Aug 16 17:44:06 overlord avahi-daemon[926]: Successfully dropped root privileges.
Aug 16 17:44:06 overlord avahi-daemon[926]: avahi-daemon 0.6.32 starting up.
Aug 16 17:44:06 overlord avahi-daemon[926]: Successfully called chroot().
Aug 16 17:44:06 overlord avahi-daemon[926]: Successfully dropped remaining capabilities.
Aug 16 17:44:06 overlord avahi-daemon[936]: chroot.c: open() failed: No such file or directory
Aug 16 17:44:06 overlord avahi-daemon[926]: Failed to open /etc/resolv.conf: Invalid argument
Aug 16 17:44:06 overlord avahi-daemon[926]: No service file found in /etc/avahi/services.
Aug 16 17:44:06 overlord avahi-daemon[926]: Network interface enumeration completed.
Aug 16 17:44:06 overlord avahi-daemon[926]: Server startup complete. Host name is overlord.local. Local service cookie is 459610350.
Aug 16 17:44:06 overlord systemd[1]: Started Avahi mDNS/DNS-SD Stack.
Aug 16 17:44:08 overlord avahi-daemon[926]: Joining mDNS multicast group on interface virbr0.IPv4 with address 192.168.122.1.
Aug 16 17:44:08 overlord avahi-daemon[926]: New relevant interface virbr0.IPv4 for mDNS.
Aug 16 17:44:08 overlord avahi-daemon[926]: Registering new address record for 192.168.122.1 on virbr0.IPv4.
Aug 16 17:44:11 overlord avahi-daemon[926]: Joining mDNS multicast group on interface wlp0s20u10.IPv4 with address 192.168.1.52.
Aug 16 17:44:11 overlord avahi-daemon[926]: New relevant interface wlp0s20u10.IPv4 for mDNS.
Aug 16 17:44:11 overlord avahi-daemon[926]: Registering new address record for 192.168.1.52 on wlp0s20u10.IPv4.
Aug 16 17:44:13 overlord avahi-daemon[926]: Joining mDNS multicast group on interface wlp0s20u10.IPv6 with address fe80::ad12:4aa3:4e4f:d563.
Aug 16 17:44:13 overlord avahi-daemon[926]: New relevant interface wlp0s20u10.IPv6 for mDNS.
Aug 16 17:44:13 overlord avahi-daemon[926]: Registering new address record for fe80::ad12:4aa3:4e4f:d563 on wlp0s20u10.*.

Comment 19 Ned 2017-08-17 09:03:14 UTC
I have it too : 

# journalctl -p err -b
-- Logs begin at Mon 2016-08-01 10:00:26 CEST, end at Thu 2017-08-17 10:45:11 CEST. --
août 17 10:05:03 NedProBook kernel: tpm tpm0: A TPM error (7) occurred attempting to read a pcr value
août 17 10:05:15 NedProBook avahi-daemon[1008]: chroot.c: open() failed: No such file or directory
août 17 10:05:17 NedProBook abrtd[984]: '/var/spool/abrt/ccpp-2015-07-28-08:28:18-1592.new' is not a problem directory
août 17 10:05:17 NedProBook abrtd[984]: '/var/spool/abrt/ccpp-2016-07-25-16:59:32-7200' is not a problem directory
août 17 10:06:33 NedProBook mate-session[1357]: GLib-GObject-CRITICAL: object GsmAutostartApp 0xc73aecc440 finalized while still in-construction
août 17 10:06:33 NedProBook mate-session[1357]: GLib-GObject-CRITICAL: Custom constructor for class GsmAutostartApp returned NULL (which is invalid). Please use
août 17 10:06:37 NedProBook spice-vdagent[1611]: Cannot access vdagent virtio channel /dev/virtio-ports/com.redhat.spice.0
août 17 10:06:39 NedProBook pulseaudio[1660]: [pulseaudio] pid.c: Daemon already running.

Comment 20 Florian van Oudgaarden 2017-08-23 09:40:31 UTC
I have it also on fedora 26
#journalctl -b

~
~
aug 23 09:26:21 capra-hircus-hircus rngd[1502]: /dev/tpm0: No such file or directory
aug 23 09:26:21 capra-hircus-hircus avahi-daemon[1490]: Found user 'avahi' (UID 70) and group 'avahi' (GID 70).
aug 23 09:26:21 capra-hircus-hircus avahi-daemon[1490]: Successfully dropped root privileges.
aug 23 09:26:21 capra-hircus-hircus avahi-daemon[1490]: avahi-daemon 0.6.32 starting up.
aug 23 09:26:21 capra-hircus-hircus mcelog[1496]: mcelog: warning: 24 bytes ignored in each record
aug 23 09:26:21 capra-hircus-hircus mcelog[1496]: mcelog: consider an update
aug 23 09:26:21 capra-hircus-hircus avahi-daemon[1490]: Successfully called chroot().
aug 23 09:26:21 capra-hircus-hircus systemd[1]: Starting Modem Manager...
aug 23 09:26:21 capra-hircus-hircus avahi-daemon[1490]: Successfully dropped remaining capabilities.
aug 23 09:26:21 capra-hircus-hircus systemd[1]: Starting Rollback uncommitted netcf network config change transactions...
aug 23 09:26:21 capra-hircus-hircus systemd[1]: Starting Bluetooth service...
aug 23 09:26:21 capra-hircus-hircus audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=livesys comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
aug 23 09:26:21 capra-hircus-hircus audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=rtkit-daemon comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
aug 23 09:26:21 capra-hircus-hircus systemd[1]: Started LSB: Init script for live image..
aug 23 09:26:21 capra-hircus-hircus avahi-daemon[1506]: chroot.c: open() failed: No such file or directory
aug 23 09:26:21 capra-hircus-hircus systemd[1]: Started RealtimeKit Scheduling Policy Service.
aug 23 09:26:21 capra-hircus-hircus avahi-daemon[1490]: Failed to open /etc/resolv.conf: Invalid argument
aug 23 09:26:21 capra-hircus-hircus systemd-logind[1491]: New seat seat0.
aug 23 09:26:21 capra-hircus-hircus avahi-daemon[1490]: No service file found in /etc/avahi/services.
aug 23 09:26:21 capra-hircus-hircus systemd[1]: Started Switcheroo Control Proxy service.
aug 23 09:26:21 capra-hircus-hircus audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=switcheroo-control comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
aug 23 09:26:21 capra-hircus-hircus audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=switcheroo-control comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
aug 23 09:26:21 capra-hircus-hircus systemd[1]: Started Avahi mDNS/DNS-SD Stack.
aug 23 09:26:21 capra-hircus-hircus audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=avahi-daemon comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
aug 23 09:26:21 capra-hircus-hircus systemd[1]: Started Login Service.
aug 23 09:26:21 capra-hircus-hircus audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=systemd-logind comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
aug 23 09:26:21 capra-hircus-hircus avahi-daemon[1490]: Network interface enumeration completed.
aug 23 09:26:21 capra-hircus-hircus avahi-daemon[1490]: Server startup complete. Host name is capra-hircus-hircus.local. Local service cookie is 2702989200.
~
~

Comment 21 prateek.1.kohli 2017-09-06 01:34:17 UTC
I too get this on fedora 25

avahi-daemon: chroot.c: open() failed: No such file or directory

Comment 22 Franco Geller 2017-09-15 06:12:40 UTC
I too get this on fedora 26, currently running kernel 4.12.11-300.fc26.x86_64.
This is what the journal drops:

avahi-daemon[896]: Found user 'avahi' (UID 70) and group 'avahi' (GID 70).
avahi-daemon[896]: Successfully dropped root privileges.
avahi-daemon[896]: avahi-daemon 0.6.32 starting up.
avahi-daemon[896]: Successfully called chroot().
avahi-daemon[896]: Successfully dropped remaining capabilities.
avahi-daemon[896]: Failed to open /etc/resolv.conf: Invalid argument
avahi-daemon[896]: Loading service file /services/udisks.service.
avahi-daemon[896]: Network interface enumeration completed.
avahi-daemon[896]: Server startup complete. Host name is rog.local. Local service coo
avahi-daemon[896]: Service "rog" (/services/udisks.service) successfully established.
avahi-daemon[896]: Joining mDNS multicast group on interface wlp4s0.IPv6 with address
avahi-daemon[896]: New relevant interface wlp4s0.IPv6 for mDNS.
avahi-daemon[896]: Registering new address record for fe80::d16e:fc0b:fd1f:63a6 on wl
avahi-daemon[896]: Joining mDNS multicast group on interface wlp4s0.IPv4 with address
avahi-daemon[896]: New relevant interface wlp4s0.IPv4 for mDNS.
avahi-daemon[896]: Registering new address record for 192.168.0.13 on wlp4s0.IPv4.

So, I understand that the specific problem is that avahi-daemon failed to open /etc/resolv.conf

While reading the man pages for avahi-daemon.conf, in SECTION [PUBLISH], parameter publish-resolv-conf-dns-servers, you can read:

publish-resolv-conf-dns-servers=  Takes a boolean value ("yes" or "no"). If set to "yes" avahi-daemon will publish the unicast DNS servers specified in /etc/resolv.conf in addition to  those specified  with  publish-dns-servers. Send  avahi-daemon a SIGHUP to have it reload this file. Defaults to "no".

I already try changing this setting in /etc/avahi/avahi-daemon.conf, but in both cases the error persist.

Hope somebody can figure it out.

Comment 23 Franco Geller 2017-10-01 09:01:06 UTC
It seems like the avahi-daemon.service need the network-online.target service to be already running for it to start apropiatlely.

I fix the error by adding the folowing line to /lib/systemd/system/avahi-daemon.service

After=network-online.target

This must be right under "Description=Avahi mDNS/DNS-SD Stack"

In my case it looks like this:

# cat /lib/systemd/system/avahi-daemon.service

[Unit]
Description=Avahi mDNS/DNS-SD Stack
After=network-online.target
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

Comment 24 Rex Dieter 2017-10-07 12:20:33 UTC
Submitted issue upstream, including suggested fix/workaround:

https://github.com/lathiat/avahi/issues/153

Comment 25 Franco Geller 2017-10-09 03:22:44 UTC
(In reply to Franco Geller from comment #23)
> It seems like the avahi-daemon.service need the network-online.target
> service to be already running for it to start apropiatlely.
> 
> I fix the error by adding the folowing line to
> /lib/systemd/system/avahi-daemon.service
> 
> After=network-online.target
> 
> This must be right under "Description=Avahi mDNS/DNS-SD Stack"
> 
> In my case it looks like this:
> 
> # cat /lib/systemd/system/avahi-daemon.service
> 
> [Unit]
> Description=Avahi mDNS/DNS-SD Stack
> After=network-online.target
> 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

UPDATE:

NetworkManager-wait-online.service must be enable for this to work. To enable this service:

# systemctl enable NetworkManager-wait-online.service

(ref: https://www.freedesktop.org/wiki/Software/systemd/NetworkTarget )

Comment 26 Ned 2017-10-13 06:14:11 UTC
Hi, 

I confirm in my case that Franco Geller's fix (comment #25) works perfectly.

Comment 27 Chris Murphy 2017-11-27 02:50:47 UTC
(In reply to Franco Geller from comment #25)
> 
> NetworkManager-wait-online.service must be enable for this to work. To
> enable this service:
> 
> # systemctl enable NetworkManager-wait-online.service


Was already enabled on my Intel NUC, running Fedora 27, and I still run into this problem.

Comment 28 Franco Geller 2017-12-20 02:16:56 UTC
(In reply to Chris Murphy from comment #27)
> (In reply to Franco Geller from comment #25)
> > 
> > NetworkManager-wait-online.service must be enable for this to work. To
> > enable this service:
> > 
> > # systemctl enable NetworkManager-wait-online.service
> 
> 
> Was already enabled on my Intel NUC, running Fedora 27, and I still run into
> this problem.

Do you add "After=network-online.target" to the avahi-daemon's config file?

Comment 29 Chris Murphy 2017-12-20 04:03:39 UTC
(In reply to Franco Geller from comment #28)
> Do you add "After=network-online.target" to the avahi-daemon's config file?

No. Curiously this is only affecting Fedora 27 Server. Fedora 27 Workstation doesn't have this problem. It looks like avahi-daemon on Server is mad there's no /etc/resolv.conf, whereas on Workstation that file already exists; and also avahi-daemon comes up without error before NetworkManager even has an IP.

Comment 30 Jerry James 2017-12-28 17:38:10 UTC
(In reply to Chris Murphy from comment #29)
> No. Curiously this is only affecting Fedora 27 Server. Fedora 27 Workstation
> doesn't have this problem. It looks like avahi-daemon on Server is mad
> there's no /etc/resolv.conf, whereas on Workstation that file already
> exists; and also avahi-daemon comes up without error before NetworkManager
> even has an IP.

I've got Fedora 27 Workstation, NetworkManager-wait-online.service is enabled, and I'm seeing these messages, too:

Dec 28 10:06:29 diannao.home avahi-daemon[868]: Found user 'avahi' (UID 70) and group 'avahi' (GID 70).
Dec 28 10:06:29 diannao.home avahi-daemon[868]: Successfully dropped root privileges.
Dec 28 10:06:29 diannao.home avahi-daemon[868]: avahi-daemon 0.7 starting up.
Dec 28 10:06:30 diannao.home avahi-daemon[868]: Successfully called chroot().
Dec 28 10:06:30 diannao.home avahi-daemon[868]: Successfully dropped remaining capabilities.
Dec 28 10:06:30 diannao.home avahi-daemon[872]: chroot.c: open() failed: No such file or directory
Dec 28 10:06:30 diannao.home avahi-daemon[868]: Failed to open /etc/resolv.conf: Invalid argument
Dec 28 10:06:30 diannao.home avahi-daemon[868]: No service file found in /etc/avahi/services.

I will try the fix suggested in comment 23.

Comment 31 The PowerTool 2019-02-04 02:04:05 UTC
Fedora 28 - https://bugzilla.redhat.com/show_bug.cgi?id=1356304#c23 worked like a charm!

I will add on my system, with regards to https://bugzilla.redhat.com/show_bug.cgi?id=1356304#c25 , my NetworkManager-wait-online.service was already enabled and running.

Comment 32 The PowerTool 2019-02-04 02:05:35 UTC
Fedora 28 - comment 23 worked like a charm!

I will add on my system, with regards to comment 25 , my NetworkManager-wait-online.service was already enabled and running.

(this was a test to figure out how the experts got the comment links)

Comment 33 Paul Finnigan 2019-02-04 08:22:40 UTC
My problem went away when I instyalled Fedora 29 so I am removing myself from the CC list as i cannot help to fix it. To others working on it, there is no mention of NetworkManager-wait-online.service in /lib/systemd/system/avahi-daemon.service on my Fedora 29 system:

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


Note You need to log in before you can comment on or make changes to this bug.