home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
74.04k stars 31.07k forks source link

Can't update Supervisor #102017

Closed nabilakhlaque closed 4 months ago

nabilakhlaque commented 1 year ago

The problem

I installed a fresh Home Assistant OS install on a Raspberry Pi 3. As soon as i hit update, I get this following error.

What version of Home Assistant Core has the issue?

core-2023.10.1

What was the last working version of Home Assistant Core?

core-2023.10.1

What type of installation are you running?

Home Assistant OS

Integration causing the issue

No response

Link to integration documentation on our website

No response

Diagnostics information

Logger: homeassistant.components.websocket_api.http.connection Source: components/websocket_api/commands.py:226 Integration: Home Assistant WebSocket API (documentation, issues) First occurred: 22:46:13 (6 occurrences) Last logged: 22:52:27

[547199190208] Error updating Home Assistant Supervisor: Update of Supervisor failed: Can't install ghcr.io/home-assistant/aarch64-hassio-supervisor:2023.10.0: 500 Server Error for http+docker://localhost/v1.42/images/ghcr.io/home-assistant/aarch64-hassio-supervisor:2023.10.0/json: Internal Server Error ("readlink /mnt/data/docker/overlay2/l: invalid argument")
[547226331712] Error updating Home Assistant Supervisor: Update of Supervisor failed: Can't install ghcr.io/home-assistant/aarch64-hassio-supervisor:2023.10.0: 500 Server Error for http+docker://localhost/v1.42/images/ghcr.io/home-assistant/aarch64-hassio-supervisor:2023.10.0/json: Internal Server Error ("readlink /mnt/data/docker/overlay2/l: invalid argument")

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 53, 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:2023.10.0: 500 Server Error for http+docker://localhost/v1.42/images/ghcr.io/home-assistant/aarch64-hassio-supervisor:2023.10.0/json: Internal Server Error ("readlink /mnt/data/docker/overlay2/l: invalid argument")

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 226, in handle_call_service await hass.services.async_call( File "/usr/src/homeassistant/homeassistant/core.py", line 2012, in async_call response_data = await coro ^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/core.py", line 2049, in _execute_service return await target(service_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 235, in handle_service return await service.entity_service_call( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 876, in entity_service_call response_data = await _handle_entity_call( ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 948, in _handle_entity_call result = await task ^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/update/init.py", line 157, in async_install await entity.async_install_with_progress(version, backup) File "/usr/src/homeassistant/homeassistant/components/update/init.py", line 432, 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:2023.10.0: 500 Server Error for http+docker://localhost/v1.42/images/ghcr.io/home-assistant/aarch64-hassio-supervisor:2023.10.0/json: Internal Server Error ("readlink /mnt/data/docker/overlay2/l: invalid argument")

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

Version | core-2023.10.1 -- | -- Installationstyp | Home Assistant OS Utveckling | false Supervisor | true Docker | true Användare | root Virtuell miljö | false Python-version | 3.11.5 Operativsystemfamilj | Linux Operativsystemversion | 6.1.21-v8 CPU-arkitektur | aarch64 Tidszon | Europe/Stockholm Konfigurationskatalog | /config
home-assistant[bot] commented 1 year ago

Hey there @home-assistant/core, mind taking a look at this issue as it has been labeled with an integration (websocket_api) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `websocket_api` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign websocket_api` Removes the current integration label and assignees on the issue, add the integration domain after the command.

(message by CodeOwnersMention)


websocket_api documentation websocket_api source (message by IssueLinks)

DeepCoreSystem commented 1 year ago

Hey there!

Seems I got a similar problem with the Home Assistant WebSocket API ... I get the following error when trying to update a custom component through HACS

Logger: homeassistant.components.websocket_api.http.connection
Source: custom_components/hacs/repositories/base.py:995
Integration: Home Assistant WebSocket API (documentation, issues)
First occurred: 11:35:47 (1 occurrences)
Last logged: 11:35:47

[139807198582592] Error handling message: Unknown error (unknown_error) Philippe from 10.13.4.235 (Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Firefox/102.0)
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/decorators.py", line 26, in _handle_async_response
    await func(hass, connection, msg)
  File "/config/custom_components/hacs/websocket/repository.py", line 234, in hacs_repository_download
    await repository.async_install()
  File "/config/custom_components/hacs/repositories/base.py", line 899, in async_install
    await self.async_install_repository()
  File "/config/custom_components/hacs/repositories/base.py", line 995, in async_install_repository
    raise HacsException("Could not download, see log for details")
custom_components.hacs.exceptions.HacsException: Could not download, see log for details

This is my system:

Home Assistant 2023.10.3 
Supervisor 2023.10.0 
Operating System 11.0 
Frontend 20231005.0 - latest 
tuan43 commented 1 year ago

any updates on this? :)

3DPixel commented 11 months ago

I am also getting this and similar errors.

Logger: homeassistant.components.websocket_api.http.connection Source: components/websocket_api/commands.py:230 Integration: Home Assistant WebSocket API (documentation, issues) First occurred: 08:37:34 (3 occurrences) Last logged: 09:10:31

[140559655867200] Error updating Home Assistant Supervisor: Abort update because of an issue with AppArmor: Can't fetch AppArmor profile https://version.home-assistant.io/apparmor_stable.txt: Cannot connect to host version.home-assistant.io:443 ssl:default [Try again] [140559655867200] Error updating Home Assistant Supervisor: Update of Supervisor failed: Can't install ghcr.io/home-assistant/amd64-hassio-supervisor:2023.11.6: 500 Server Error for http+docker://localhost/v1.43/images/create?tag=2023.11.6&fromImage=ghcr.io%2Fhome-assistant%2Famd64-hassio-supervisor&platform=linux%2Famd64: Internal Server Error ("Get "https://ghcr.io/v2/": context deadline exceeded (Client.Timeout exceeded while awaiting headers)") [140559317588928] Error updating Home Assistant Supervisor: Update of Supervisor failed: Can't install ghcr.io/home-assistant/amd64-hassio-supervisor:2023.11.6: 500 Server Error for http+docker://localhost/v1.43/images/create?tag=2023.11.6&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)") 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 53, in _wrapper raise HassioAPIError(data["message"]) homeassistant.components.hassio.handler.HassioAPIError: Abort update because of an issue with AppArmor: Can't fetch AppArmor profile https://version.home-assistant.io/apparmor_stable.txt: Cannot connect to host version.home-assistant.io:443 ssl:default [Try again]

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 230, in handle_call_service await hass.services.async_call( File "/usr/src/homeassistant/homeassistant/core.py", line 2035, in async_call response_data = await coro ^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/core.py", line 2072, in _execute_service return await target(service_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 235, in handle_service return await service.entity_service_call( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 876, in entity_service_call response_data = await _handle_entity_call( ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 948, in _handle_entity_call result = await task ^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/update/init.py", line 157, in async_install await entity.async_install_with_progress(version, backup) File "/usr/src/homeassistant/homeassistant/components/update/init.py", line 432, 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: Abort update because of an issue with AppArmor: Can't fetch AppArmor profile https://version.home-assistant.io/apparmor_stable.txt: Cannot connect to host version.home-assistant.io:443 ssl:default [Try again]

gris74 commented 11 months ago

Same here..

Logger: homeassistant.components.websocket_api.http.connection Source: components/websocket_api/commands.py:230 Integration: Home Assistant WebSocket API (documentation, issues) First occurred: 13:39:55 (2 occurrences) Last logged: 15:35:15

[281472723643328] Error updating Home Assistant Supervisor: Update of Supervisor failed: Can't install ghcr.io/home-assistant/aarch64-hassio-supervisor:2023.11.6: 500 Server Error for http+docker://localhost/v1.43/images/create?tag=2023.11.6&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)") [281471980520128] Error updating Home Assistant Supervisor: Update of Supervisor failed: Can't install ghcr.io/home-assistant/aarch64-hassio-supervisor:2023.11.6: 500 Server Error for http+docker://localhost/v1.43/images/create?tag=2023.11.6&fromImage=ghcr.io%2Fhome-assistant%2Faarch64-hassio-supervisor&platform=linux%2Farm64: Internal Server Error ("Get "https://ghcr.io/v2/": context deadline exceeded (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 53, 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:2023.11.6: 500 Server Error for http+docker://localhost/v1.43/images/create?tag=2023.11.6&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 230, in handle_call_service await hass.services.async_call( File "/usr/src/homeassistant/homeassistant/core.py", line 2035, in async_call response_data = await coro ^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/core.py", line 2072, in _execute_service return await target(service_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 235, in handle_service return await service.entity_service_call( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 876, in entity_service_call response_data = await _handle_entity_call( ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 948, in _handle_entity_call result = await task ^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/update/init.py", line 157, in async_install await entity.async_install_with_progress(version, backup) File "/usr/src/homeassistant/homeassistant/components/update/init.py", line 432, 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:2023.11.6: 500 Server Error for http+docker://localhost/v1.43/images/create?tag=2023.11.6&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)")

Additional information

ha resolution info checks:

TICHIEM commented 11 months ago

same Issue here been looking for solution all over even logged an issue but no response. Logger: homeassistant.components.websocket_api.http.connection Source: components/websocket_api/commands.py:226 Integration: Home Assistant WebSocket API (documentation, issues) First occurred: 2:51:56 AM (4 occurrences) Last logged: 3:04:59 AM

[140033614859840] Error updating Home Assistant Supervisor: Abort update because of an issue with AppArmor: Can't fetch AppArmor profile https://version.home-assistant.io/apparmor_stable.txt: Timeout [140033614859840] Error updating Home Assistant Supervisor: Update of Supervisor failed: Can't install ghcr.io/home-assistant/amd64-hassio-supervisor:2023.12.0: 500 Server Error for http+docker://localhost/v1.43/images/create?tag=2023.12.0&fromImage=ghcr.io%2Fhome-assistant%2Famd64-hassio-supervisor&platform=linux%2Famd64: Internal Server Error ("Head "https://ghcr.io/v2/home-assistant/amd64-hassio-supervisor/manifests/2023.12.0": Get "https://ghcr.io/token?scope=repository%3Ahome-assistant%2Famd64-hassio-supervisor%3Apull&service=ghcr.io": net/http: TLS handshake timeout") 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 53, in _wrapper raise HassioAPIError(data["message"]) homeassistant.components.hassio.handler.HassioAPIError: Abort update because of an issue with AppArmor: Can't fetch AppArmor profile https://version.home-assistant.io/apparmor_stable.txt: Timeout

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 226, in handle_call_service await hass.services.async_call( File "/usr/src/homeassistant/homeassistant/core.py", line 2012, in async_call response_data = await coro ^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/core.py", line 2049, in _execute_service return await target(service_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 235, in handle_service return await service.entity_service_call( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 876, in entity_service_call response_data = await _handle_entity_call( ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 948, in _handle_entity_call result = await task ^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/update/init.py", line 157, in async_install await entity.async_install_with_progress(version, backup) File "/usr/src/homeassistant/homeassistant/components/update/init.py", line 432, 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: Abort update because of an issue with AppArmor: Can't fetch AppArmor profile https://version.home-assistant.io/apparmor_stable.txt: Timeout

Didisaurio commented 11 months ago

Same here

Logger: homeassistant.components.websocket_api.http.connection Source: components/websocket_api/commands.py:230 Integration: Home Assistant WebSocket API (documentation, issues) First occurred: 12:42:15 (2 occurrences) Last logged: 12:45:20

[140568442432960] Error updating Home Assistant Supervisor: Update of Supervisor failed: Can't install ghcr.io/home-assistant/amd64-hassio-supervisor:2023.12.0: 500 Server Error for http+docker://localhost/v1.41/images/create?tag=2023.12.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)") 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 53, in _wrapper raise HassioAPIError(data["message"]) homeassistant.components.hassio.handler.HassioAPIError: Update of Supervisor failed: Can't install ghcr.io/home-assistant/amd64-hassio-supervisor:2023.12.0: 500 Server Error for http+docker://localhost/v1.41/images/create?tag=2023.12.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)")

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 230, in handle_call_service await hass.services.async_call( File "/usr/src/homeassistant/homeassistant/core.py", line 2035, in async_call response_data = await coro ^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/core.py", line 2072, in _execute_service return await target(service_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 235, in handle_service return await service.entity_service_call( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 876, in entity_service_call response_data = await _handle_entity_call( ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 948, in _handle_entity_call result = await task ^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/update/init.py", line 157, in async_install await entity.async_install_with_progress(version, backup) File "/usr/src/homeassistant/homeassistant/components/update/init.py", line 432, 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/amd64-hassio-supervisor:2023.12.0: 500 Server Error for http+docker://localhost/v1.41/images/create?tag=2023.12.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)")

gris74 commented 11 months ago

For me the solution was to change the DNS from 4.4.4.4 to 1.1.1.1 with a static IP adress in the System -> network configuration panel of HA -> IPv4 image

Follow by this command line in a terminal ha supervisor update

Didisaurio commented 11 months ago

For me the solution was to change the DNS from 4.4.4.4 to 1.1.1.1 with a static IP adress in the System -> network configuration panel of HA -> IPv4 image

Follow by this command line in a terminal ha supervisor update

Thanks Gris, yesterday I realize that my router got a really random DNS server config.

tido- commented 8 months ago

Do you have at least 3 Gigabyte free storage avilable? When I was running HA Supervisor on my RPi, this happend to me.

issue-triage-workflows[bot] commented 5 months ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.