Avahi fails to start on MX4300: Failed to connect to socket

Post new topic   Reply to topic    DD-WRT Forum Index -> Advanced Networking
Author Message
AshyBoi
DD-WRT Novice


Joined: 08 Dec 2024
Posts: 12

PostPosted: Wed Apr 09, 2025 1:02    Post subject: Avahi fails to start on MX4300: Failed to connect to socket Reply with quote
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?

Thank you!



Avahi Manual Start.png
 Description:
Manual start of Avahi works
 Filesize:  234.52 KB
 Viewed:  759 Time(s)

Avahi Manual Start.png



dbus system_bus_socket.png
 Description:
system_bus_socket
 Filesize:  61.08 KB
 Viewed:  759 Time(s)

dbus system_bus_socket.png



messages.txt
 Description:
syslog

Download
 Filename:  messages.txt
 Filesize:  102.13 KB
 Downloaded:  0 Time(s)

Sponsor
kernel-panic69
DD-WRT Guru


Joined: 08 May 2018
Posts: 17101
Location: Texas, USA

PostPosted: Wed Apr 09, 2025 1:27    Post subject: Reply with quote
What about waiting until check_ps and service_monitor restart it?
_________________
"Life is but a fleeting moment, a vapor that vanishes quickly; All is vanity"
Contribute To DD-WRT
Pogo - A minimal level of ability is expected and needed...
RSS feed for DD-WRT releases (2025)
RSS feed for DD-WRT releases (2024)
RSS feed for DD-WRT releases (2023)

----------------------
Linux User #377467 counter.li.org / linuxcounter.net
lexridge
DD-WRT Guru


Joined: 07 Jun 2006
Posts: 2151
Location: WV, USA

PostPosted: Wed Apr 09, 2025 4:13    Post subject: Reply with quote
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
kernel-panic69
DD-WRT Guru


Joined: 08 May 2018
Posts: 17101
Location: Texas, USA

PostPosted: Wed Apr 09, 2025 4:28    Post subject: Reply with quote
Pretty sure mdns has to have WAN up and NTP sync before it will start. That's what appears to be wrong.
_________________
"Life is but a fleeting moment, a vapor that vanishes quickly; All is vanity"
Contribute To DD-WRT
Pogo - A minimal level of ability is expected and needed...
RSS feed for DD-WRT releases (2025)
RSS feed for DD-WRT releases (2024)
RSS feed for DD-WRT releases (2023)

----------------------
Linux User #377467 counter.li.org / linuxcounter.net
lexridge
DD-WRT Guru


Joined: 07 Jun 2006
Posts: 2151
Location: WV, USA

PostPosted: Wed Apr 09, 2025 5:15    Post subject: Reply with quote
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
AshyBoi
DD-WRT Novice


Joined: 08 Dec 2024
Posts: 12

PostPosted: Wed Apr 09, 2025 21:58    Post subject: Reply with quote
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?

Thanks!
lexridge
DD-WRT Guru


Joined: 07 Jun 2006
Posts: 2151
Location: WV, USA

PostPosted: Wed Apr 09, 2025 22:19    Post subject: Reply with quote
AshyBoi wrote:
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
AshyBoi
DD-WRT Novice


Joined: 08 Dec 2024
Posts: 12

PostPosted: Wed Apr 09, 2025 22:48    Post subject: Reply with quote
Quote:

It may be that @BrainSlayer just needs to re-order the startup position of it.


It sounds like that would be the appropriate fix, if possible.

In the meantime I have added the following to Administration -> Commands -> Startup:

Code:

# Trigger Avahi/mDNS to start
service mdns start


I have rebooted twice to test it, and both times it did the job to start the Avahi/mdns service, even without adding in any delay before executing.

Crisis averted! Cool
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> Advanced Networking All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum