Avahi fails to autostart after reboot/powerfailure



  • 2.4.0-BETA (amd64)
    built on Thu Jul 06 13:35:35 CDT 2017
    FreeBSD 11.0-RELEASE-p10

    I just took the power to the "Box" , and let it recover.

    Avahi fails to startup , and is left in a "red state" under services.


    Reboot after pwr off

    Jul 26 17:39:14 pkg pfSense-repo upgraded: 2.4.0.b.20170724.1206 -> 2.4.0.b.20170725.1333
    Jul 26 17:39:09 avahi-daemon 56029 avahi-daemon 0.6.31 exiting.
    Jul 26 17:39:09 avahi-daemon 56029 WARNING: Failed to contact D-Bus daemon.
    Jul 26 17:39:09 avahi-daemon 56029 dbus_bus_get_private(): Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
    Jul 26 17:39:09 avahi-daemon 56386 Failed to create PID file: File exists
    Jul 26 17:39:09 avahi-daemon 56386 open(/var/run/avahi-daemon//pid): File exists
    Jul 26 17:39:09 avahi-daemon 56386 Successfully dropped root privileges.
    Jul 26 17:39:09 avahi-daemon 56280 Failed to create PID file: File exists
    Jul 26 17:39:09 avahi-daemon 56280 open(/var/run/avahi-daemon//pid): File exists
    Jul 26 17:39:09 avahi-daemon 56280 Successfully dropped root privileges.
    Jul 26 17:39:09 avahi-daemon 56029 WARNING: No NSS support for mDNS detected, consider installing nss-mdns!
    Jul 26 17:39:09 avahi-daemon 56386 Found user 'avahi' (UID 558) and group 'avahi' (GID 558).
    Jul 26 17:39:09 avahi-daemon 56280 Found user 'avahi' (UID 558) and group 'avahi' (GID 558).
    Jul 26 17:39:09 avahi-daemon 56029 avahi-daemon 0.6.31 starting up.
    Jul 26 17:39:09 avahi-daemon 56029 Successfully dropped root privileges.
    Jul 26 17:39:09 avahi-daemon 56029 Found user 'avahi' (UID 558) and group 'avahi' (GID 558).
    Jul 26 17:39:08 avahi-daemon 54604 avahi-daemon 0.6.31 exiting.


    After 5+ minutes i try to start it manually from services , and all is good.

    Jul 26 17:48:58 avahi-daemon 96903 New relevant interface igb2_vlan203.IPv6 for mDNS.
    Jul 26 17:48:58 avahi-daemon 96903 Joining mDNS multicast group on interface igb2_vlan203.IPv6 with address fe80::20e:c4ff:fed1:6c71.
    Jul 26 17:48:58 avahi-daemon 96903 Loading service file /usr/local/etc/avahi/services/ssh.service.
    Jul 26 17:48:58 avahi-daemon 96903 Loading service file /usr/local/etc/avahi/services/sftp-ssh.service.
    Jul 26 17:48:58 avahi-daemon 96903 WARNING: No NSS support for mDNS detected, consider installing nss-mdns!
    Jul 26 17:48:58 avahi-daemon 96903 avahi-daemon 0.6.31 starting up.
    Jul 26 17:48:58 avahi-daemon 96903 Successfully dropped root privileges.
    Jul 26 17:48:58 avahi-daemon 96903 Found user 'avahi' (UID 558) and group 'avahi' (GID 558).

    ..
    ..
    ..

    Jul 26 17:48:59 avahi-daemon 96903 Service "kv-fw-01" (/usr/local/etc/avahi/services/sftp-ssh.service) successfully established.
    Jul 26 17:48:59 avahi-daemon 96903 Service "kv-fw-01" (/usr/local/etc/avahi/services/ssh.service) successfully established.
    Jul 26 17:48:59 avahi-daemon 96903 Server startup complete. Host name is kv-fw-01.local. Local service cookie is 2584871376.
    Jul 26 17:48:58 avahi-daemon 96903 Registering HINFO record with values 'AMD64'/'FREEBSD'.

    Seems like it doesn't retry enough …

    /Bingo



  • I have experienced the same.  My temporary workaround is to enable service watchdog on Avahi.  After enabling that, after reboot service watchdog starts Avahi.

    I hope this helps, but hopefully the workaround isn't necessary in the future ;)



  • Any hints on doing that ??

    Enabling a watchdog ?

    /Bingo



  • Its a installable pfSense package: "Service_Watchdog sysutils 1.8.3 Monitors for stopped services and restarts them."
    After that under the services/servicewatchdog menu on the webgui you can configure some services for it to check/restart.



  • Are you running pfSense in Hyper-V?  I had trouble with the service not starting and it was Hyper-V related.

    https://redmine.pfsense.org/issues/4932


Log in to reply