today, after a forced reboot of Home assistant due to a black out, I could not connect anymore to home assistant. After rebooting a couple of more times, I checked http://homeassistant.local:4357, and it appears as if home assistant is stuck in the following loop:
2024-05-02 16:03:58.642 INFO (MainThread) [supervisor.docker.interface] Downloading docker image ghcr.io/home-assistant/aarch64-hassio-audio with tag 2023.12.0.
2024-05-02 16:03:59.267 ERROR (MainThread) [supervisor.docker.interface] Can't install ghcr.io/home-assistant/aarch64-hassio-audio:2023.12.0: 500 Server Error for http+docker://localhost/v1.42/images/ghcr.io/home-assistant/aarch64-hassio-audio:2023.12.0/json: Internal Server Error ("layer does not exist")
2024-05-02 16:03:59.268 WARNING (MainThread) [supervisor.plugins.base] Error on installing audio plugin, retrying in 30sec
does anyone recognize this error? What do I do now?
Thanks for your reply! After executing login, the command executes. After confirming that I really want to delete unused docker containers, it deleted some docker containers. However the error persists…
In the meantime I google around a bit, I came over this question. However I am unsure if I should go down that road, as I am not a very experienced Linux user. I fear that I might break something which should not be broken.
Unfortunately, Docker has some cases where it just can’t recover. It seems you hit such a case .
In general, probably taking a full backup and download it, then start from scratch is the easiest way here. In any case, make sure you have a backup before trying anything more exotic
Allright thanks for the advice, I think it is a good idea to first do a back-up.
But, how do you perform an back-up over CLI? Is there a simple command for this? And how do I get this back-up out of the system? Via a USB-stick? Is there a guide for this procedure?
@agners or should I ask this question in a separate topic?
Hm, right, the Supervisor can’t startup at this point, so it doesn’t allow backup
I don’t think there is a way to circumvent that.
Since you are running on a Raspberry Pi 4, probably the easiest here is to connect the SD card to a PC and copy the files from a Ubuntu live system. The data is stored in the last partition of the SD card (labeled hassos-data) in a directory named “supervisor”.
Afterwards, I’d try to just blow away the docker directory on the hassos-data partition completely. Home Assistant OS will download all necessary components again. And since all relevant user data is stored in the supervisor directory. I tested this on a Raspberry Pi 5 installation: I plugged the SD card to my Linux PC, and deleted the Docker data store rm -rf /path/to/hassos-data/docker. Then I plugged it back into the Raspberry Pi 5. The initial boot took quite a while, and the shell dropped me into an emergency shell (“Home Assistan CLI not starting!” …). But this is just because the start takes much longer than usual. In the end, I was able to connect to homeassistant via default port 8123 again.
I just tested this, and it worked flawlessly as you suggested. For future reference, I performed the following steps:
I created a backup by taking out the SD card from my Raspberry Pi and saving the supervisor folder in the hassos-data partition (A Linux PC is needed for this step)
I then simply erased the complete docker folder in the hasos-data partition (this are a couple of Gb)
Then I reinserted the SD-Card in the Raspberry Pi and started. The system booted up normally. I did not need the
Thanks again @agners for this solution! This is of course much simpler then messing around with the docker layers or scripts :D.