As soon as the container is started, the host experiences network packet loss, causing a SSH session to become unbearably slow. HA seems to run fine, though, but I can’t be sure it also isn’t suffering from lost packets.
The Docker install includes the --privileged and --network=host options. I’m suspecting these interfere with Docker-managed iptables config.
I see the following interfaces in the Docker container. Is this right / to be expected ? I’m a bit surprised to see the Docker-specific IP as well as a Virtual ethernet port.
Are you mapping a zigbee stick into zha? If not, there is no reason to use priviledged mode. Even if you are using zha, the -device flag and specifying the zigbee stick’s path is a better way to configure the container.
Host networking on the other hand is needed for device discovery, and many integrations won’t work properly (or at all) without host networking.
What command did you run to see those? If I run ifconfig from the host machine, I see all the networks you do and more. I actually have 7 virtual networks- I’m assuming these are created by integrations using discovery but I’m not sure.
I’m not sure running with different network configs won’t cause a setting to be changed, even to the point I have to redo the configuration. That’s why I wanted to ask first.
But I also don’t understand how network=host could cause packet drops. netstat (in HA container) also does not list the offended port.
Working with zigbee2mqtt, so I could indeed drop --privileged.
I used ifconfig in the HA container. I also found out that the virtual port is from an Ethernet interface that happens to sit in my monitor. So the interface view is exactly the same as when running ifconfig in the host.
No. HA really only requires port 8123. Host mode needed for discovery. Ultimately you will probably use host mode, i do not, but for immediate testing and troubleshooting it is not needed
That shouldn’t in itself cause the issue - I’ve run Home Assistant container in host networking mode for a few years and never noticed the issue. I’d assume your packet loss is being caused by something else - either due to a conflict with Home Assistant, or possibly due to an integration being mis-configured, to a problem with how docker itself is configured. Any log errors in Home Assistant? What integrations are you using currently?
That should be the case using host networking mode - since there is no network isolation between the container and the host in this situation.
I agree - this could be an issue with the docker configuration itself - possibly a permissions issue. What is the host OS? Be advised host networking only works in linux (not windows or mac). Did you install docker according to the guide, including making sure to run the command to remove all previous old versions of docker?
Did you follow the post install steps to make sure docker commands can be run without needing sudo? I see sudo in your command to start home assistant container, which would imply this step wasn’t done. If docker can’t be managed as a non-root user you will likely have issues with host networking.
I’m having the same issue. What is the solution for this? Weirdly, it runs well sometimes and sometimes, I’ll be stuck with slow SSH and a loading screen of the Home assistant login UI page. (on a browser). If I don’t run home assistant docker, everything runs fast and well, such as Portainer.
I also get all these issues when it doesn’t run “smoothly”. When it runs smoothly, I don’t see these error logs.
The storage used is about 5G out of 128G. The SD card is new, I also checked read/write to the card and it’s good. Also, the thing is, all the issues happen only if the home assistant container is started. Oddly, sometimes, it won’t happen.
No camera integration. The current install is really a bare bone.