Unstable network connection from inside Home Assistant Docker Container

Hello,

from inside my Home Assistant Docker Container, I experience unreliable network connections to outside of the container. I can reproduce this on two different host machines with different Home Assistant Docker Image Versions.

Other containers on the same host do not show this issue.

Here’s what I do to reproduce the issue:

root@homeserver:~# docker exec -ti homeassistant /bin/bash
home-assistant:/config# nc -vz host.docker.internal 22
nc: host.docker.internal (172.17.0.1:22): Network unreachable
home-assistant:/config# nc -vz host.docker.internal 22
host.docker.internal (172.17.0.1:22) open
home-assistant:/config# nc -vz host.docker.internal 22
host.docker.internal (172.17.0.1:22) open
home-assistant:/config# nc -vz host.docker.internal 22
host.docker.internal (172.17.0.1:22) open
home-assistant:/config# nc -vz host.docker.internal 22
nc: host.docker.internal (172.17.0.1:22): Network unreachable
home-assistant:/config# nc -vz host.docker.internal 22
nc: host.docker.internal (172.17.0.1:22): Network unreachable
home-assistant:/config# nc -vz host.docker.internal 22
host.docker.internal (172.17.0.1:22) open
home-assistant:/config# nc -vz host.docker.internal 22
host.docker.internal (172.17.0.1:22) open
home-assistant:/config# nc -vz host.docker.internal 22
host.docker.internal (172.17.0.1:22) open
home-assistant:/config# nc -vz host.docker.internal 22
host.docker.internal (172.17.0.1:22) open
home-assistant:/config# nc -vz host.docker.internal 22
nc: host.docker.internal (172.17.0.1:22): Network unreachable
home-assistant:/config# nc -vz host.docker.internal 22
host.docker.internal (172.17.0.1:22) open

From a different container on the same host, I do not see this issue:

root@homeserver:~# docker exec -ti nodered /bin/bash
node-red:~$ nc -vz host.docker.internal 22
host.docker.internal (172.17.0.1:22) open
node-red:~$ nc -vz host.docker.internal 22
host.docker.internal (172.17.0.1:22) open
node-red:~$ nc -vz host.docker.internal 22
host.docker.internal (172.17.0.1:22) open
node-red:~$ nc -vz host.docker.internal 22
host.docker.internal (172.17.0.1:22) open
node-red:~$ nc -vz host.docker.internal 22
host.docker.internal (172.17.0.1:22) open
node-red:~$ nc -vz host.docker.internal 22
host.docker.internal (172.17.0.1:22) open
node-red:~$ nc -vz host.docker.internal 22
host.docker.internal (172.17.0.1:22) open
node-red:~$ nc -vz host.docker.internal 22
host.docker.internal (172.17.0.1:22) open
node-red:~$ nc -vz host.docker.internal 22
host.docker.internal (172.17.0.1:22) open
node-red:~$ nc -vz host.docker.internal 22
host.docker.internal (172.17.0.1:22) open
node-red:~$ nc -vz host.docker.internal 22
host.docker.internal (172.17.0.1:22) open
node-red:~$ nc -vz host.docker.internal 22
host.docker.internal (172.17.0.1:22) open
node-red:~$ nc -vz host.docker.internal 22
host.docker.internal (172.17.0.1:22) open
node-red:~$ nc -vz host.docker.internal 22
host.docker.internal (172.17.0.1:22) open
node-red:~$ nc -vz host.docker.internal 22
host.docker.internal (172.17.0.1:22) open
node-red:~$ nc -vz host.docker.internal 22
host.docker.internal (172.17.0.1:22) open
node-red:~$ nc -vz host.docker.internal 22
host.docker.internal (172.17.0.1:22) open
node-red:~$ nc -vz host.docker.internal 22
host.docker.internal (172.17.0.1:22) open
node-red:~$ nc -vz host.docker.internal 22
host.docker.internal (172.17.0.1:22) open
node-red:~$ nc -vz host.docker.internal 22
host.docker.internal (172.17.0.1:22) open

I also see various failed connections from different integrations in the docker logs for Home Assistant:

2026-02-18 11:21:31.550 ERROR (MainThread) [pyoverkiz.client] Giving up fetch_events(...) after 5 tries (aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host 192.168.1.117:8443 ssl:False [Network unreachable])
2026-02-18 11:21:31.550 ERROR (MainThread) [homeassistant.components.overkiz] Error fetching device events data: Failed to connect.
2026-02-18 11:23:47.759 WARNING (MainThread) [custom_components.device_pulse.coordinator] [Devices XXXXXX] Device [Pixel 8 Pro XXXXXX][192.168.1.133] ping failed but under failure threshold (1/10 failed pings)
2026-02-18 11:24:07.511 WARNING (MainThread) [custom_components.device_pulse.coordinator] [Devices XXXXXX] Device [Pixel 8 Pro XXXXXX][192.168.1.133] ping failed but under failure threshold (1/10 failed pings)
2026-02-18 11:24:39.635 ERROR (MainThread) [homeassistant.components.fritz.coordinator] Error requesting fritz-192.168.1.1-coordinator data: HTTPConnectionPool(host='192.168.1.1', port=49000): Max retries exceeded with url: /upnp/control/hosts (Caused by NewConnectionError("HTTPConnection(host='192.168.1.1', port=49000): Failed to establish a new connection: [Errno 101] Network unreachable"))
2026-02-18 11:26:24.980 ERROR (MainThread) [homeassistant.components.playstation_network.coordinator] Timeout fetching playstation_network data
2026-02-18 11:37:21.246 ERROR (MainThread) [custom_components.daikin_onecta.daikin_api] REQUEST TYPE GET FAILED: Cannot connect to host api.onecta.daikineurope.com:443 ssl:default [Network unreachable]

Here’s the relevant sections of my docker compose file:

name: "container_mgmt"
      
networks:

  smarthome:
    name: "smarthome"
    driver: "bridge"
    labels:
      com.docker.compose.network: "smarthome"
    ipam:
      config:
        - subnet: "172.19.0.0/16"
          gateway: "172.19.0.1"
    
services:

  homeassistant:
    container_name: "homeassistant"
    image: "homeassistant/home-assistant:2026.2.2"
    restart: "unless-stopped"
    hostname: "home-assistant"
    networks:
      smarthome:
        ipv4_address: "172.19.0.7"
    extra_hosts:
      - "host.docker.internal:host-gateway"
    dns:
      - "192.168.1.1"
    ports:
      - "8123:8123/tcp"
    environment:
      - "TZ=Europe/Berlin"
    volumes:
      - "/container/homeassistant/config:/config"
      - "/container/homeassistant/snapshots:/snapshots:rw"
      - "/etc/localtime:/etc/localtime:ro"
    privileged: false
    depends_on:
      - "influxdb"
      - "mosquitto"
    logging:
      options:
        max-size: "5m"
        max-file: "2"

  nodered:
    container_name: "nodered"
    image: "nodered/node-red:4.1.5-22-minimal"
    restart: "unless-stopped"
    hostname: "node-red"
    networks:
      smarthome:
        ipv4_address: "172.19.0.8"
    extra_hosts:
      - "host.docker.internal:host-gateway"
    dns:
      - "192.168.1.1"
    ports:
      - "1880:1880/tcp"
      - "3456:3456/tcp"
    environment:
      - "TZ=Europe/Berlin"
    volumes:
      - "/container/nodered/data:/data"
      - "/container/homeassistant/snapshots:/snapshots:ro"
      - "/container/hostpipe:/hostpipe"
    depends_on:
      - "homeassistant"
      - "mosquitto"
      - "wakeonlan"
    logging:
      options:
        max-size: "5m"
        max-file: "2"

This is my setup:

  • Host OS: Ubuntu 24.04.4 LTS
  • Docker Version 28.2.2
  • Tested Home Assistant Images from 2025.2.2 to 2026.2.2

As I already wrote, I can reproduce this on two differnt host maches. Unfortunately they both have the same OS / Docker installed.

Any help appreciated.

Update: the issue still remains, when changing the Home Assistant Docker containers network mode to “host”.

  homeassistant:
    container_name: "homeassistant"
    image: "homeassistant/home-assistant:2026.2.2"
    restart: "unless-stopped"
    hostname: "home-assistant"
    network_mode: "host"
    extra_hosts:
      - "host.docker.internal:host-gateway"
    dns:
      - "192.168.1.1"
    environment:
      - "TZ=Europe/Berlin"
    volumes:
      - "/container/homeassistant/config:/config"
      - "/container/homeassistant/snapshots:/snapshots:rw"
      - "/etc/localtime:/etc/localtime:ro"
    privileged: false
    depends_on:
      - "influxdb"
      - "mosquitto"
    logging:
      options:
        max-size: "5m"
        max-file: "2"

It looks like I found the solution myself:
I disabled Offloading and Flow Control on the network adapter of the host machine:

ethtool -K enp1s0 tso off gso off gro off lro off rx off tx off
ethtool -A enp1s0 rx off tx off

No more “Network unreachable”.

I’ve had the same problem yesterday. Disabling offloading and flow control did not fix it however. I ended up rolling back the latest kernel update and now my home assistant runs stable again.

I’m back running Ubuntu 24.04.4 LTS (GNU/Linux 6.8.0-88-generic x86_64) again. Look like 6.8.0-100 has some issues on my mini pc.

1 Like

Well, I guess you’re right. Changing the interface’s parameters only fixed it temporarily for me. Maybe we should file a bug report. But I don’t know where.

I rolled back to 6.8.0-90-generic and that fixed the issue as well.

I had exactly the same issue. Also disabled hw offloading but it did not work. Now that you are mentioning mini pc, I am running this on an age old Zotac mini pc (CI323) with ancient Realtek NICs.

Als curious to understand why this is only a problem in HA. All other containers are running fine.

In have a MeLE Quieter HD3 Mini PC. You’re right, it’s really interesting that only the Home Assistant Container has the issue. But I would see it more as an Ubuntu or Kernel issue since up to the last Kernel patch everything was fine.

This might be the same issue:

That makes a lot of sense, I also tried a USB network adapter and experienced the same issues. Hopefully the 103 kernel will fix it.

Edit\ Updated to 6.8.0-103-generic and this fixed the issue, not GA yet though

Well, that’s good news. Seems like enough people were complaining :smile:
I will try the update next week because I’m on vacation.

Jsut wanna mention I have the same issues - only from the HA container.

Also on 6.8.0-100-generic #100-Ubuntu SMP PREEMPT_DYNAMIC

wasted several days trying to find a solution… that drove me crazy. Glad I’ve found this post. rolled back to 6.8.0-88-generic

After updating there 2 custom integrations yesterday:

root@sparrow:/opt/homeassistant/custom_components# ls -lt | more

total 144

drwxr-xr-x 4 root root 4096 Mar 7 08:50 cardata
drwxr-xr-x 6 root root 4096 Mar 7 08:49 entity_manager

I have not seen a single DNS error in 36 Hours…

I seems to have the same issue on Ubuntu 24.04 but using home assistant within docker container.
Home assistant is giving a lot of Network unreachable errors with all kind of integrations.
Can I update something on the host which is also a fix for dockerized containers?

I seem to also be having the same issue. I’m using Ubuntu 24.04 with home assistant in a docker container using macvlan as I want HA to sit on a different network to the server.

I thought it was an IPv6 issue as was seeing some errors when testing DNS so disabled this in the container and resolves fine but still intermittent network error with sensors going unavailable. It seems to happen with integrations both contacting the internet and internal IPs but it’s intermittent.

I’m using a Beelink EQ14. I was planning on moving my whole automation setup to this however this issue is holding that back at present.

Just an update.

Downgrading the kernel to 6.8.0-88-generic seems to have done the trick.

I’m now on 6.8.0-106 and everything seems fine for about a day.