Opened 17 years ago

Closed 14 years ago

#14163 closed defect (fixed)

Endless Avahi system.log errors

Reported by: dershow Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 1.6.0
Keywords: avahi Cc: kenyon@…, nodje.co@…, MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)
Port:

Description (last modified by jmpalacios (Juan Manuel Palacios))

Recently my system.log started containing the following, repeated every 10 seconds:

Feb  2 14:16:35 Macintosh org.freedesktop.avahi-dnsconfd[808]: connect(): No such file or directory
Feb  2 14:16:35 Macintosh org.freedesktop.avahi-dnsconfd[808]: Failed to connect to the daemon. This probably means that you
Feb  2 14:16:35 Macintosh org.freedesktop.avahi-dnsconfd[808]: didn't start avahi-daemon before avahi-dnsconfd.
Feb  2 14:16:35 Macintosh com.apple.launchd[1] (org.freedesktop.avahi-dnsconfd[808]): Exited with exit code: 1
Feb  2 14:16:35 Macintosh com.apple.launchd[1] (org.freedesktop.avahi-dnsconfd): Throttling respawn: Will start in 10 seconds
Feb  2 14:16:36 Macintosh org.freedesktop.avahi-daemon[809]: Found user 'avahi' (UID 502) and group 'avahi' (GID 502).
Feb  2 14:16:36 Macintosh org.freedesktop.avahi-daemon[809]: Successfully dropped root privileges.
Feb  2 14:16:36 Macintosh org.freedesktop.avahi-daemon[809]: avahi-daemon 0.6.22 starting up.
Feb  2 14:16:36 Macintosh org.freedesktop.avahi-daemon[809]: WARNING: No NSS support for mDNS detected, consider installing nss-mdns!
Feb  2 14:16:36 Macintosh org.freedesktop.avahi-daemon[809]: dbus_bus_get_private(): Failed to connect to socket /opt/local/var/run/dbus/system_bus_socket: No such file or directory
Feb  2 14:16:36 Macintosh org.freedesktop.avahi-daemon[809]: WARNING: Failed to contact D-Bus daemon.
Feb  2 14:16:36 Macintosh com.apple.launchd[1] (org.freedesktop.avahi-daemon[809]): Exited with exit code: 255
Feb  2 14:16:36 Macintosh com.apple.launchd[1] (org.freedesktop.avahi-daemon): Throttling respawn: Will start in 10 seconds

Avahi is installed as a dependent to something else. So I am not sure what actually will fail. But clearly the above means that Avahi is not working, and is generating a lot of data in my logs. I did try to restart, but that didn't change anything.

Change History (18)

comment:1 Changed 17 years ago by dershow

I went through my system.log and realized that this started after my first reboot in a long time. So it seems that some port update, followed by a reboot, causes this problem. My understanding is that some launchd changes don't "take" until after a reboot. So my suspicion is that something about how launchd and avahi interact is not handled correctly. But that this change doesn't happen until there is a reboot.

comment:2 Changed 17 years ago by nox@…

Owner: changed from macports-tickets@… to nox@…

So this is likely caused by the recent gnome-vfs upgrade, which now depends on avahi instead of the howl dead project. I will look at this problem.

comment:3 Changed 17 years ago by jmpalacios (Juan Manuel Palacios)

Description: modified (diff)

comment:4 Changed 17 years ago by mp@…

I think this issue is caused when dbus is not running. When I checked, the dbus LaunchDaemon had the disabled key set (though I don't know why). So I loaded it with:

sudo launchctl load -w /Library/LaunchDaemons/org.macports.dbus.plist

Once I did this, dbus-daemon started running, then avahi loaded, and the log entries stopped.

comment:5 Changed 17 years ago by nodje.co@…

I'm actually having the same problem. Slightly different though, as it says

  Failed to find user 'avahi'

this is my system.log trace (repeated every 10s):

15/02/2008 5:20:43 PM org.freedesktop.avahi-dnsconfd[9213] connect(): No such file or directory 
15/02/2008 5:20:43 PM org.freedesktop.avahi-dnsconfd[9213] Failed to connect to the daemon. This probably means that you 
15/02/2008 5:20:43 PM org.freedesktop.avahi-dnsconfd[9213] didn't start avahi-daemon before avahi-dnsconfd. 
15/02/2008 5:20:44 PM com.apple.launchd[1] (org.freedesktop.avahi-dnsconfd[9213]) Exited with exit code: 1 
15/02/2008 5:20:44 PM com.apple.launchd[1] (org.freedesktop.avahi-dnsconfd) Throttling respawn: Will start in 10 seconds 
15/02/2008 5:20:44 PM org.freedesktop.avahi-daemon[9214] Failed to find user 'avahi'. 
15/02/2008 5:20:44 PM com.apple.launchd[1] (org.freedesktop.avahi-daemon[9214]) Exited with exit code: 255 
15/02/2008 5:20:44 PM com.apple.launchd[1] (org.freedesktop.avahi-daemon) Throttling respawn: Will start in 10 seconds

I've launched the command you mentioned but with no effect. In my case it doesn't even mention Dbus not being running. Shall I just create a 'avahi' user and group? How come they could be missing?

comment:6 Changed 17 years ago by dershow

I am again having a problem that is almost identical to the above. This time it is showing the identical lines except: Mar 3 09:50:27 macintosh org.freedesktop.avahi-daemon[943]: dbus_bus_get_private(): Failed to connect to socket /opt/local/var/run/dbus/system_bus_socket: Connection refused While in the original bug it was reporting: Feb 2 14:16:36 Macintosh org.freedesktop.avahi-daemon[809]: dbus_bus_get_private(): Failed to connect to socket /opt/local/var/run/dbus/system_bus_socket: No such file or directory

And before just running the daemon: sudo launchctl load -w /Library/LaunchDaemons/org.macports.dbus.plist solved the problem. While now if I do that I get: org.macports.dbus: Already loaded

So it looks like it is now a permissions issue with dbus/avahi. But I don't believe that I changed anything. Any ideas? This log is filling up quickly because I get the full set of errors and the reconnect every 10 seconds.

comment:7 Changed 17 years ago by dershow

I think the problem was an issue with dbus, not shutting down properly. I tried a reboot and also unloading and reloading without any luck. But the following seemed to solve the problem:

sudo launchctl unload /Library/LaunchDaemons/org.macports.dbus.plist sudo rm /opt/local/var/run/dbus/pid sudo rm /opt/local/var/run/dbus/system_bus_socket sudo launchctl load /Library/LaunchDaemons/org.macports.dbus.plist

comment:8 Changed 17 years ago by nox@…

Owner: changed from nox@… to macports-tickets@…

I'm no longer avahi maintainer.

comment:9 Changed 16 years ago by yvan.strahm@…

I tried every solutions mentioned in the thread with no luck! Does anyone have a solution to tis problem?

comment:10 Changed 16 years ago by nodje.co@…

I've been able to solve the problem once, but not in permanent fashion. I'm still having the problem.

it keeps logging, every 10s, month after month....

comment:11 Changed 16 years ago by kenyon@…

Cc: kenyon@… added

Cc Me!

comment:12 in reply to:  11 Changed 16 years ago by nodje.co@…

I've had the problem for more than a year now. It's still logging, every 10 seconds.

I'd be very glad to get rid of the problem. What if I simply delete /Library/LaunchDaemons/org.freedesktop.avahi-daemon.plist and /Library/LaunchDaemons/org.freedesktop.avahi-dnsconfd.plist ?? Would it change anything? The daemon is not running anyways.

comment:13 Changed 16 years ago by nodje.co@…

Cc: nodje.co@… added

Cc Me!

comment:14 Changed 16 years ago by blb@…

Note that when avahi was updated to version 0.6.23 in r43074, the launchd items were updated to be disabled by default. Make sure you have 0.6.23 or 0.6.24 (which is the port's current version) as that should keep it from running unless you specifically load it with launchctl.

comment:15 Changed 16 years ago by nodje.co@…

great, I updated to MacPort 1.7.0, then upgraded all outdated (much!) and everything went fine. And Avahi oesn't log any error anymore!

cheers

comment:16 Changed 16 years ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)

Cc: mcalhoun@… added

Cc Me!

comment:17 Changed 16 years ago by (none)

Milestone: Port Bugs

Milestone Port Bugs deleted

comment:18 Changed 14 years ago by adfernandes (Andrew Fernandes)

Resolution: fixed
Status: newclosed

Changed dbus to no longer require the pid file as per #15081. That should close this ticket as well.

Note: See TracTickets for help on using tickets.