Can't update Supervisor on an RPi4

Updating from my current version 2022.05.3 to 2022.07 keeps failing. In the Core logs, I see this error:

Logger: homeassistant.components.websocket_api.http.connection
Source: components/hassio/update.py:256 
Integration: Home Assistant WebSocket API (documentation, issues) 
First occurred: 11:46:15 AM (1 occurrences) 
Last logged: 11:46:15 AM

[546861076144] Error updating Home Assistant Supervisor:
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/hassio/update.py", line 254, in async_install
    await async_update_supervisor(self.hass)
  File "/usr/src/homeassistant/homeassistant/components/hassio/handler.py", line 42, in _wrapper
    data = await funct(*argv, **kwargs)
  File "/usr/src/homeassistant/homeassistant/components/hassio/__init__.py", line 385, in async_update_supervisor
    return await hassio.send_command(command, timeout=None)
  File "/usr/src/homeassistant/homeassistant/components/hassio/handler.py", line 255, in send_command
    raise HassioAPIError()
homeassistant.components.hassio.handler.HassioAPIError

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 193, in handle_call_service
    await hass.services.async_call(
  File "/usr/src/homeassistant/homeassistant/core.py", line 1713, in async_call
    task.result()
  File "/usr/src/homeassistant/homeassistant/core.py", line 1750, in _execute_service
    await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 204, in handle_service
    await service.entity_service_call(
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 680, in entity_service_call
    future.result()  # pop exception if have
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 930, in async_request_call
    await coro
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 717, in _handle_entity_call
    await result
  File "/usr/src/homeassistant/homeassistant/components/update/__init__.py", line 152, in async_install
    await entity.async_install_with_progress(version, backup)
  File "/usr/src/homeassistant/homeassistant/components/update/__init__.py", line 411, in async_install_with_progress
    await self.async_install(version, backup)
  File "/usr/src/homeassistant/homeassistant/components/hassio/update.py", line 256, in async_install
    raise HomeAssistantError(
homeassistant.exceptions.HomeAssistantError: Error updating Home Assistant Supervisor: 

The Supervisor logs will not display due to a:

Failed to get supervisor logs, 502: Bad Gateway

I also cannot run backups.
I’m running HassOS on an Rpi4. Please advise.
Thanks

1 Like

I can update everything else, including HACS, Core and OS, but not Supervisor.
Any ideas?

Ok, after changing my network settings from DHCP to Static and then back, I get a different error:

Logger: homeassistant.core
Source: components/hassio/update.py:256 
First occurred: 5:02:38 PM (1 occurrences) 
Last logged: 5:02:38 PM

Error executing service: <ServiceCall update.install (c:01G8S3QA0C321H8VEXX1M818E7): entity_id=['update.home_assistant_supervisor_update'], backup=False>
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/hassio/update.py", line 254, in async_install
    await async_update_supervisor(self.hass)
  File "/usr/src/homeassistant/homeassistant/components/hassio/handler.py", line 45, 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.txt: Timeout

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

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/core.py", line 1731, in catch_exceptions
    await coro_or_task
  File "/usr/src/homeassistant/homeassistant/core.py", line 1750, in _execute_service
    await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 204, in handle_service
    await service.entity_service_call(
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 680, in entity_service_call
    future.result()  # pop exception if have
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 930, in async_request_call
    await coro
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 717, in _handle_entity_call
    await result
  File "/usr/src/homeassistant/homeassistant/components/update/__init__.py", line 152, in async_install
    await entity.async_install_with_progress(version, backup)
  File "/usr/src/homeassistant/homeassistant/components/update/__init__.py", line 411, in async_install_with_progress
    await self.async_install(version, backup)
  File "/usr/src/homeassistant/homeassistant/components/hassio/update.py", line 256, 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.txt: Timeout

I take this as one step forward, but could still use some help.

In the end, it was file system corruption on my external SSD that was the culprit. I installed HA on another SD drive and was able to restore from a backup roughly one month old. In spite of the corruption, I was able to mount the external SSD on another linux box running Ubuntu and I copied over the most recent config files, which brought me pretty much up to date. I hope this helps someone in similar circumstances, but as bit of a rant, if I, as root, can’t run regular file system checks, then HASSOS should do this on every reboot and fix the minor errors, before they become big ones. I used to do this when I used OpenHAB. You (as root) can apply boot options that force a file system check every reboot. Any errors are repaired on the fly. There appears to be no way to do this with HA. If so, please advise.

In any case, thanks to all who provided support and insight in helping me get this solved.
(That’s sarcasm, I did not get so much as an acknowledgment of a problem.)