I’m having an issue since I enabled the homekit component in Home Assistant, version 0.101.1. Maybe some of you could help a fellow tinkerer out!
I’m running HA on docker, with network_mode: host because I’ve also an Aqara gateway, that needs this if running on docker.
The issue is that HA binds itself to multiple 0.0.0.0 addresses on port 5353 for, I believe, multicast discovery, but the wrong “interfaces” never consume the udp packets, so these ends up saturating the UDP sockets memory, and then UDP packets errors start popping up.
Here an example from netstat -ulpn, as you can see the Recv-Q backlog is ramping up, and this is just after 20 minutes of HA running.
If I just expose port 8123 on docker and remove network_mode: host, then the issue isn’t present, but I can’t afford to lose all the sensors from Aqara, so this is not an option.
I’ve reverted for a file to a docker install without --net host, but it’s excruciatingly painful, as some integrations - even with the right ports open - refuse to work (e.g. playstation 4, lg tv, etc)
I find it impossible that no one else is having this issue: my only explanation is that no one is using a tool like netdata that shows the error to the user.
Thanks for the heads up. I recently filed a bug request for zeroconf, and was told that your fix (option for default interface) is a possible candidate to solve my issue.
I’d like to take advantage of your expertise though: I recently updated the homekit configuration with the new option, and I also tried to disable zeroconf and discovery, but home assistant keeps binding to multiple interfaces. Do you have suggestions on how I could pinpoint the issue?
I will test the “default interface” option on zeroconf as soon as it leaves the dev/beta branch (I don’t know if using tag “dev” is enough even for the docker version), but I’m still dubious that it will be enough, as it seems there are 3 different components that use multicast and start opening these sockets. Culprit is always home assistant.
Excerpt below
You’ll need to set the option for both homekit and zeroconf since they both use Zeroconf which by default binds to all interfaces. When the default interface option is set Zeroconf should only bind to the default interface.