mDNS: avahi works once and then never again

I am trying to find devices in one VLAN (br-iot) from another VLAN (br-lan).

I have configured avahi and opened port 5353 from br-iot to my router (running OpenWrt).

The device I am trying to reach is a WLED bulb and I am trying to reach it from the WLED app on my phone.

This works exactly once after a restart of avahi-daemon.

So, when I open the app and start the discovery I see this:

"Found no lights yet" stays indefinitely, unless I do a

service avahi-daemon restart

The app then can see (and control) the device:

Here is my config

root@OpenWrt:~# cat /etc/avahi/avahi-daemon.conf 
[server]
#host-name=foo
#domain-name=local
use-ipv4=yes
use-ipv6=no
check-response-ttl=no
allow-interfaces=br-lan,br-dienste,br-iot,br-lan100,br-nonet
enable-dbus=no

[publish]
publish-addresses=yes
publish-hinfo=yes
publish-workstation=yes
publish-domain=yes
#publish-dns-servers=192.168.1.1
#publish-resolv-conf-dns-servers=yes

[reflector]
enable-reflector=yes
reflect-ipv=no
#use-ipv6=no

[rlimits]
#rlimit-as=
rlimit-core=0
rlimit-data=4194304
rlimit-fsize=0
rlimit-nofile=30
rlimit-stack=4194304
rlimit-nproc=3

And an excerpt from logread:

Mon Nov  6 23:02:35 2023 daemon.info avahi-daemon[16768]: avahi-daemon 0.8 starting up.
Mon Nov  6 23:02:35 2023 daemon.warn avahi-daemon[16768]: WARNING: No NSS support for mDNS detected, consider installing nss-mdns!
Mon Nov  6 23:02:35 2023 daemon.info avahi-daemon[16768]: No service file found in /etc/avahi/services.
Mon Nov  6 23:02:35 2023 daemon.info avahi-daemon[16768]: Joining mDNS multicast group on interface br-lan.IPv4 with address 192.168.178.1.
Mon Nov  6 23:02:35 2023 daemon.info avahi-daemon[16768]: New relevant interface br-lan.IPv4 for mDNS.
Mon Nov  6 23:02:35 2023 daemon.info avahi-daemon[16768]: Joining mDNS multicast group on interface br-iot.IPv4 with address 10.1.103.1.
Mon Nov  6 23:02:35 2023 daemon.info avahi-daemon[16768]: New relevant interface br-iot.IPv4 for mDNS.
Mon Nov  6 23:02:35 2023 daemon.info avahi-daemon[16768]: Joining mDNS multicast group on interface br-dienste.IPv4 with address 10.1.99.1.
Mon Nov  6 23:02:35 2023 daemon.info avahi-daemon[16768]: New relevant interface br-dienste.IPv4 for mDNS.
Mon Nov  6 23:02:35 2023 daemon.info avahi-daemon[16768]: Joining mDNS multicast group on interface br-nonet.IPv4 with address 10.1.104.1.
Mon Nov  6 23:02:35 2023 daemon.info avahi-daemon[16768]: New relevant interface br-nonet.IPv4 for mDNS.
Mon Nov  6 23:02:35 2023 daemon.info avahi-daemon[16768]: Joining mDNS multicast group on interface br-lan100.IPv4 with address 10.1.100.1.
Mon Nov  6 23:02:35 2023 daemon.info avahi-daemon[16768]: New relevant interface br-lan100.IPv4 for mDNS.
Mon Nov  6 23:02:35 2023 daemon.info avahi-daemon[16768]: Network interface enumeration completed.
Mon Nov  6 23:02:35 2023 daemon.info avahi-daemon[16768]: Registering new address record for fe80::e6c3:2aff:fe47:1a7e on br-lan.*.
Mon Nov  6 23:02:35 2023 daemon.info avahi-daemon[16768]: Registering new address record for 192.168.178.1 on br-lan.IPv4.
Mon Nov  6 23:02:35 2023 daemon.info avahi-daemon[16768]: Registering new address record for fe80::e6c3:2aff:fe47:1a7e on br-iot.*.
Mon Nov  6 23:02:35 2023 daemon.info avahi-daemon[16768]: Registering new address record for 10.1.103.1 on br-iot.IPv4.
Mon Nov  6 23:02:35 2023 daemon.info avahi-daemon[16768]: Registering new address record for 10.1.99.1 on br-dienste.IPv4.
Mon Nov  6 23:02:35 2023 daemon.info avahi-daemon[16768]: Registering new address record for 10.1.101.1 on br-dienste.IPv4.
Mon Nov  6 23:02:35 2023 daemon.info avahi-daemon[16768]: Registering new address record for 10.1.104.1 on br-nonet.IPv4.
Mon Nov  6 23:02:35 2023 daemon.info avahi-daemon[16768]: Registering new address record for 10.1.100.1 on br-lan100.IPv4.
Mon Nov  6 23:02:35 2023 daemon.info avahi-daemon[16768]: Registering HINFO record with values 'MIPS'/'LINUX'.
Mon Nov  6 23:02:36 2023 daemon.info avahi-daemon[16768]: Server startup complete. Host name is OpenWrt.local. Local service cookie is 2213841025.

Any hints or tips are more than welcome! I am also willing to try another reflector, but it seems that avahi is the only one working on OpenWrt.

Were you able to resolve the issue? I am having the exact same problem wit android TV detection (for the remote control). Chromecast detection for example works fine.

I have been messing with this for a few hours and just minutes after asking I found the solution, maybe it will help you, too:

I set the following config in my avahi config in the [server] section:
cache-entries-max=0

make sure you have only one cache-entries-max config (I had set it to 0 once already, but there were 2 different values and it took the non-0 one).

Hope it helps you too.

for me it just blocks all output from

avahi-browse --all --ignore-local --resolve --terminate

@Dermac and @chrish -- Take a look at this and see if it helps give any pointers:

Did you adjust your firewall rules to allow access to the printer? I have a similar setup using CUPS which prints on port 631. In my case the printer is on br-lan and I’m allowing access from guest. Here are the relevant bits I added to /etc/config/firewall

config rule
        option name 'Allow-Guest-mDNS'
        list proto 'udp'
        option src 'guest'
        option src_port '5353'
        list dest_ip '224.0.0.251'
        option dest_port '5353'
        option target 'ACCEPT'

config rule
        option name 'Allow-Guest-Cups'
        option src 'guest'
        option dest 'lan'
        option target 'ACCEPT'
        list dest_ip 'ip.of.printer'	
        list proto 'tcp'
        option dest_port '631'

I have a similar problem, and none of the suggested fixes for Avahi seem to work.

I installed msdn_repeater and fixed the problem. More here mDNS reflector problems - #2 by robca