hc: Intermittent discovery issues
It appears that I’m having some intermittent discovery issues. I have avahi running on the same machine and this pops up on the avahi log:
*** WARNING: Detected another IPv4 mDNS stack running on this host. This makes mDNS unreliable and is thus not recommended. ***
I wonder if that is somehow related?
About this issue
- Original URL
- State: open
- Created 5 years ago
- Comments: 20 (10 by maintainers)
Commits related to this issue
- Set dnssd hostname to a randomly generated, persistent id #147 — committed to brutella/hc by brutella 4 years ago
FYI I’ve refactored hc and made a new library out of it. The new library is available as hap.
Please check if your issue is resolved by the new implementation.
I can report back that after more than a year of not seriously using homekit due to issues like this, we have found the problem.
Check if somewhere in your home, you have a managed switch with IGMP turned on. IGMP is useful in enterprise networks but will lead to all sorts of multicast failures (including multicast DNS) if not carefully configured in your entire subnet, especially if some of your switches do talk IGMP and some do not (linux and hyper-v bridges included). If you have an IoT subnet with mDNS reflection things might get even worse.
In our case, it was a TP-Link managed switch that even logged to its web interface how it had stopped delivering multicast to ports with unmanaged switches behind it, because at that point it becomes a race condition for which device behind it will respond first - and on a linux bridge that’s very often the host.
x86_64 linux, bare metal, ethernet connected to a bridge for some libvirt VMs - our binary runs on bare metal though
If you’d like I can clean up the source and push it later, maybe we’re screwing up somewhere colossally we’re not aware of.
Could you please test it with the
hostnamebranch?