Posted: Wed Apr 09, 2025 1:02 Post subject: Avahi fails to start on MX4300: Failed to connect to socket
Running Linksys MX4300 as a Router, Gateway, WAP, VAP and part of a 2-Node wireless mesh setup with another MX4300.
Build: 60269, all settings entered from scratch.
Interested in using Avahi/mDNS service to facilitate connections to Smart TV on guest subnet from device on the main subnet. (Firewall rules have been created to allow this traffic.)
Issue: Syslog shows avahi daemon attempt to start, but fails:
Code:
Dec 31 16:00:28.150 Aere Node 1 daemon.info avahi-daemon[2441]: avahi-daemon 0.8 starting up.
Dec 31 16:00:28.151 Aere Node 1 daemon.warn avahi-daemon[2441]: WARNING: No NSS support for mDNS detected, consider installing nss-mdns!
Dec 31 16:00:28.152 Aere Node 1 daemon.err avahi-daemon[2441]: dbus_bus_get_private(): Failed to connect to socket /tmp/var/run/dbus/system_bus_socket: No such file or directory
Dec 31 16:00:28.152 Aere Node 1 daemon.warn avahi-daemon[2441]: WARNING: Failed to contact D-Bus daemon.
Dec 31 16:00:28.152 Aere Node 1 daemon.info avahi-daemon[2441]: avahi-daemon 0.8 exiting.
Dec 31 16:00:28.154 Aere Node 1 user.info : [avahi-daemon] : Error on startup, returncode 1
If I manually disable/re-enable Avahi from the GUI, it then starts normally and I can cast to the Smart TV from the main subnet. But from a reboot, it keeps failing to start.
The system_bus_socket appears to exist, as shown in the screenshot.
I have also tried resetting to defaults, then only enabling ssh, syslog and avahi resolver/reflector, rebooting. Still get the error, even when trying with latest build 60621.
I have not touched any of the default config files relating to avahi or any other service.
Is this something that can be fixed with a config file or startup command, or is this a bug?
As a work-around, you could try adding a restart of mdns to Administrator/Commands/Startup after a delay of some sort. _________________ - Linksys EA8500: I-Gateway, WAP/VAP 5ghz only. Features: VLANs, Samba, WG, Entware - r60xxx
- Linksys EA8500: 802.11s Secondary w/VLAN Trunk over 5ghz - r60xxx
- Linksys MX4300: 802.11s Primary w/VLAN Trunk over 5ghz. 2.4ghz WAP/VAP only - r60xxx
- Linksys MX4300: (WAP/VAP (7)) Multiple VLANs over single trunk port. Entware/Samba r60xxx
- Linksys MR7350: WDS Station for extended Ethernet r60xxx
- Linksys MR7500, MX8500: None in production. Just testing. r60xxx
- OSes: Fedora 40, 10 RPis (2,3,4,5), 23 ESP8266s: Straight from Amiga to Linux in '95, never having owned a Windows PC.
- Forum member #248
Okay, so you're suggesting that mDNS is coming up before WAN and NTP, since this is his main gateway, both should be present. Very possible, but in that case adding a restart in the Startup should take care of this, as a workaround for now anyway. Wait for the WAN before starting mDNS. _________________ - Linksys EA8500: I-Gateway, WAP/VAP 5ghz only. Features: VLANs, Samba, WG, Entware - r60xxx
- Linksys EA8500: 802.11s Secondary w/VLAN Trunk over 5ghz - r60xxx
- Linksys MX4300: 802.11s Primary w/VLAN Trunk over 5ghz. 2.4ghz WAP/VAP only - r60xxx
- Linksys MX4300: (WAP/VAP (7)) Multiple VLANs over single trunk port. Entware/Samba r60xxx
- Linksys MR7350: WDS Station for extended Ethernet r60xxx
- Linksys MR7500, MX8500: None in production. Just testing. r60xxx
- OSes: Fedora 40, 10 RPis (2,3,4,5), 23 ESP8266s: Straight from Amiga to Linux in '95, never having owned a Windows PC.
- Forum member #248
There's probably a LOT I am not aware of around this, but from my perspective it seems that Avahi is dependent on dbus being active first, but according to the log dbus is being launched after Avahi (see last line).
Code:
Dec 31 16:00:28.151 Aere Node 1 daemon.warn avahi-daemon[2441]: WARNING: No NSS support for mDNS detected, consider installing nss-mdns!
Dec 31 16:00:28.152 Aere Node 1 daemon.err avahi-daemon[2441]: dbus_bus_get_private(): Failed to connect to socket /tmp/var/run/dbus/system_bus_socket: No such file or directory
Dec 31 16:00:28.152 Aere Node 1 daemon.warn avahi-daemon[2441]: WARNING: Failed to contact D-Bus daemon.
Dec 31 16:00:28.152 Aere Node 1 daemon.info avahi-daemon[2441]: avahi-daemon 0.8 exiting.
Dec 31 16:00:28.154 Aere Node 1 user.info : [avahi-daemon] : Error on startup, returncode 1
Dec 31 16:00:28.270 Aere Node 1 user.info : [dbus-launch] : successfully started
If Avahi has some clear dependencies (dbus, perhaps WAN, NTP as well) then shouldn't the system wait for the dependencies to be in place first, either explicitly, or implicitly through some time delay?
I'm happy to get by with a workaround, but does anyone else think this qualifies as a bug?
I'm happy to get by with a workaround, but does anyone else think this qualifies as a bug?
We would need to see the compile flags for avahi and make sure that --no-dbus is enabled. If I recall, dbus was not even part of dd-wrt until Bluetooth was added two months ago and avahi has been around much longer. I am using mDNS on my EA8500 and it does not have dbus on it at all. I know that is not an apples to apples comparison, but would be odd if only routers with bluetooth/dbus would be affected by this. I am aware the MX4300 does NOT have bluetooth, but all AX routers got the bluetooth and dbus treatment regardless afaik.
It may be that @BrainSlayer just needs to re-order the startup position of it. _________________ - Linksys EA8500: I-Gateway, WAP/VAP 5ghz only. Features: VLANs, Samba, WG, Entware - r60xxx
- Linksys EA8500: 802.11s Secondary w/VLAN Trunk over 5ghz - r60xxx
- Linksys MX4300: 802.11s Primary w/VLAN Trunk over 5ghz. 2.4ghz WAP/VAP only - r60xxx
- Linksys MX4300: (WAP/VAP (7)) Multiple VLANs over single trunk port. Entware/Samba r60xxx
- Linksys MR7350: WDS Station for extended Ethernet r60xxx
- Linksys MR7500, MX8500: None in production. Just testing. r60xxx
- OSes: Fedora 40, 10 RPis (2,3,4,5), 23 ESP8266s: Straight from Amiga to Linux in '95, never having owned a Windows PC.
- Forum member #248