Update to Supervisor 2022.05.0 failing?

I’m unable to install Supervisor 2022.05.0:

Logs

22-05-03 17:05:16 ERROR (SyncWorker_2) [supervisor.docker.interface] Can't install ghcr.io/home-assistant/amd64-hassio-supervisor:2022.05.0: 500 Server Error for http+docker://localhost/v1.41/images/create?tag=2022.05.0&fromImage=ghcr.io%2Fhome-assistant%2Famd64-hassio-supervisor&platform=linux%2Famd64: Internal Server Error ("Get "https://ghcr.io/v2/": net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)")
22-05-03 17:05:16 ERROR (MainThread) [supervisor.supervisor] Update of Supervisor failed: Can't install ghcr.io/home-assistant/amd64-hassio-supervisor:2022.05.0: 500 Server Error for http+docker://localhost/v1.41/images/create?tag=2022.05.0&fromImage=ghcr.io%2Fhome-assistant%2Famd64-hassio-supervisor&platform=linux%2Famd64: Internal Server Error ("Get "https://ghcr.io/v2/": net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)")

Not sure if it’s relevant, but:
image

Getting the same thing.

Sometimes I get a 404 from ghcr:

image

Getting the same Client.Timeout exceeded error

Im having the same thing happen

Same here, but worked after i rebooted HA.

I also had this problem. There are multiple possible causes, but if - like me - you have a Home Assistant Supervised installation, then it might be that the automatic update of supervisor failed and your system is dead. This happens from time to time and is rather frustrating. Supervised builds are only partially supported, even if you meet the ARD0014 requirements for a supervised installation.

In my case, I noticed that I was unable to access the add-ons on my system. Looking at the logs, I could see that an update to Supervisor was attempted 6 hours earlier. I was also getting the unauthorised messages. So I rebooted my system and then nothing worked - HA wouldn’t even start.

It’s not the first time for me; in these cases, the upgrade to the supervisor container fails meaning that the container is deleted and not recreated. Without the supervisor available, the rest of HA cannot start.

The only sure-fire way to get your system back is to rebuild it, but it’s actually quite easy. Here are the steps that work for me. Note that my host is Debian Bullseye running on an Intel-NUC. All of the below happens on the host.

Make sure everything is stopped:

% sudo systemctl stop hassio-supervisor.service
% sudo systemctl stop hassio-apparmor.service
% docker rm hassio_supervisor

Get the latest supervised-installer and install it:

% wget https://github.com/home-assistant/supervised-installer/releases/latest/download/homeassistant-supervised.deb
% sudo dpkg -i homeassistant-supervised.deb

Now check that the bootstrap config is OK. If not, correct it:

% cat /etc/hassio.json
{
    "supervisor": "homeassistant/amd64-hassio-supervisor",
    "machine": "generic-x86-64",
    "data": "/path/to/your/supervised/installation/root"
}

In my case, I had to correct the machine and data entries. If you had to correct anything, you need to delete the supervisor container and start it again to get the bootstrap config to take:

% sudo systemctl stop hassio-supervisor.service
% docker rm hassio_supervisor
% sudo systemctl start hassio-supervisor.service

Should be fine now! You can also check that the bootstrap config has taken correctly like this:

% docker inspect hassio_supervisor | grep Env -A10 
            "Env": [
                "SUPERVISOR_SHARE=/path/to/your/supervised/installation/root",
                "SUPERVISOR_NAME=hassio_supervisor",
                "SUPERVISOR_MACHINE=generic-x86-64",
                "PATH=/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
                "LANG=C.UTF-8",
                "S6_BEHAVIOUR_IF_STAGE2_FAILS=2",
                "S6_CMD_WAIT_FOR_SERVICES=1",
                "S6_SERVICES_GRACETIME=10000",
                "SUPERVISOR_API=http://localhost"
            ],

As a postscript, you may also need to check a few services that need to be running on your host. For example, in the latest update, supervised installations have moved away from avahi-daemon to systemd-resolved:

% sudo systemctl stop avahi-daemon
% sudo systemctl enable systemd-resolved
% sudo systemctl start systemd-resolved
% sudo systemctl disable avahi-daemon
% sudo reboot now

The only reliable way to keep track of these is to look at the GitHub release notes for the supervised installer. There was some discussion in this forum post.

Hope that helps! I’ve become quite proficient at rebuilding my installation when a supervisor update fails. It would be good if there were some better comms around automatic updates to supervisor as it impacts supervised installations.

6 Likes

A while ago, every single time I restarted my supervised system it failed to come back. I have no idea why. All my other docker stuff would come back but not supervisor/ha.
My simple solution was to re-run the installation script. Less than a minute and I have a HA script to restart addons as well.

But a couple of months ago it started behaving properly again. So weird.

Thanks for this guide. Succeded updating the supervisor after struggling a lot

1 Like

FWIW - my system died again upon the automatic update to supervisor-2022.05.3. I wish I could figure out what caused it to die - I had to run through the complete resurrection, including correcting /etc/hassio.json. There’s nothing I can see that is out of date, incompatible or just generally wrong this time.

I need help with my HassOS. I’m running supervisor 2022.04.0 and I’m trying to update to latest version (2022.05.3), but I’m having the problem


22-07-02 19:00:14 ERROR (SyncWorker_4) [supervisor.docker.interface] Can't install ghcr.io/home-assistant/amd64-hassio-supervisor:2022.05.3: 500 Server Error for http+docker://localhost/v1.41/images/create?tag=2022.05.3&fromImage=ghcr.io%2Fhome-assistant%2Famd64-hassio-supervisor&platform=linux%2Famd64: Internal Server Error ("Get "https://ghcr.io/v2/": net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)")
22-07-02 19:00:14 ERROR (MainThread) [supervisor.supervisor] Update of Supervisor failed: Can't install ghcr.io/home-assistant/amd64-hassio-supervisor:2022.05.3: 500 Server Error for http+docker://localhost/v1.41/images/create?tag=2022.05.3&fromImage=ghcr.io%2Fhome-assistant%2Famd64-hassio-supervisor&platform=linux%2Famd64: Internal Server Error ("Get "https://ghcr.io/v2/": net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)")