home-assistant / supervisor

:house_with_garden: Home Assistant Supervisor
https://home-assistant.io/hassio/
Apache License 2.0
1.74k stars 637 forks source link

Update installation fails #5005

Closed Juttaperka closed 5 months ago

Juttaperka commented 6 months ago

Describe the issue you are experiencing

I have a message in System Information that says: Your installation is unhealthy Running an unhealthy installation will cause issues. Below is a list of issues found with your installation, click on the links to learn how you can resolve the issues. supervisor

When I'm trying to update supervisor the installaton time out after a couple of minutes.

What type of installation are you running?

Home Assistant OS

Which operating system are you running on?

Home Assistant Operating System

Steps to reproduce the issue

  1. Tried to install update from Settings - Update menu
  2. Tried to install update from CLI with the command: ha supervisor update
  3. Tried to update with Home assistant in Safe Mode

Anything in the Supervisor logs that might be useful for us?

Logger: homeassistant.components.websocket_api.http.connection
Source: components/websocket_api/commands.py:240
Integration: Home Assistant WebSocket API (documentation, issues)
First occurred: 21:33:59 (1 occurrences)
Last logged: 21:33:59

[547447427776] Error updating Home Assistant Supervisor: Update of Supervisor failed: Can't install ghcr.io/home-assistant/aarch64-hassio-supervisor:2024.04.0: 500 Server Error for http+docker://localhost/v1.43/images/create?tag=2024.04.0&fromImage=ghcr.io%2Fhome-assistant%2Faarch64-hassio-supervisor&platform=linux%2Farm64: Internal Server Error ("Get "https://ghcr.io/v2/": net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)")
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/hassio/update.py", line 258, in async_install
    await async_update_supervisor(self.hass)
  File "/usr/src/homeassistant/homeassistant/components/hassio/handler.py", line 55, in _wrapper
    raise HassioAPIError(data["message"])
homeassistant.components.hassio.handler.HassioAPIError: Update of Supervisor failed: Can't install ghcr.io/home-assistant/aarch64-hassio-supervisor:2024.04.0: 500 Server Error for http+docker://localhost/v1.43/images/create?tag=2024.04.0&fromImage=ghcr.io%2Fhome-assistant%2Faarch64-hassio-supervisor&platform=linux%2Farm64: Internal Server Error ("Get "https://ghcr.io/v2/": net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)")

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 240, in handle_call_service
    response = await hass.services.async_call(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2279, in async_call
    response_data = await coro
                    ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2316, in _execute_service
    return await target(service_call)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 892, in entity_service_call
    single_response = await _handle_entity_call(
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 962, in _handle_entity_call
    result = await task
             ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/update/__init__.py", line 161, in async_install
    await entity.async_install_with_progress(version, backup)
  File "/usr/src/homeassistant/homeassistant/components/update/__init__.py", line 465, in async_install_with_progress
    await self.async_install(version, backup)
  File "/usr/src/homeassistant/homeassistant/components/hassio/update.py", line 260, in async_install
    raise HomeAssistantError(
homeassistant.exceptions.HomeAssistantError: Error updating Home Assistant Supervisor: Update of Supervisor failed: Can't install ghcr.io/home-assistant/aarch64-hassio-supervisor:2024.04.0: 500 Server Error for http+docker://localhost/v1.43/images/create?tag=2024.04.0&fromImage=ghcr.io%2Fhome-assistant%2Faarch64-hassio-supervisor&platform=linux%2Farm64: Internal Server Error ("Get "https://ghcr.io/v2/": net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)")

System Health information

Installed version 2024.03.1 Latest version 2024.04.0

Supervisor diagnostics

No response

Additional information

System Information

version core-2024.2.4
installation_type Home Assistant OS
dev false
hassio true
docker true
user root
virtualenv false
python_version 3.12.1
os_name Linux
os_version 6.1.73-haos-raspi
arch aarch64
timezone Europe/Stockholm
config_dir /config
Home Assistant Community Store GitHub API | ok -- | -- GitHub Content | ok GitHub Web | ok GitHub API Calls Remaining | 4953 Installed Version | 1.34.0 Stage | running Available Repositories | 1400 Downloaded Repositories | 7
Home Assistant Cloud logged_in | false -- | -- can_reach_cert_server | ok can_reach_cloud_auth | ok can_reach_cloud | ok
Home Assistant Supervisor host_os | Home Assistant OS 12.1 -- | -- update_channel | beta supervisor_version | supervisor-2024.03.1 agent_version | 1.6.0 docker_version | 24.0.7 disk_total | 56.6 GB disk_used | 7.8 GB healthy | failed to load: Unhealthy supported | true board | rpi5-64 supervisor_api | ok version_api | ok installed_addons | Duck DNS (1.16.0), Samba share (12.3.1), Home Assistant Google Drive Backup (0.112.1), File editor (5.8.0), Terminal & SSH (9.10.0), Mosquitto broker (6.4.0), WireGuard (0.10.2), AdGuard Home (5.0.5), Tailscale (0.16.1), ESPHome (2024.3.0)
Dashboards dashboards | 2 -- | -- resources | 2 views | 13 mode | yaml
Recorder oldest_recorder_run | 2 April 2024 at 14:11 -- | -- current_recorder_run | 9 April 2024 at 21:23 estimated_db_size | 55.64 MiB database_engine | sqlite database_version | 3.44.2
koopernick commented 6 months ago

I have the exact same issue, same error message. I'm using the proxmox VM image.

Error: Update of Supervisor failed: Can't install ghcr.io/home-assistant/amd64-hassio-supervisor:2024.04.0: 500 Server Error for http+docker://localhost/v1.43/images/create?tag=2024.04.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)")

agners commented 6 months ago

The error typically indicates some connectivity or DNS issue.

Can you share the full Supervisor logs? (Settings > System > Logs, then choose Supervisor on the top right).

grey-area001 commented 6 months ago

This is also happening for me. Update attempts cause the Supervisor to exit and it has to be restarted.

Each time it does so the logs are removed so there's nothing to provide here.

grey-area001 commented 6 months ago

https://ghcr.io/v2/homeassistant/amd64-hassio-supervisor/manifests/latest is returning:

{ "errors": [ { "code": "UNAUTHORIZED", "message": "authentication required" } ] }

agners commented 6 months ago

You can get logs from previous runs using ha host, e.g.

ha host logs --identifier hassio_supervisor --lines 500
grey-area001 commented 6 months ago

That command doesn't work on my machine. I'll look into that but the above is from calling the url directly in a browser.

It's not a DNS error as the DNS resolves correctly. Hence the "authentication required" message.

That URL is not currently available to any machine I currently try to access it from. I've tried it on several devices on both my own network and over my mobile data. Same results.

I've just tried it off my mobile broadband and I'm getting the same result.

koopernick commented 6 months ago

You can get logs from previous runs using ha host, e.g.

ha host logs --identifier hassio_supervisor --lines 500
2024-04-10 18:08:43.986 INFO (MainThread) [supervisor.api.middleware.security] /host/logs/identifiers/hassio_supervisor access from a0d7b954_ssh
2024-04-10 18:09:34.823 INFO (MainThread) [supervisor.resolution.check] Starting system checks with state running
2024-04-10 18:09:34.823 INFO (MainThread) [supervisor.resolution.checks.base] Run check for multiple_data_disks/system
2024-04-10 18:09:34.823 INFO (MainThread) [supervisor.resolution.checks.base] Run check for ipv4_connection_problem/system
2024-04-10 18:09:34.823 INFO (MainThread) [supervisor.resolution.checks.base] Run check for trust/supervisor
2024-04-10 18:09:34.823 ERROR (MainThread) [supervisor.resolution.check] Error during processing trust: Another job is running for job group container_hassio_supervisor
2024-04-10 18:10:51.989 INFO (MainThread) [supervisor.resolution.checks.base] Run check for dns_server_ipv6_error/dns_server
2024-04-10 18:10:51.989 INFO (MainThread) [supervisor.resolution.checks.base] Run check for docker_config/system
2024-04-10 18:10:51.990 INFO (MainThread) [supervisor.resolution.checks.base] Run check for security/core
2024-04-10 18:12:01.654 ERROR (MainThread) [supervisor.docker.interface] Can't install ghcr.io/home-assistant/amd64-hassio-supervisor:2024.04.0: 500 Server Error for http+docker://localhost/v1.43/images/create?tag=2024.04.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)")
2024-04-10 18:12:01.654 ERROR (MainThread) [supervisor.supervisor] Update of Supervisor failed: Can't install ghcr.io/home-assistant/amd64-hassio-supervisor:2024.04.0: 500 Server Error for http+docker://localhost/v1.43/images/create?tag=2024.04.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)")
2024-04-10 18:12:07.083 INFO (MainThread) [supervisor.resolution.checks.base] Run check for dns_server_failed/dns_server
2024-04-10 18:12:07.083 INFO (MainThread) [supervisor.resolution.checks.base] Run check for pwned/addon
2024-04-10 18:12:07.083 INFO (MainThread) [supervisor.resolution.checks.base] Run check for free_space/system
2024-04-10 18:12:07.083 INFO (MainThread) [supervisor.resolution.check] System checks complete
2024-04-10 18:12:07.083 INFO (MainThread) [supervisor.resolution.evaluate] Starting system evaluation with state running
2024-04-10 18:12:07.105 INFO (MainThread) [supervisor.resolution.evaluate] System evaluation complete
2024-04-10 18:12:07.105 INFO (MainThread) [supervisor.jobs] 'ResolutionFixup.run_autofix' blocked from execution, system is not healthy - supervisor
2024-04-10 18:14:12.329 INFO (MainThread) [supervisor.api.middleware.security] /host/logs/identifiers/hassio_supervisor access from a0d7b954_ssh
Juttaperka commented 6 months ago

The DNS was the problem for me. I have changed Internet provider recently and forgot that I had a static IP address configured in HA. After changing the DNS to the new one I could update the supervisor. Thanks agners! BR Thomas

grey-area001 commented 6 months ago

Updating the DNS hasn't helped for me I've tried 8.8.8.8 1.1.1.1 and my local pihole DNS and I'm still getting the same issue.

koopernick commented 5 months ago

I've fixed it by updating the DNS entry as well, in the network tab from HA.

agners commented 5 months ago

Updating the DNS hasn't helped for me I've tried 8.8.8.8 1.1.1.1 and my local pihole DNS and I'm still getting the same issue.

Maybe the router's IP works? It is most likely DNS related though, maybe another reboot helps. If the issue persists for you, please open a new issue with all system information.

I am closing this issue as the problem is resolved for the original poster.