Avahi: "Failed to create client object: Daemon not running"



  • Hello everyone,

    I'm trying to get mDNS to work across various VLANS and suspect Avahi is not working properly although it appears it is running:

    [2.4.4-RELEASE][admin@pfsense.jam.lan]/root: ps aux|grep avahi
    avahi   74492   0.0  0.0   7480  3764  -  S    14:48       0:00.93 avahi-daemon: running [pfsense.local] (avahi-daemon)
    

    This is what the system.log shows after restarting the Avahi service in the pfSense UI:

    [2.4.4-RELEASE][admin@pfsense.jam.lan]/root: cat /var/log/system.log | grep "avahi"
    Apr 26 14:48:03 pfsense avahi-daemon[52871]: Got SIGTERM, quitting.
    Apr 26 14:48:03 pfsense avahi-daemon[52871]: Leaving mDNS multicast group on interface vtnet0.40.IPv4 with address 192.168.40.1.
    Apr 26 14:48:03 pfsense avahi-daemon[52871]: Leaving mDNS multicast group on interface vtnet0.35.IPv4 with address 192.168.35.1.
    Apr 26 14:48:03 pfsense avahi-daemon[52871]: Leaving mDNS multicast group on interface vtnet0.25.IPv4 with address 192.168.25.1.
    Apr 26 14:48:03 pfsense avahi-daemon[52871]: Leaving mDNS multicast group on interface vtnet0.20.IPv4 with address 192.168.20.1.
    Apr 26 14:48:03 pfsense avahi-daemon[52871]: Leaving mDNS multicast group on interface vtnet0.15.IPv4 with address 192.168.15.1.
    Apr 26 14:48:03 pfsense avahi-daemon[52871]: Leaving mDNS multicast group on interface vtnet0.IPv4 with address 192.168.1.1.
    Apr 26 14:48:03 pfsense avahi-daemon[52871]: avahi-daemon 0.7 exiting.
    Apr 26 14:48:03 pfsense avahi-daemon[74492]: Found user 'avahi' (UID 558) and group 'avahi' (GID 558).
    Apr 26 14:48:03 pfsense avahi-daemon[74492]: Successfully dropped root privileges.
    Apr 26 14:48:03 pfsense avahi-daemon[74492]: avahi-daemon 0.7 starting up.
    Apr 26 14:48:03 pfsense avahi-daemon[74492]: WARNING: No NSS support for mDNS detected, consider installing nss-mdns!
    Apr 26 14:48:03 pfsense avahi-daemon[74492]: Loading service file /usr/local/etc/avahi/services/sftp-ssh.service.
    Apr 26 14:48:03 pfsense avahi-daemon[74492]: Loading service file /usr/local/etc/avahi/services/ssh.service.
    Apr 26 14:48:03 pfsense avahi-daemon[74492]: Joining mDNS multicast group on interface vtnet0.40.IPv4 with address 192.168.40.1.
    Apr 26 14:48:03 pfsense avahi-daemon[74492]: New relevant interface vtnet0.40.IPv4 for mDNS.
    Apr 26 14:48:03 pfsense avahi-daemon[74492]: Joining mDNS multicast group on interface vtnet0.35.IPv4 with address 192.168.35.1.
    Apr 26 14:48:03 pfsense avahi-daemon[74492]: New relevant interface vtnet0.35.IPv4 for mDNS.
    Apr 26 14:48:03 pfsense avahi-daemon[74492]: Joining mDNS multicast group on interface vtnet0.25.IPv4 with address 192.168.25.1.
    Apr 26 14:48:03 pfsense avahi-daemon[74492]: New relevant interface vtnet0.25.IPv4 for mDNS.
    Apr 26 14:48:03 pfsense avahi-daemon[74492]: Joining mDNS multicast group on interface vtnet0.20.IPv4 with address 192.168.20.1.
    Apr 26 14:48:03 pfsense avahi-daemon[74492]: New relevant interface vtnet0.20.IPv4 for mDNS.
    Apr 26 14:48:03 pfsense avahi-daemon[74492]: Joining mDNS multicast group on interface vtnet0.15.IPv4 with address 192.168.15.1.
    Apr 26 14:48:03 pfsense avahi-daemon[74492]: New relevant interface vtnet0.15.IPv4 for mDNS.
    Apr 26 14:48:03 pfsense avahi-daemon[74492]: Joining mDNS multicast group on interface vtnet0.IPv4 with address 192.168.1.1.
    Apr 26 14:48:03 pfsense avahi-daemon[74492]: New relevant interface vtnet0.IPv4 for mDNS.
    Apr 26 14:48:03 pfsense avahi-daemon[74492]: Network interface enumeration completed.
    Apr 26 14:48:03 pfsense avahi-daemon[74492]: Server startup complete. Host name is pfsense.local. Local service cookie is 4150223358.
    Apr 26 14:48:03 pfsense avahi-daemon[74492]: Failed to add service 'pfsense' of type '_ssh._tcp', ignoring service group (/usr/local/etc/avahi/services/ssh.service): Not permitted
    Apr 26 14:48:03 pfsense avahi-daemon[74492]: Failed to add service 'pfsense' of type '_sftp-ssh._tcp', ignoring service group (/usr/local/etc/avahi/services/sftp-ssh.service): Not permitted
    

    In reference to the NSS support, is that required, for example, to cast the Android Youtube app to a SmartTV on a different VLAN? Wireshark is showing mDNS queries when I try this and I have ANY ANY rules in pfSense's Firewall between the appropriate VLANS (for testing) but cannot get this to work.

    Also, why does this show the Avahi daemon is not running when it is:

    [2.4.4-RELEASE][admin@pfsense.jam.lan]/root: avahi-browse -a
    Failed to create client object: Daemon not running
    


  • This part :
    @alteredstate said in Avahi: "Failed to create client object: Daemon not running":

    [2.4.4-RELEASE][admin@pfsense.jam.lan]/root: avahi-browse -a
    Failed to create client object: Daemon not running

    is known : https://forum.netgate.com/topic/134339/new-avahi-package/30



  • @Gertjan said in Avahi: "Failed to create client object: Daemon not running":

    This part :
    @alteredstate said in Avahi: "Failed to create client object: Daemon not running":

    [2.4.4-RELEASE][admin@pfsense.jam.lan]/root: avahi-browse -a
    Failed to create client object: Daemon not running

    is known : https://forum.netgate.com/topic/134339/new-avahi-package/30

    Thanks for the reply! So that seems related to "dbus" but it appears to be disabled intentionally. I suppose the: "nss-mdns" is not needed as well? I see this on the pfSense Packet Capture:

    22:48:23.451723 44:91:60:db:60:aa (oui Unknown) > 01:00:5e:00:00:fb (oui Unknown), ethertype IPv4 (0x0800), length 135: (tos 0x0, ttl 255, id 49097, offset 0, flags [DF], proto UDP (17), length 121)
        Galaxy-S9.jam.lan.mdns > 224.0.0.251.mdns: [udp sum ok] 4 [4q] PTR (QM)? _674A0243._sub._googlecast._tcp.local. PTR (QM)? _233637DE._sub._googlecast._tcp.local. PTR (QM)? _8E6C866D._sub._googlecast._tcp.local. PTR (QM)? _googlecast._tcp.local. (93)
    

    pfSense is definitely seeing the mdns query and I would have expected to see some sort of response from Avahi but nothing.



  • Has anyone been able to successfully get this type of setup to work and by that I mean using Avahi to route an mDNS "Cast" from a phone app to a smart TV across VLANs? If so, would you please provide some insight on how you were able to achieve this?



  • I'm trying to get this working at the moment too but no luck.

    Same messages in the logs as above

    I can cast to firestick, smart tv and chrome cast if i connect wifi to the vlan containing all these devices. Changing to a different vlan i can only cast to chromecast. I can see the smart tv but it won't connect, and firestick won't even show up.

    Did anyone ever get this working?



  • @jagradang said in Avahi: "Failed to create client object: Daemon not running":

    I'm trying to get this working at the moment too but no luck.

    Same messages in the logs as above

    I can cast to firestick, smart tv and chrome cast if i connect wifi to the vlan containing all these devices. Changing to a different vlan i can only cast to chromecast. I can see the smart tv but it won't connect, and firestick won't even show up.

    Did anyone ever get this working?

    Were you able to resolve this? This just started happening recently, but if I switch my Samsung Galaxy S9+ to the same WiFi network as my Samsung TV (VLAN20) and cast Youtube from my phone then I can switch my phone back to the other WiFi network (VLAN35) and still continue to cast Youtube. This was not the case before and I would lose all casting ability when switching back to VLAN35. The only catch is I must make the initial cast from VLAN20. Not sure what caused this to start happening but I'll take it! Just wish I could figure out how to initially cast from VLAN35 so I could avoid switching WiFi networks all the time.



  • @alteredstate still trying to work out what's happening. I can cast YouTube just fine using avahi. But I can't cast to Samsung tv or my firestick. Only if I connect to that vlan. My printer can be found either. I have to connect using its ip only.

    There is definately an underlying issue or rule that's blocking all this broadcast readdix or something.

    If I find it I'll shout back.


Log in to reply