Upgrade from 2024.4.1 to 2024.6.0 failing (docker container)

Hi All,

I’m really hoping someone can help me here…

Every 2-3 months I upgrade to the new version of HA. This has been my standard practice for the last few years and I have never once had any issues.

Excited by the new LLM possibilities introduced in 2024.6.0 I embarked on my standard routine:

  1. Take a backup and save copy off-site
docker pull ghcr.io/home-assistant/home-assistant:stable

sudo docker stop homeassistant

sudo docker rm homeassistant

sudo docker run -d \
  --name homeassistant \
  --privileged \
  --restart=unless-stopped \
  -e TZ=Europe/London \
  -v /etc/homeassistant:/config \
  -v /run/dbus:/run/dbus:ro \
  --network=host \
  ghcr.io/home-assistant/home-assistant:stable

Unfortunately on this occasion the docker container seems to go into a restart loop every 3-4 seconds and I do not get any kind of Web GUI @ localhost:8123. I have been unable to launch in safe-mode as the container is only up for 3-4 seconds before it restarts. HA logs show nothing and the syslog for the host machine (Raspberry Pi 4) show the following repeated in a loop:

Jun  8 10:50:12 raspberrypi4 systemd[1]: docker-8355fa6d0ae193f679dce79041c43188206191e94e94490930a20f001a7b2a64.scope: Succeeded.
Jun  8 10:50:12 raspberrypi4 systemd[1]: docker-8355fa6d0ae193f679dce79041c43188206191e94e94490930a20f001a7b2a64.scope: Consumed 4.935s CPU time.
Jun  8 10:50:12 raspberrypi4 dockerd[755]: time="2024-06-08T10:50:12.776794436+01:00" level=info msg="ignoring event" container=8355fa6d0ae193f679dce79041c43188206191e94e94490930a20f001a7b2a64 module=libcontainerd namespace=moby topic=/tasks/delete type="*events.TaskDelete"
Jun  8 10:50:12 raspberrypi4 containerd[571]: time="2024-06-08T10:50:12.777332453+01:00" level=info msg="shim disconnected" id=8355fa6d0ae193f679dce79041c43188206191e94e94490930a20f001a7b2a64
Jun  8 10:50:12 raspberrypi4 containerd[571]: time="2024-06-08T10:50:12.777509731+01:00" level=warning msg="cleaning up after shim disconnected" id=8355fa6d0ae193f679dce79041c43188206191e94e94490930a20f001a7b2a64 namespace=moby
Jun  8 10:50:12 raspberrypi4 containerd[571]: time="2024-06-08T10:50:12.777560008+01:00" level=info msg="cleaning up dead shim"
Jun  8 10:50:12 raspberrypi4 containerd[571]: time="2024-06-08T10:50:12.801741579+01:00" level=warning msg="cleanup warnings time=\"2024-06-08T10:50:12+01:00\" level=info msg=\"starting signal loop\" namespace=moby pid=26135 runtime=io.containerd.runc.v2\n"
Jun  8 10:50:12 raspberrypi4 systemd[751]: var-lib-docker-overlay2-edef826a0c2799465200a9a0901292b5069930b11951ef5253ae77f5821b2266-merged.mount: Succeeded.
Jun  8 10:50:12 raspberrypi4 systemd[1]: var-lib-docker-overlay2-edef826a0c2799465200a9a0901292b5069930b11951ef5253ae77f5821b2266-merged.mount: Succeeded.
Jun  8 10:50:13 raspberrypi4 containerd[571]: time="2024-06-08T10:50:13.238414854+01:00" level=info msg="loading plugin \"io.containerd.event.v1.publisher\"..." runtime=io.containerd.runc.v2 type=io.containerd.event.v1
Jun  8 10:50:13 raspberrypi4 containerd[571]: time="2024-06-08T10:50:13.238931186+01:00" level=info msg="loading plugin \"io.containerd.internal.v1.shutdown\"..." runtime=io.containerd.runc.v2 type=io.containerd.internal.v1
Jun  8 10:50:13 raspberrypi4 containerd[571]: time="2024-06-08T10:50:13.239250834+01:00" level=info msg="loading plugin \"io.containerd.ttrpc.v1.task\"..." runtime=io.containerd.runc.v2 type=io.containerd.ttrpc.v1
Jun  8 10:50:13 raspberrypi4 containerd[571]: time="2024-06-08T10:50:13.240064461+01:00" level=info msg="starting signal loop" namespace=moby path=/run/containerd/io.containerd.runtime.v2.task/moby/8355fa6d0ae193f679dce79041c43188206191e94e94490930a20f001a7b2a64 pid=26154 runtime=io.containerd.runc.v2
Jun  8 10:50:13 raspberrypi4 systemd[751]: run-docker-runtime\x2drunc-moby-8355fa6d0ae193f679dce79041c43188206191e94e94490930a20f001a7b2a64-runc.m9t6X2.mount: Succeeded.
Jun  8 10:50:13 raspberrypi4 systemd[1]: run-docker-runtime\x2drunc-moby-8355fa6d0ae193f679dce79041c43188206191e94e94490930a20f001a7b2a64-runc.m9t6X2.mount: Succeeded.
Jun  8 10:50:13 raspberrypi4 systemd[1]: Started libcontainer container 8355fa6d0ae193f679dce79041c43188206191e94e94490930a20f001a7b2a64.
Jun  8 10:50:13 raspberrypi4 containerd[571]: time="2024-06-08T10:50:13.416481145+01:00" level=warning msg="error from *cgroupsv2.Manager.EventChan" error="failed to add inotify watch for \"/sys/fs/cgroup/system.slice/docker-8355fa6d0ae193f679dce79041c43188206191e94e94490930a20f001a7b2a64.scope/memory.events\": no such file or directory"

I’ve managed to rollback to 2024.4.1 successfully and everything still works but I’d really like not to be stuck on this version forever.

I’ve tried the advice from 2024.5+: Tracking down instability issues caused by integrations - Community Guides - Home Assistant Community (home-assistant.io) but as the container won’t run for more than a couple of seconds before restarting it has been tricky.

Any ideas much appreciated HA community!

EDIT: After numerous different attempts to fix, I gave up and created a fresh installation with the latest image and planned to restore from my backup. When this still didn’t work and crashed during onboarding I assumed either something was horribly wrong with my setup (Raspberry Pi 4 / Docker) or there was an issue with the image. I decided to do a fresh pull of the latest home assistant image which this time was 2024.6.2 and this worked perfectly. Didn’t have to restore my backup and just spun up latest image in original config directory.

Alan

  1. Use --restart=no until your issue is solved
  2. Do a docker logs homeassistant to get an idea on what is happening on the HA side
1 Like

Hi @koying - thanks for the suggestion, I will try this as soon as I get a chance and let you know how I get on!

After numerous different attempts to fix, I gave up and created a fresh installation with the latest image and planned to restore from my backup. When this still didn’t work and crashed during onboarding I assumed either something was horribly wrong with my setup (Raspberry Pi 4 / Docker) or there was an issue with the image. I decided to do a fresh pull of the latest home assistant image which this time was 2024.6.2 and this worked perfectly. Didn’t have to restore my backup and just spun up latest image in original config directory.