Avahi not restarting at boot - Resolved (as of latest 23.09 dev build)
-
When pfSense reboots I have to manually run the Avahi package via the GUI cog. All the other packages behave normally and restart following a reboot or crash.
The only item of note in the logs is this:
Sep 6 17:59:23 avahi-daemon 85874 No service file found in /usr/local/etc/avahi/services.
I'm I missing a setting somewhere?
️
-
Hmm, in 23.05.1 or 23.09?
...or both? -
@RobbieTT said in Avahi not restarting at boot:
I'm I missing a setting somewhere?
Maybe these two files in the mentioned folder :
Avahi 2.2_4 / pfSense 23.05.1-RELEASE (amd64) / Netgate "4100".
edit : My Avahi start at boot
-
@stephenw10 said in Avahi not restarting at boot:
Hmm, in 23.05.1 or 23.09?
...or both?Both, plus 23.05 too, so I don't think it is a bug; more likely I have borked a config or a setting somewhere.
️
-
Mmm, so it was starting correctly at boot at some point or has always failed like that in that install?
-
I don't think it has ever restarted for me (v23 onwards)
[23.09-DEVELOPMENT][admin@Router-8.redacted.me]/root: ls /usr/local/etc/avahi/services sftp-ssh.service.disabled ssh.service.disabled
Those 2 files mentioned are there, no idea of the significance though.
-
I'm failing to replicate this. How do you have Avahi configured?
-
I only set it via the GUI:
These feels like a user error, perhaps I have something that conflicts with it?
Is there any particular files I should be looking at rather than the GUI?
️
-
@stephenw10
Perhaps this is more helpful:[23.09-DEVELOPMENT][admin@Router-8.redacted.me]/root: cat /usr/local/etc/avahi/avahi-daemon.conf # This file is generated by the pfSense Avahi package. # Do not edit this file, it will be overwritten automatically. [server] allow-interfaces=ix1.1003,ix1 allow-point-to-point=yes use-ipv4=yes use-ipv6=yes enable-dbus=no cache-entries-max=0 [wide-area] enable-wide-area=no [publish] disable-publishing=yes publish-addresses=no publish-hinfo=no publish-workstation=no publish-domain=no publish-aaaa-on-ipv4=no publish-a-on-ipv6=no disable-user-service-publishing=yes [reflector] enable-reflector=yes [23.09-DEVELOPMENT][admin@Router-8.redacted.me]/root:
️
-
Hmm, interesting that it shows 2 interfaces in the conf but 4 n the gui. Are two of those not available when it starts perhaps?
-
@stephenw10
The GUI shows 2 selected out of the 4 displayed (VLAN and LAN). These are the only subnets that require mDNS traversal.The lack of clarity or contrast between selected and unselected list items in the pfSense GUI is annoying for Safari users but it is what it is.
️
-
Hmm, my config is identical in 23.09 and starts every time. The only thing that might be different is the interface status there.
-
@stephenw10
If I use a Chromium browser (Brave, in this example) my GUI looks like this:[ix1 = LAN and ix1.1003 = VLAN]
Is that more akin to what you are expecting to see?
️
-
Yeah, the contrast was low but I see it. That's how my test devices are configured except no VLANs.
Is the ix1 NIC linked at boot when Avahi tries to use it? I assume Avahi starts fine manually after boot?
I could imagine between those times that ix1 might have changed status. -
Have you tried re-saving the config in the gui?
-
@RobbieTT said in Avahi not restarting at boot:
I'm I missing a setting somewhere?
Disable IPv6 in the Avahi config.
-
@stephenw10 said in Avahi not restarting at boot:
Is the ix1 NIC linked at boot when Avahi tries to use it? I assume Avahi starts fine manually after boot?
I could imagine between those times that ix1 might have changed status.The ix1 is linked (SFP+ DAC) to my first switch and carries the LAN & VLAN. I am not sure of the relative timing of Avahi vs the interface coming up - I had presumed the interfaces would come up before the GUI itself started.
@dennypage said in Avahi not restarting at boot:
Have you tried re-saving the config in the gui?
Yes but I guess everything is fine by that point anyway. I have also removed and reinstalled the package plus numerous reboots and updates.
@dennypage said in Avahi not restarting at boot:
Disable IPv6 in the Avahi config.
I could try that for diagnostics but would prefer to have it enabled for production use.
️
-
It worked first time with IPv6 disabled in Avahi.
Presumably either an interface race-condition or that Avahi tries to start too early in the sequence, before IPv6 is ready?
I didn't expect it to be a bug; borking it myself seemed more likely.
️
-
The log for the Avahi start at reboot without IPv6 enabled is attached below.
Even with just IPv4 enabled it seems to require a number of attempts to launch over a 90 second period:
Sep 7 19:03:21 Router-8 php-fpm[990]: /rc.start_packages: Restarting/Starting all packages. Sep 7 19:03:21 Router-8 php-fpm[990]: /rc.start_packages: Starting service avahi Sep 7 19:03:21 Router-8 avahi-daemon[58191]: Found user 'avahi' (UID 558) and group 'avahi' (GID 558). Sep 7 19:03:21 Router-8 avahi-daemon[58191]: Successfully dropped root privileges. Sep 7 19:03:21 Router-8 avahi-daemon[58191]: avahi-daemon 0.8 starting up. Sep 7 19:03:21 Router-8 avahi-daemon[58191]: No service file found in /usr/local/etc/avahi/services. Sep 7 19:03:21 Router-8 avahi-daemon[58191]: Joining mDNS multicast group on interface ix1.1003.IPv4 with address 172.16.1.1. Sep 7 19:03:21 Router-8 avahi-daemon[58191]: New relevant interface ix1.1003.IPv4 for mDNS. Sep 7 19:03:21 Router-8 avahi-daemon[58191]: Joining mDNS multicast group on interface ix1.IPv4 with address 10.0.1.1. Sep 7 19:03:21 Router-8 avahi-daemon[58191]: New relevant interface ix1.IPv4 for mDNS. Sep 7 19:03:21 Router-8 avahi-daemon[58191]: Network interface enumeration completed. Sep 7 19:03:21 Router-8 avahi-daemon[58191]: Server startup complete. Host name is Router-8.local. Local service cookie is 2998446032. Sep 7 19:03:32 Router-8 root[12001]: Bootup complete Sep 7 19:03:33 Router-8 php-fpm[991]: /rc.newwanip: Netgate pfSense Plus package system has detected an IP change or dynamic WAN reconnection - 9x.xx.xxx.x5 -> 9x.xx.xxx.x5 - Restarting packages. Sep 7 19:03:33 Router-8 check_reload_status[1028]: Starting packages Sep 7 19:03:34 Router-8 php-fpm[93828]: /rc.start_packages: Restarting/Starting all packages. Sep 7 19:03:34 Router-8 php-fpm[93828]: /rc.start_packages: Stopping service avahi Sep 7 19:03:34 Router-8 avahi-daemon[58191]: Got SIGTERM, quitting. Sep 7 19:03:34 Router-8 avahi-daemon[58191]: Leaving mDNS multicast group on interface ix1.1003.IPv4 with address 172.16.1.1. Sep 7 19:03:34 Router-8 avahi-daemon[58191]: Leaving mDNS multicast group on interface ix1.IPv4 with address 10.0.1.1. Sep 7 19:03:34 Router-8 avahi-daemon[58191]: avahi-daemon 0.8 exiting. Sep 7 19:03:34 Router-8 php-fpm[93828]: /rc.start_packages: Starting service avahi Sep 7 19:03:34 Router-8 avahi-daemon[62110]: Found user 'avahi' (UID 558) and group 'avahi' (GID 558). Sep 7 19:03:34 Router-8 avahi-daemon[62110]: Successfully dropped root privileges. Sep 7 19:03:34 Router-8 avahi-daemon[62110]: avahi-daemon 0.8 starting up. Sep 7 19:03:34 Router-8 avahi-daemon[62110]: No service file found in /usr/local/etc/avahi/services. Sep 7 19:03:34 Router-8 avahi-daemon[62110]: Joining mDNS multicast group on interface ix1.1003.IPv4 with address 172.16.1.1. Sep 7 19:03:34 Router-8 avahi-daemon[62110]: New relevant interface ix1.1003.IPv4 for mDNS. Sep 7 19:03:34 Router-8 avahi-daemon[62110]: Joining mDNS multicast group on interface ix1.IPv4 with address 10.0.1.1. Sep 7 19:03:34 Router-8 avahi-daemon[62110]: New relevant interface ix1.IPv4 for mDNS. Sep 7 19:03:34 Router-8 avahi-daemon[62110]: Network interface enumeration completed. Sep 7 19:03:34 Router-8 avahi-daemon[62110]: Server startup complete. Host name is Router-8.local. Local service cookie is 393772984. Sep 7 19:04:49 Router-8 php-fpm[990]: /avahi_settings.php: Configuration Change: redacted@2xxx:xxx:xxxe:1:d440:c78d:b2f0:9fe0 (Local Database): Updated Avahi settings Sep 7 19:04:49 Router-8 php-fpm[990]: /avahi_settings.php: Stopping service avahi Sep 7 19:04:49 Router-8 avahi-daemon[62110]: Got SIGTERM, quitting. Sep 7 19:04:49 Router-8 avahi-daemon[62110]: Leaving mDNS multicast group on interface ix1.1003.IPv4 with address 172.16.1.1. Sep 7 19:04:49 Router-8 avahi-daemon[62110]: Leaving mDNS multicast group on interface ix1.IPv4 with address 10.0.1.1. Sep 7 19:04:49 Router-8 avahi-daemon[62110]: avahi-daemon 0.8 exiting. Sep 7 19:04:49 Router-8 php-fpm[990]: /avahi_settings.php: Starting service avahi Sep 7 19:04:49 Router-8 avahi-daemon[5251]: Found user 'avahi' (UID 558) and group 'avahi' (GID 558). Sep 7 19:04:49 Router-8 avahi-daemon[5251]: Successfully dropped root privileges. Sep 7 19:04:49 Router-8 avahi-daemon[5251]: avahi-daemon 0.8 starting up. Sep 7 19:04:49 Router-8 avahi-daemon[5251]: No service file found in /usr/local/etc/avahi/services. Sep 7 19:04:49 Router-8 avahi-daemon[5251]: Joining mDNS multicast group on interface ix1.1003.IPv6 with address 2xxx:xxx:xxxe:2:92ec:77ff:fe1b:70a9. Sep 7 19:04:49 Router-8 avahi-daemon[5251]: New relevant interface ix1.1003.IPv6 for mDNS. Sep 7 19:04:49 Router-8 avahi-daemon[5251]: Joining mDNS multicast group on interface ix1.1003.IPv4 with address 172.16.1.1. Sep 7 19:04:49 Router-8 avahi-daemon[5251]: New relevant interface ix1.1003.IPv4 for mDNS. Sep 7 19:04:49 Router-8 avahi-daemon[5251]: Joining mDNS multicast group on interface ix1.IPv6 with address 2xxx:xxx:xxxe:1:92ec:77ff:fe1b:70a9. Sep 7 19:04:49 Router-8 avahi-daemon[5251]: New relevant interface ix1.IPv6 for mDNS. Sep 7 19:04:49 Router-8 avahi-daemon[5251]: Joining mDNS multicast group on interface ix1.IPv4 with address 10.0.1.1. Sep 7 19:04:49 Router-8 avahi-daemon[5251]: New relevant interface ix1.IPv4 for mDNS. Sep 7 19:04:49 Router-8 avahi-daemon[5251]: Network interface enumeration completed. Sep 7 19:04:49 Router-8 avahi-daemon[5251]: Server startup complete. Host name is Router-8.local. Local service cookie is 1284148945. Sep 7 19:04:54 Router-8 php-fpm[991]: /avahi_settings.php: Configuration Change: redacted@2xxx:xxx:xxxe:1:d440:c78d:b2f0:9fe0 (Local Database): Updated Avahi settings Sep 7 19:04:54 Router-8 php-fpm[991]: /avahi_settings.php: Stopping service avahi Sep 7 19:04:54 Router-8 avahi-daemon[5251]: Got SIGTERM, quitting. Sep 7 19:04:54 Router-8 avahi-daemon[5251]: Leaving mDNS multicast group on interface ix1.1003.IPv6 with address 2xxx:xxx:xxxe:2:92ec:77ff:fe1b:70a9. Sep 7 19:04:54 Router-8 avahi-daemon[5251]: Leaving mDNS multicast group on interface ix1.1003.IPv4 with address 172.16.1.1. Sep 7 19:04:54 Router-8 avahi-daemon[5251]: Leaving mDNS multicast group on interface ix1.IPv6 with address 2xxx:xxx:xxxe:1:92ec:77ff:fe1b:70a9. Sep 7 19:04:54 Router-8 avahi-daemon[5251]: Leaving mDNS multicast group on interface ix1.IPv4 with address 10.0.1.1. Sep 7 19:04:54 Router-8 avahi-daemon[5251]: avahi-daemon 0.8 exiting. Sep 7 19:04:54 Router-8 php-fpm[991]: /avahi_settings.php: Starting service avahi Sep 7 19:04:54 Router-8 avahi-daemon[15744]: Found user 'avahi' (UID 558) and group 'avahi' (GID 558). Sep 7 19:04:54 Router-8 avahi-daemon[15744]: Successfully dropped root privileges. Sep 7 19:04:54 Router-8 avahi-daemon[15744]: avahi-daemon 0.8 starting up. Sep 7 19:04:54 Router-8 avahi-daemon[15744]: No service file found in /usr/local/etc/avahi/services. Sep 7 19:04:54 Router-8 avahi-daemon[15744]: Joining mDNS multicast group on interface ix1.1003.IPv6 with address 2xxx:xxx:xxxe:2:92ec:77ff:fe1b:70a9. Sep 7 19:04:54 Router-8 avahi-daemon[15744]: New relevant interface ix1.1003.IPv6 for mDNS. Sep 7 19:04:54 Router-8 avahi-daemon[15744]: Joining mDNS multicast group on interface ix1.1003.IPv4 with address 172.16.1.1. Sep 7 19:04:54 Router-8 avahi-daemon[15744]: New relevant interface ix1.1003.IPv4 for mDNS. Sep 7 19:04:54 Router-8 avahi-daemon[15744]: Joining mDNS multicast group on interface ix1.IPv6 with address 2xxx:xxx:xxxe:1:92ec:77ff:fe1b:70a9. Sep 7 19:04:54 Router-8 avahi-daemon[15744]: New relevant interface ix1.IPv6 for mDNS. Sep 7 19:04:54 Router-8 avahi-daemon[15744]: Joining mDNS multicast group on interface ix1.IPv4 with address 10.0.1.1. Sep 7 19:04:54 Router-8 avahi-daemon[15744]: New relevant interface ix1.IPv4 for mDNS. Sep 7 19:04:54 Router-8 avahi-daemon[15744]: Network interface enumeration completed. Sep 7 19:04:54 Router-8 avahi-daemon[15744]: Server startup complete. Host name is Router-8.local. Local service cookie is 83068962.
️
-
@RobbieTT said in Avahi not restarting at boot:
It worked first time with IPv6 disabled in Avahi.
Thought so.
@RobbieTT said in Avahi not restarting at boot:
Even with just IPv4 enabled it seems to require a number of attempts to launch over a 90 second period
What you are seeing there is restarts based upon interface configuration (IP) changes. This is normal behavior.
I expect that you are using DHCP to acquire an IPv6 delegation from the WAN, and then using it to configure internal interfaces via Track Interface.
Unless you are using fully static IPv6, I would recommend that you do not use IPv6 in Avahi. You don't loose anything by having IPv6 disabled in Avahi, and many devices that depend upon mDNS won't use IPv6 even if it is offered. IPv4 works just fine.