Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Container in use errors when updating HA core version or add-ons #3016

Closed
2 tasks done
sparkydave1981 opened this issue Jul 19, 2021 · 13 comments
Closed
2 tasks done

Comments

@sparkydave1981
Copy link

sparkydave1981 commented Jul 19, 2021

Hardware Environment

  • Generic x86-64 (Intel NUC)

Home Assistant OS release:

  • 2021.06.8
arch: amd64
audio_input: None
audio_output: None
boot: true
image: ghcr.io/home-assistant/generic-x86-64-homeassistant
ip_address: 172.30.32.1
last_version: 2021.7.3
machine: generic-x86-64
port: 8123
ssl: false
update_available: false
version: 2021.7.3
version_latest: 2021.7.3
wait_boot: 600
watchdog: true

Supervisor logs:

21-07-19 11:26:43 INFO (SyncWorker_5) [supervisor.docker.interface] Attaching to ghcr.io/hassio-addons/unifi/amd64 with version 0.23.2
21-07-19 11:26:43 INFO (SyncWorker_10) [supervisor.docker.interface] Attaching to ghcr.io/hassio-addons/motioneye/amd64 with version 0.15.0
21-07-19 11:26:43 INFO (SyncWorker_11) [supervisor.docker.interface] Attaching to homeassistant/amd64-addon-zwave_js with version 0.1.29
21-07-19 11:26:43 INFO (SyncWorker_9) [supervisor.docker.interface] Attaching to ghcr.io/einschmidt/caddy-2/amd64 with version 1.0.3
21-07-19 11:26:43 INFO (SyncWorker_8) [supervisor.docker.interface] Attaching to f8f3f8ff/amd64-addon-gmusicproxy with version 0.5.1
21-07-19 11:26:43 INFO (MainThread) [supervisor.snapshots] Found 5 snapshot files
21-07-19 11:26:43 INFO (MainThread) [supervisor.discovery] Loaded 3 messages
21-07-19 11:26:43 INFO (MainThread) [supervisor.ingress] Loaded 3 ingress sessions
21-07-19 11:26:43 INFO (MainThread) [supervisor.resolution.check] Starting system checks with state CoreState.SETUP
21-07-19 11:26:43 INFO (MainThread) [supervisor.resolution.check] System checks complete
21-07-19 11:26:43 INFO (MainThread) [supervisor.resolution.evaluate] Starting system evaluation with state CoreState.SETUP
21-07-19 11:26:43 INFO (MainThread) [supervisor.resolution.evaluate] System evaluation complete
21-07-19 11:26:43 INFO (MainThread) [supervisor.jobs] 'ResolutionFixup.run_autofix' blocked from execution, system is not running - CoreState.SETUP
21-07-19 11:26:43 INFO (MainThread) [supervisor.resolution.evaluate] Starting system evaluation with state CoreState.SETUP
21-07-19 11:26:43 INFO (MainThread) [supervisor.resolution.evaluate] System evaluation complete
21-07-19 11:26:43 INFO (MainThread) [__main__] Running Supervisor
21-07-19 11:26:43 INFO (MainThread) [supervisor.hassos] Rauc: B - marked slot kernel.1 as good
21-07-19 11:26:43 INFO (MainThread) [supervisor.addons] Phase 'AddonStartup.INITIALIZE' starting 0 add-ons
21-07-19 11:26:43 INFO (MainThread) [supervisor.addons] Phase 'AddonStartup.SYSTEM' starting 2 add-ons
21-07-19 11:26:43 WARNING (MainThread) [supervisor.addons.options] Option 'anonymous' does not exist in the schema for Mosquitto broker (core_mosquitto)
21-07-19 11:26:43 INFO (SyncWorker_11) [supervisor.docker.interface] Cleaning addon_core_mosquitto application
21-07-19 11:26:43 WARNING (SyncWorker_11) [supervisor.addons.options] Option 'anonymous' does not exist in the schema for Mosquitto broker (core_mosquitto)
21-07-19 11:26:43 INFO (SyncWorker_11) [supervisor.docker.addon] Starting Docker add-on homeassistant/amd64-addon-mosquitto with version 6.0.1
21-07-19 11:26:43 INFO (SyncWorker_4) [supervisor.docker.addon] Starting Docker add-on homeassistant/amd64-addon-mariadb with version 2.4.0
21-07-19 11:26:44 INFO (MainThread) [supervisor.services.modules.mqtt] Set core_mosquitto as service provider for mqtt
21-07-19 11:26:45 INFO (MainThread) [supervisor.services.modules.mysql] Set core_mariadb as service provider for MySQL
21-07-19 11:26:46 INFO (MainThread) [supervisor.auth] Auth request from 'core_mosquitto' for 'hassio_mqtt'
21-07-19 11:26:46 INFO (MainThread) [supervisor.auth] Home Assistant not running, checking cache
21-07-19 11:26:48 INFO (MainThread) [supervisor.addons] Phase 'AddonStartup.SERVICES' starting 6 add-ons
21-07-19 11:26:48 INFO (SyncWorker_11) [supervisor.docker.interface] Cleaning addon_core_ssh application
21-07-19 11:26:48 INFO (SyncWorker_11) [supervisor.docker.addon] Starting Docker add-on homeassistant/amd64-addon-ssh with version 9.1.3
21-07-19 11:26:49 INFO (SyncWorker_4) [supervisor.docker.interface] Cleaning addon_a0d7b954_unifi application
21-07-19 11:26:49 INFO (SyncWorker_4) [supervisor.docker.addon] Starting Docker add-on ghcr.io/hassio-addons/unifi/amd64 with version 0.23.2
21-07-19 11:26:49 INFO (SyncWorker_9) [supervisor.docker.interface] Cleaning addon_a0d7b954_vscode application
21-07-19 11:26:49 INFO (SyncWorker_9) [supervisor.docker.addon] Starting Docker add-on ghcr.io/hassio-addons/vscode/amd64 with version 3.6.0
21-07-19 11:26:49 INFO (SyncWorker_5) [supervisor.docker.interface] Cleaning addon_6a3d001f_assistant_relay application
21-07-19 11:26:49 INFO (SyncWorker_5) [supervisor.docker.addon] Starting Docker add-on apipa169/amd64-hassio-assistant_relay with version None
21-07-19 11:26:49 WARNING (MainThread) [supervisor.addons.options] Option 'interface' does not exist in the schema for Samba share (core_samba)
21-07-19 11:26:49 INFO (SyncWorker_1) [supervisor.docker.interface] Cleaning addon_core_samba application
21-07-19 11:26:49 WARNING (SyncWorker_1) [supervisor.addons.options] Option 'interface' does not exist in the schema for Samba share (core_samba)
21-07-19 11:26:49 INFO (SyncWorker_1) [supervisor.docker.addon] Starting Docker add-on homeassistant/amd64-addon-samba with version 9.5.1
21-07-19 11:26:50 INFO (SyncWorker_11) [supervisor.docker.addon] Starting Docker add-on homeassistant/amd64-addon-zwave_js with version 0.1.29
21-07-19 11:26:50 INFO (MainThread) [supervisor.api.middleware.security] /network/interface/default/info access from core_samba
21-07-19 11:26:55 INFO (MainThread) [supervisor.core] Start Home Assistant Core
21-07-19 11:26:55 INFO (MainThread) [supervisor.homeassistant.module] Update pulse/client.config: /data/tmp/homeassistant_pulse
21-07-19 11:26:55 INFO (SyncWorker_9) [supervisor.docker.interface] Cleaning homeassistant application
21-07-19 11:26:58 ERROR (SyncWorker_9) [supervisor.docker] Image ghcr.io/home-assistant/generic-x86-64-homeassistant not exists for homeassistant
21-07-19 11:26:58 INFO (MainThread) [supervisor.addons] Phase 'AddonStartup.APPLICATION' starting 5 add-ons
21-07-19 11:26:58 INFO (SyncWorker_5) [supervisor.docker.interface] Cleaning addon_cebe7a76_hassio_google_drive_backup application
21-07-19 11:26:58 INFO (SyncWorker_5) [supervisor.docker.addon] Starting Docker add-on sabeechen/hassio-google-drive-backup-amd64 with version 0.104.3
21-07-19 11:26:58 INFO (SyncWorker_10) [supervisor.docker.interface] Cleaning addon_15ef4d2f_esphome application
21-07-19 11:26:58 INFO (SyncWorker_10) [supervisor.docker.addon] Starting Docker add-on esphome/esphome-hassio-amd64 with version 1.19.4
21-07-19 11:26:59 INFO (SyncWorker_11) [supervisor.docker.interface] Cleaning addon_00185a40_simplescheduler application
21-07-19 11:26:59 INFO (SyncWorker_11) [supervisor.docker.addon] Starting Docker add-on 00185a40/amd64-addon-simplescheduler with version 0.30.05
21-07-19 11:26:59 INFO (SyncWorker_0) [supervisor.docker.interface] Cleaning addon_a0d7b954_nodered application
21-07-19 11:26:59 INFO (SyncWorker_0) [supervisor.docker.addon] Starting Docker add-on ghcr.io/hassio-addons/node-red/amd64 with version 9.2.0
21-07-19 11:26:59 WARNING (SyncWorker_11) [supervisor.docker.addon] Run On Startup.d running with disabled protected mode!
21-07-19 11:26:59 INFO (SyncWorker_11) [supervisor.docker.interface] Cleaning addon_a1308ec6_run_on_startup_addon application
21-07-19 11:26:59 INFO (MainThread) [supervisor.api.middleware.security] /core/info access from cebe7a76_hassio_google_drive_backup
21-07-19 11:26:59 INFO (MainThread) [supervisor.api.middleware.security] /supervisor/info access from cebe7a76_hassio_google_drive_backup
21-07-19 11:26:59 INFO (SyncWorker_11) [supervisor.docker.addon] Starting Docker add-on a1308ec6/amd64-addon-run_on_startup_addon with version 0.10
21-07-19 11:26:59 INFO (MainThread) [supervisor.api.middleware.security] /snapshots access from cebe7a76_hassio_google_drive_backup
21-07-19 11:26:59 INFO (MainThread) [supervisor.api.middleware.security] /snapshots/bc1a0f81/info access from cebe7a76_hassio_google_drive_backup
21-07-19 11:26:59 INFO (MainThread) [supervisor.api.middleware.security] /snapshots/e87a2030/info access from cebe7a76_hassio_google_drive_backup
21-07-19 11:26:59 INFO (MainThread) [supervisor.api.middleware.security] /snapshots/106a1d22/info access from cebe7a76_hassio_google_drive_backup
21-07-19 11:26:59 INFO (MainThread) [supervisor.api.middleware.security] /snapshots/971441c3/info access from cebe7a76_hassio_google_drive_backup
21-07-19 11:26:59 INFO (MainThread) [supervisor.api.middleware.security] /snapshots/ffc4ba25/info access from cebe7a76_hassio_google_drive_backup
21-07-19 11:27:04 INFO (MainThread) [supervisor.misc.tasks] All core tasks are scheduled
21-07-19 11:27:04 INFO (MainThread) [supervisor.core] Supervisor is up and running
21-07-19 11:27:04 INFO (MainThread) [supervisor.host.info] Updating local host information
21-07-19 11:27:04 INFO (MainThread) [supervisor.resolution.check] Starting system checks with state CoreState.RUNNING
21-07-19 11:27:04 INFO (MainThread) [supervisor.resolution.checks.base] Run check for IssueType.PWNED/ContextType.ADDON
21-07-19 11:27:04 WARNING (MainThread) [supervisor.addons.options] Option 'anonymous' does not exist in the schema for Mosquitto broker (core_mosquitto)
21-07-19 11:27:04 INFO (MainThread) [supervisor.host.services] Updating service information
21-07-19 11:27:04 INFO (MainThread) [supervisor.host.network] Updating local network information
21-07-19 11:27:04 WARNING (MainThread) [supervisor.addons.options] Option 'interface' does not exist in the schema for Samba share (core_samba)
21-07-19 11:27:04 INFO (MainThread) [supervisor.resolution.checks.base] Run check for IssueType.FREE_SPACE/ContextType.SYSTEM
21-07-19 11:27:04 INFO (MainThread) [supervisor.resolution.checks.base] Run check for IssueType.SECURITY/ContextType.CORE
21-07-19 11:27:04 INFO (MainThread) [supervisor.resolution.check] System checks complete
21-07-19 11:27:04 INFO (MainThread) [supervisor.resolution.evaluate] Starting system evaluation with state CoreState.RUNNING
21-07-19 11:27:05 INFO (MainThread) [supervisor.host.sound] Updating PulseAudio information
21-07-19 11:27:05 INFO (MainThread) [supervisor.host] Host information reload completed
21-07-19 11:27:08 INFO (MainThread) [supervisor.resolution.evaluate] System evaluation complete
21-07-19 11:27:08 INFO (MainThread) [supervisor.resolution.fixup] Starting system autofix at state CoreState.RUNNING
21-07-19 11:27:08 INFO (MainThread) [supervisor.resolution.fixup] System autofix complete
21-07-19 11:29:00 INFO (MainThread) [supervisor.api.middleware.security] /network/info access from core_ssh
21-07-19 11:29:00 INFO (MainThread) [supervisor.api.middleware.security] /network/info access from core_ssh
21-07-19 11:29:00 INFO (MainThread) [supervisor.api.middleware.security] /host/info access from core_ssh
21-07-19 11:29:00 INFO (MainThread) [supervisor.api.middleware.security] /core/info access from core_ssh
21-07-19 11:29:05 INFO (MainThread) [supervisor.api.middleware.security] /core/info access from core_ssh
21-07-19 11:29:23 INFO (MainThread) [supervisor.api.middleware.security] /core/stop access from core_ssh
21-07-19 11:29:32 INFO (MainThread) [supervisor.api.middleware.security] /core/update access from core_ssh
21-07-19 11:29:32 INFO (MainThread) [supervisor.homeassistant.core] Updating Home Assistant to version 2021.7.3
21-07-19 11:29:32 INFO (SyncWorker_7) [supervisor.docker.interface] Updating image ghcr.io/home-assistant/generic-x86-64-homeassistant:2021.7.2 to ghcr.io/home-assistant/generic-x86-64-homeassistant:2021.7.3
21-07-19 11:29:32 INFO (SyncWorker_7) [supervisor.docker.interface] Downloading docker image ghcr.io/home-assistant/generic-x86-64-homeassistant with tag 2021.7.3.
21-07-19 11:29:37 INFO (MainThread) [supervisor.homeassistant.core] Successful started Home Assistant 2021.7.3
21-07-19 11:34:41 INFO (MainThread) [supervisor.api.middleware.security] /supervisor/info access from core_ssh
21-07-19 11:35:16 INFO (MainThread) [supervisor.api.middleware.security] /core/info access from core_ssh
21-07-19 11:36:09 INFO (MainThread) [supervisor.api.middleware.security] /supervisor/logs access from core_ssh

Journal logs:

Kernel logs:

Description of problem:

Whenever I try to update HA Core to a new version I have major issues. I get errors relating to the Container being is use / name already existing. The same happens if I try to update an Add-on which is running.
The only solution (temporary) has been to stop HA (or the add-on), update, then start again. In this case it sometimes works however it also requires a Host Reboot.

@sparkydave1981
Copy link
Author

sparkydave1981 commented Jul 19, 2021

https://community.home-assistant.io/t/multiple-add-ons-fail-to-start-with-same-error/320487/7?u=sparkydave

Similarly to not being able to update HA, I get errors as per below when trying to update add-ons:

21-07-07 09:44:26 INFO (SyncWorker_11) [supervisor.docker.interface] Cleaning addon_a0d7b954_vscode application
21-07-07 09:44:31 ERROR (SyncWorker_11) [supervisor.docker] Can't create container from addon_a0d7b954_vscode: 409 Client Error for http+docker://localhost/v1.41/containers/create?name=addon_a0d7b954_vscode: Conflict ("Conflict. The container name "/addon_a0d7b954_vscode" is already in use by container "b465c4628b83bccf629fb2c60b1dae172e830314053bd390068e98d0319041e8". You have to remove (or rename) that container to be able to reuse that name.")
21-07-07 09:45:00 WARNING (SyncWorker_5) [supervisor.docker.interface] Can't grep logs from ghcr.io/hassio-addons/vscode/amd64: 409 Client Error for http+docker://localhost/v1.41/containers/b465c4628b83bccf629fb2c60b1dae172e830314053bd390068e98d0319041e8/logs?stderr=1&stdout=1&timestamps=0&follow=0&tail=100: Conflict ("can not get logs from container which is dead or marked for removal")

@agners
Copy link
Member

agners commented Jul 19, 2021

This seems more related to Supervsior, moving.

@agners agners transferred this issue from home-assistant/operating-system Jul 19, 2021
@sparkydave1981
Copy link
Author

Another example of trying to update an Add-on this morning:

21-07-20 09:11:18 INFO (SyncWorker_7) [supervisor.docker.interface] Stopping addon_a0d7b954_nodered application
21-07-20 09:11:18 INFO (MainThread) [supervisor.api.proxy] Home Assistant WebSocket API connection is closed
21-07-20 09:11:21 INFO (SyncWorker_7) [supervisor.docker.interface] Cleaning addon_a0d7b954_nodered application
21-07-20 09:11:26 INFO (MainThread) [supervisor.addons] Add-on 'a0d7b954_nodered' successfully updated
21-07-20 09:11:27 INFO (SyncWorker_11) [supervisor.docker.interface] Cleanup images: ['ghcr.io/hassio-addons/node-red/amd64:9.2.0']
21-07-20 09:11:27 INFO (SyncWorker_10) [supervisor.docker.interface] Cleaning addon_a0d7b954_nodered application
21-07-20 09:11:32 ERROR (SyncWorker_10) [supervisor.docker] Can't create container from addon_a0d7b954_nodered: 409 Client Error for http+docker://localhost/v1.41/containers/create?name=addon_a0d7b954_nodered: Conflict ("Conflict. The container name "/addon_a0d7b954_nodered" is already in use by container "555c1535b8112e01c2fc9bda9efa07566642030aec3d81aa3820057655b0b0c6". You have to remove (or rename) that container to be able to reuse that name.")

which looks like it fails, however the update seems to go through ok. Unfortunately I can't say the same for HA version updates.

@sparkydave1981
Copy link
Author

sparkydave1981 commented Jul 23, 2021

I just tried to update HA from 2021.7.3 to 2021.7.4 and got the below errors, update failed and HA basically didn't come back to life.

Supervisor log:

21-07-23 08:07:18 INFO (MainThread) [supervisor.homeassistant.core] Updating Hom                                                         e Assistant to version 2021.7.4
21-07-23 08:07:18 INFO (SyncWorker_10) [supervisor.docker.interface] Updating im                                                         age ghcr.io/home-assistant/generic-x86-64-homeassistant:2021.7.3 to ghcr.io/home                                                         -assistant/generic-x86-64-homeassistant:2021.7.4
21-07-23 08:07:18 INFO (SyncWorker_10) [supervisor.docker.interface] Downloading                                                          docker image ghcr.io/home-assistant/generic-x86-64-homeassistant with tag 2021.                                                         7.4.
21-07-23 08:07:22 INFO (MainThread) [supervisor.api.middleware.security] /superv                                                         isor/logs access from core_ssh
21-07-23 08:08:10 INFO (SyncWorker_10) [supervisor.docker.interface] Stopping homeassistant application
21-07-23 08:08:10 INFO (MainThread) [supervisor.api.proxy] Home Assistant WebSocket API error: Received message 8:1000 is not str
21-07-23 08:08:10 INFO (MainThread) [supervisor.api.proxy] Home Assistant WebSocket API connection is closed
21-07-23 08:08:10 INFO (MainThread) [supervisor.api.proxy] Home Assistant WebSocket API error: Received message 8:1000 is not str
21-07-23 08:08:10 INFO (MainThread) [supervisor.api.proxy] Home Assistant WebSocket API connection is closed
21-07-23 08:11:50 INFO (SyncWorker_10) [supervisor.docker.interface] Cleaning homeassistant application
21-07-23 08:12:00 ERROR (SyncWorker_2) [supervisor.docker] Can't create container from homeassistant: 409 Client Error for http+docker://localhost/v1.41/containers/create?name=homeassistant: Conflict ("Conflict. The container name "/homeassistant" is already in use by container "4a8e713aac4e7a63124198e09d79b80f3a6ed898596df291d888392055511efb". You have to remove (or rename) that container to be able to reuse that name.")
21-07-23 08:12:00 INFO (MainThread) [supervisor.resolution.module] Create new issue IssueType.UPDATE_FAILED - ContextType.CORE / None
21-07-23 08:12:00 ERROR (MainThread) [asyncio] Task exception was never retrieved
future: <Task finished name='Task-728020' coro=<process_lock.<locals>.wrap_api() done, defined at /usr/src/supervisor/supervisor/utils/__init__.py:24> exception=HomeAssistantUpdateError()>
Traceback (most recent call last):
  File "/usr/src/supervisor/supervisor/utils/__init__.py", line 33, in wrap_api
    return await method(api, *args, **kwargs)
  File "/usr/src/supervisor/supervisor/jobs/decorator.py", line 107, in wrapper
    raise err
  File "/usr/src/supervisor/supervisor/jobs/decorator.py", line 105, in wrapper
    return await self._method(*args, **kwargs)
  File "/usr/src/supervisor/supervisor/homeassistant/core.py", line 240, in update
    raise HomeAssistantUpdateError()
supervisor.exceptions.HomeAssistantUpdateError

HA log:

2021-07-23 08:08:20 ERROR (MainThread) [homeassistant.components.hassio.handler] Client error on /core/update request Server disconnected
2021-07-23 08:08:20 ERROR (MainThread) [homeassistant.components.hassio] Failed to to call /core/update - 
2021-07-23 08:08:22 ERROR (MainThread) [hass_nabucasa.google_report_state] Unexpected error
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/hass_nabucasa/iot_base.py", line 108, in connect
    await self._handle_connection()
  File "/usr/local/lib/python3.9/site-packages/hass_nabucasa/iot_base.py", line 165, in _handle_connection
    self.client = client = await self.cloud.websession.ws_connect(
  File "/usr/local/lib/python3.9/site-packages/aiohttp/client.py", line 754, in _ws_connect
    resp = await self.request(
  File "/usr/local/lib/python3.9/site-packages/aiohttp/client.py", line 381, in _request
    raise RuntimeError("Session is closed")
RuntimeError: Session is closed
2021-07-23 08:08:27 ERROR (MainThread) [hass_nabucasa.google_report_state] Unexpected error
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/hass_nabucasa/iot_base.py", line 108, in connect
    await self._handle_connection()
  File "/usr/local/lib/python3.9/site-packages/hass_nabucasa/iot_base.py", line 165, in _handle_connection
    self.client = client = await self.cloud.websession.ws_connect(
  File "/usr/local/lib/python3.9/site-packages/aiohttp/client.py", line 754, in _ws_connect
    resp = await self.request(
  File "/usr/local/lib/python3.9/site-packages/aiohttp/client.py", line 381, in _request
    raise RuntimeError("Session is closed")
RuntimeError: Session is closed

So after rebooting the host I then SSH'd into the system, ran ha core stop, then ha core upgrade, both giving me a 'successful' response. I waited a while and tried to run ha core start but got:

~ $ ha core stop
Processing... Done.

Command completed successfully.
~ $ ha core update
Processing... Done.

Command completed successfully.
~ $ ha core start
⣾ Processing... ERRO[0000] Unexpected server response. Status code: 500
Processing... Done.

Unexpected server response. Status code: 500
~ $ ha core start
⣾ Processing... ERRO[0000] Unexpected server response. Status code: 500
Processing... Done.

So then I once again checked the supervisor log:

~ $ ha supervisor logs
File "/usr/src/supervisor/supervisor/homeassistant/core.py", line 266, in start
    if await self.instance.is_initialize():
  File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 52, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/supervisor/supervisor/docker/homeassistant.py", line 207, in _i                                                               s_initialize
    if docker_container.image.id != docker_image.id:
  File "/usr/local/lib/python3.9/site-packages/docker/models/containers.py", lin                                                               e 40, in image
    return self.client.images.get(image_id.split(':')[1])
  File "/usr/local/lib/python3.9/site-packages/docker/models/images.py", line 31                                                               6, in get
    return self.prepare_model(self.client.api.inspect_image(name))
  File "/usr/local/lib/python3.9/site-packages/docker/utils/decorators.py", line                                                                19, in wrapped
    return f(self, resource_id, *args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/docker/api/image.py", line 253, i                                                               n inspect_image
    return self._result(
  File "/usr/local/lib/python3.9/site-packages/docker/api/client.py", line 274,                                                                in _result
    self._raise_for_status(response)
  File "/usr/local/lib/python3.9/site-packages/docker/api/client.py", line 270,                                                                in _raise_for_status
    raise create_api_error_from_http_exception(e)
  File "/usr/local/lib/python3.9/site-packages/docker/errors.py", line 31, in cr                                                               eate_api_error_from_http_exception
    raise cls(e, response=response, explanation=explanation)
docker.errors.ImageNotFound: 404 Client Error for http+docker://localhost/v1.41/                                                               images/7ec4b01023fecfa07b6aade2484aea24a67e80a0872a3b38350ad35abbef438c/json: No                                                               t Found ("no such image: 7ec4b01023fecfa07b6aade2484aea24a67e80a0872a3b38350ad35                                                               abbef438c: No such image: sha256:7ec4b01023fecfa07b6aade2484aea24a67e80a0872a3b3                                                               8350ad35abbef438c")
21-07-23 08:29:17 INFO (MainThread) [supervisor.hardware.monitor] Detecting Hard                                                               wareAction.REMOVE serial hardware /dev/ttyACM1 - /dev/serial/by-id/usb-dresden_e                                                               lektronik_ingenieurtechnik_GmbH_ConBee_II_DE2120390-if00
21-07-23 08:29:17 INFO (MainThread) [supervisor.hardware.monitor] Detecting Hard                                                               wareAction.REMOVE usb hardware /dev/bus/usb/001/004
21-07-23 08:29:19 INFO (MainThread) [supervisor.hardware.monitor] Detecting Hard                                                               wareAction.ADD usb hardware /dev/bus/usb/001/006
21-07-23 08:29:19 INFO (MainThread) [supervisor.hardware.monitor] Detecting Hard                                                               wareAction.ADD serial hardware /dev/ttyACM1 - /dev/serial/by-id/usb-dresden_elek                                                               tronik_ingenieurtechnik_GmbH_ConBee_II_DE2120390-if00
21-07-23 08:29:20 INFO (MainThread) [supervisor.hardware.monitor] Detecting Hard                                                               wareAction.REMOVE serial hardware /dev/ttyACM1 - /dev/serial/by-id/usb-dresden_e                                                               lektronik_ingenieurtechnik_GmbH_ConBee_II_DE2120390-if00
21-07-23 08:29:20 INFO (MainThread) [supervisor.hardware.monitor] Detecting Hard                                                               wareAction.REMOVE usb hardware /dev/bus/usb/001/006
21-07-23 08:29:23 INFO (MainThread) [supervisor.hardware.monitor] Detecting Hard                                                               wareAction.ADD usb hardware /dev/bus/usb/001/007
21-07-23 08:29:23 INFO (MainThread) [supervisor.hardware.monitor] Detecting Hard                                                               wareAction.ADD serial hardware /dev/ttyACM1 - /dev/serial/by-id/usb-dresden_elek                                                               tronik_ingenieurtechnik_GmbH_ConBee_II_DE2120390-if00
21-07-23 08:29:42 INFO (MainThread) [supervisor.hardware.monitor] Detecting Hard                                                               wareAction.REMOVE serial hardware /dev/ttyACM1 - /dev/serial/by-id/usb-dresden_e                                                               lektronik_ingenieurtechnik_GmbH_ConBee_II_DE2120390-if00
21-07-23 08:29:42 INFO (MainThread) [supervisor.hardware.monitor] Detecting Hard                                                               wareAction.REMOVE usb hardware /dev/bus/usb/001/007
21-07-23 08:29:44 INFO (MainThread) [supervisor.hardware.monitor] Detecting Hard                                                               wareAction.ADD usb hardware /dev/bus/usb/001/008
21-07-23 08:29:44 INFO (MainThread) [supervisor.hardware.monitor] Detecting Hard                                                               wareAction.ADD serial hardware /dev/ttyACM1 - /dev/serial/by-id/usb-dresden_elek                                                               tronik_ingenieurtechnik_GmbH_ConBee_II_DE2120390-if00
21-07-23 08:29:46 INFO (MainThread) [supervisor.hardware.monitor] Detecting Hard                                                               wareAction.REMOVE serial hardware /dev/ttyACM1 - /dev/serial/by-id/usb-dresden_e                                                               lektronik_ingenieurtechnik_GmbH_ConBee_II_DE2120390-if00
21-07-23 08:29:46 INFO (MainThread) [supervisor.hardware.monitor] Detecting Hard                                                               wareAction.REMOVE usb hardware /dev/bus/usb/001/008
21-07-23 08:29:48 INFO (MainThread) [supervisor.hardware.monitor] Detecting Hard                                                               wareAction.ADD usb hardware /dev/bus/usb/001/009
21-07-23 08:29:48 INFO (MainThread) [supervisor.hardware.monitor] Detecting Hard                                                               wareAction.ADD serial hardware /dev/ttyACM1 - /dev/serial/by-id/usb-dresden_elek                                                               tronik_ingenieurtechnik_GmbH_ConBee_II_DE2120390-if00
21-07-23 08:30:18 INFO (MainThread) [supervisor.hardware.monitor] Detecting Hard                                                               wareAction.REMOVE serial hardware /dev/ttyACM1 - /dev/serial/by-id/usb-dresden_e                                                               lektronik_ingenieurtechnik_GmbH_ConBee_II_DE2120390-if00
21-07-23 08:30:18 INFO (MainThread) [supervisor.hardware.monitor] Detecting Hard                                                               wareAction.REMOVE usb hardware /dev/bus/usb/001/009
21-07-23 08:30:20 INFO (MainThread) [supervisor.hardware.monitor] Detecting Hard                                                               wareAction.ADD usb hardware /dev/bus/usb/001/010
21-07-23 08:30:20 INFO (MainThread) [supervisor.hardware.monitor] Detecting Hard                                                               wareAction.ADD serial hardware /dev/ttyACM1 - /dev/serial/by-id/usb-dresden_elek                                                               tronik_ingenieurtechnik_GmbH_ConBee_II_DE2120390-if00
21-07-23 08:30:22 INFO (MainThread) [supervisor.hardware.monitor] Detecting Hard                                                               wareAction.REMOVE serial hardware /dev/ttyACM1 - /dev/serial/by-id/usb-dresden_e                                                               lektronik_ingenieurtechnik_GmbH_ConBee_II_DE2120390-if00
21-07-23 08:30:22 INFO (MainThread) [supervisor.hardware.monitor] Detecting Hard                                                               wareAction.REMOVE usb hardware /dev/bus/usb/001/010
21-07-23 08:30:24 INFO (MainThread) [supervisor.hardware.monitor] Detecting Hard                                                               wareAction.ADD usb hardware /dev/bus/usb/001/011
21-07-23 08:30:24 INFO (MainThread) [supervisor.hardware.monitor] Detecting Hard                                                               wareAction.ADD serial hardware /dev/ttyACM1 - /dev/serial/by-id/usb-dresden_elek                                                               tronik_ingenieurtechnik_GmbH_ConBee_II_DE2120390-if00
21-07-23 08:30:39 INFO (MainThread) [supervisor.api.middleware.security] /core/s                                                               tart access from core_ssh
21-07-23 08:30:39 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/docker/api/client.py", line 268,                                                                in _raise_for_status
    response.raise_for_status()
  File "/usr/local/lib/python3.9/site-packages/requests/models.py", line 943, in                                                                raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 404 Client Error: Not Found for url: http+docker:                                                               //localhost/v1.41/images/7ec4b01023fecfa07b6aade2484aea24a67e80a0872a3b38350ad35                                                               abbef438c/json
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/aiohttp/web_protocol.py", line 42                                                               2, in _handle_request
    resp = await self._request_handler(request)
  File "/usr/local/lib/python3.9/site-packages/sentry_sdk/integrations/aiohttp.p                                                               y", line 123, in sentry_app_handle
    reraise(*_capture_exception(hub))
  File "/usr/local/lib/python3.9/site-packages/sentry_sdk/_compat.py", line 54,                                                                in reraise
    raise value
  File "/usr/local/lib/python3.9/site-packages/sentry_sdk/integrations/aiohttp.p                                                               y", line 113, in sentry_app_handle
    response = await old_handle(self, request)
  File "/usr/local/lib/python3.9/site-packages/aiohttp/web_app.py", line 499, in                                                                _handle
    resp = await handler(request)
  File "/usr/local/lib/python3.9/site-packages/aiohttp/web_middlewares.py", line                                                                119, in impl
    return await handler(request)
  File "/usr/src/supervisor/supervisor/api/middleware/security.py", line 137, in                                                                system_validation
    return await handler(request)
  File "/usr/src/supervisor/supervisor/api/middleware/security.py", line 203, in                                                                token_validation
    return await handler(request)
  File "/usr/src/supervisor/supervisor/api/utils.py", line 65, in wrap_api
    answer = await method(api, *args, **kwargs)
  File "/usr/src/supervisor/supervisor/utils/__init__.py", line 33, in wrap_api
    return await method(api, *args, **kwargs)
  File "/usr/src/supervisor/supervisor/homeassistant/core.py", line 266, in star                                                               t
    if await self.instance.is_initialize():
  File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 52, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/supervisor/supervisor/docker/homeassistant.py", line 207, in _i                                                               s_initialize
    if docker_container.image.id != docker_image.id:
  File "/usr/local/lib/python3.9/site-packages/docker/models/containers.py", lin                                                               e 40, in image
    return self.client.images.get(image_id.split(':')[1])
  File "/usr/local/lib/python3.9/site-packages/docker/models/images.py", line 31                                                               6, in get
    return self.prepare_model(self.client.api.inspect_image(name))
  File "/usr/local/lib/python3.9/site-packages/docker/utils/decorators.py", line                                                                19, in wrapped
    return f(self, resource_id, *args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/docker/api/image.py", line 253, i                                                               n inspect_image
    return self._result(
  File "/usr/local/lib/python3.9/site-packages/docker/api/client.py", line 274,                                                                in _result
    self._raise_for_status(response)
  File "/usr/local/lib/python3.9/site-packages/docker/api/client.py", line 270,                                                                in _raise_for_status
    raise create_api_error_from_http_exception(e)
  File "/usr/local/lib/python3.9/site-packages/docker/errors.py", line 31, in cr                                                               eate_api_error_from_http_exception
    raise cls(e, response=response, explanation=explanation)
docker.errors.ImageNotFound: 404 Client Error for http+docker://localhost/v1.41/                                                               images/7ec4b01023fecfa07b6aade2484aea24a67e80a0872a3b38350ad35abbef438c/json: No                                                               t Found ("no such image: 7ec4b01023fecfa07b6aade2484aea24a67e80a0872a3b38350ad35                                                               abbef438c: No such image: sha256:7ec4b01023fecfa07b6aade2484aea24a67e80a0872a3b3                                                               8350ad35abbef438c")

Hopefully something in there can help solve this issue.

EDIT: After the above failures I went back in via SSH and repeated the procedure: ha core stop, ha core update, ha core start and it managed to complete the update to 2021.7.4. The problem still exists in that updating via the GUI is not possible, and even via SSH is hit and miss.

@ludeeus
Copy link
Member

ludeeus commented Jul 26, 2021

Run ha su repair, when that completes do a reboot of the host.

@sparkydave1981
Copy link
Author

I've run a supervisor repair about 4 times now with no change. I'll do it again though anyway.

@sparkydave1981
Copy link
Author

I ran the repair again and received the below in the supervisor log:

21-07-27 08:27:27 INFO (MainThread) [supervisor.core] Starting repair of Supervisor Environment
21-07-27 08:27:27 INFO (SyncWorker_3) [supervisor.docker] Prune stale containers
21-07-27 08:27:32 INFO (SyncWorker_3) [supervisor.docker] Prune stale images
21-07-27 08:27:34 INFO (SyncWorker_3) [supervisor.docker] Prune stale builds
21-07-27 08:27:34 INFO (SyncWorker_3) [supervisor.docker] Prune stale volumes
21-07-27 08:27:34 INFO (SyncWorker_3) [supervisor.docker] Prune stale networks
21-07-27 08:27:34 INFO (SyncWorker_3) [supervisor.docker] Fix stale container on hassio network
21-07-27 08:27:34 INFO (SyncWorker_3) [supervisor.docker] Fix stale container on host network
21-07-27 08:27:34 INFO (MainThread) [supervisor.addons] Found 13 add-ons to repair
21-07-27 08:27:34 INFO (MainThread) [supervisor.addons] Repairing for add-on: a0d7b954_grafana
21-07-27 08:27:34 INFO (SyncWorker_9) [supervisor.docker.interface] Downloading docker image ghcr.io/hassio-addons/grafana/amd64 with tag 7.0.4.
21-07-27 08:28:26 INFO (MainThread) [supervisor.addons] Repairing for add-on: core_duckdns
21-07-27 08:28:26 INFO (SyncWorker_3) [supervisor.docker.interface] Downloading docker image homeassistant/amd64-addon-duckdns with tag 1.13.0.
21-07-27 08:28:37 INFO (MainThread) [supervisor.addons] Repairing for add-on: 40817795_nut
21-07-27 08:28:37 INFO (SyncWorker_11) [supervisor.docker.interface] Downloading docker image hassioaddons/nut-amd64 with tag 4213c06.
21-07-27 08:28:49 INFO (MainThread) [supervisor.addons] Repairing for add-on: a0d7b954_motioneye
21-07-27 08:28:49 INFO (SyncWorker_0) [supervisor.docker.interface] Downloading docker image ghcr.io/hassio-addons/motioneye/amd64 with tag 0.15.0.
21-07-27 08:29:07 INFO (MainThread) [supervisor.addons] Repairing for add-on: a0d7b954_grocy
21-07-27 08:29:07 INFO (SyncWorker_5) [supervisor.docker.interface] Downloading docker image ghcr.io/hassio-addons/grocy/amd64 with tag 0.15.0.
21-07-27 08:29:22 INFO (MainThread) [supervisor.addons] Repairing for add-on: 6a3d001f_assistant_relay
21-07-27 08:29:22 INFO (SyncWorker_8) [supervisor.docker.interface] Downloading docker image apipa169/amd64-hassio-assistant_relay with tag 0.7.4.
21-07-27 08:29:26 INFO (MainThread) [supervisor.addons] Repairing for add-on: f8f3f8ff_gmusicproxy
21-07-27 08:29:26 INFO (SyncWorker_6) [supervisor.docker.addon] Starting build for f8f3f8ff/amd64-addon-gmusicproxy:0.5.1
21-07-27 08:30:27 INFO (SyncWorker_6) [supervisor.docker.addon] Build f8f3f8ff/amd64-addon-gmusicproxy:0.5.1 done
21-07-27 08:30:27 INFO (MainThread) [supervisor.addons] Repairing for add-on: a0d7b954_portainer
21-07-27 08:30:27 INFO (SyncWorker_3) [supervisor.docker.interface] Downloading docker image ghcr.io/hassio-addons/portainer/amd64 with tag 1.5.1.
21-07-27 08:30:35 INFO (MainThread) [supervisor.addons] Repairing for add-on: 15d21743_samba_backup
21-07-27 08:30:35 INFO (SyncWorker_11) [supervisor.docker.interface] Downloading docker image thomasmauerer/samba-backup-amd64 with tag 4.5.0.
21-07-27 08:30:48 INFO (MainThread) [supervisor.addons] Repairing for add-on: a0d7b954_adguard
21-07-27 08:30:48 INFO (SyncWorker_0) [supervisor.docker.interface] Downloading docker image ghcr.io/hassio-addons/adguard/amd64 with tag 4.1.6.
21-07-27 08:30:54 INFO (MainThread) [supervisor.addons] Repairing for add-on: a0d7b954_sonweb
21-07-27 08:30:54 INFO (SyncWorker_1) [supervisor.docker.interface] Downloading docker image ghcr.io/hassio-addons/tasmoadmin/amd64 with tag 0.15.0.
21-07-27 08:30:58 INFO (MainThread) [supervisor.addons] Repairing for add-on: core_check_config
21-07-27 08:30:58 INFO (SyncWorker_4) [supervisor.docker.interface] Downloading docker image homeassistant/amd64-addon-check_config with tag 3.8.0.
21-07-27 08:31:24 INFO (MainThread) [supervisor.addons] Repairing for add-on: c80c7555_caddy-2
21-07-27 08:31:24 INFO (SyncWorker_5) [supervisor.docker.interface] Downloading docker image ghcr.io/einschmidt/caddy-2/amd64 with tag 1.0.3.
21-07-27 08:31:31 INFO (MainThread) [supervisor.supervisor] Repairing Supervisor 2021.06.8
21-07-27 08:31:31 INFO (MainThread) [supervisor.core] Finished repair of Supervisor Environment

I guess now it's a waiting game to see if I can successfully update HA when the next version is released, or when add-ons have an update available. I'll report back soon.

@ludeeus
Copy link
Member

ludeeus commented Jul 27, 2021

Looks good so far, if you have a snapshot you could do a partial restore of an addon to trigger an update.

@sparkydave1981
Copy link
Author

sparkydave1981 commented Jul 29, 2021

I just tried updating ESPhome from 1.20.0 to 1.20.1 and got the usual error again:

Update ESPHome
Are you sure you want to update ESPHome to version 1.20.1?
Snapshot
Create a snapshot of ESPHome before updating
409 Client Error for http+docker://localhost/v1.41/containers/create?name=addon_15ef4d2f_esphome: Conflict ("Conflict. The container name "/addon_15ef4d2f_esphome" is already in use by container "996ff5e05d54db8bfebb3b16ee466648a43c9ed179dc10e5b1e97724fce14af1". You have to remove (or rename) that container to be able to reuse that name.")

So the ha su repair hasn't done anything.

To re-iterate, the error only happens for add-ons that are running. eg: I just successfully updated the ESPhome Beta add-on without any error because it isn't running. The same seems to be the case for HA core, if I stop HA and update via SSH all is fine, it just won't work while HA is running (ie: via the GUI)

@sparkydave1981
Copy link
Author

sparkydave1981 commented Jul 30, 2021

Strangely I just managed to update that same ESPhome Add-on (the main, running one) from v1.20.1 to v1.20.2 without the error.

However, the add-on was then not running after the update and I was unable to manually start the add-on from the GUI:

Failed to start add-on
409 Client Error for http+docker://localhost/v1.41/containers/create?name=addon_15ef4d2f_esphome: Conflict ("Conflict. The container name "/addon_15ef4d2f_esphome" is already in use by container "996ff5e05d54db8bfebb3b16ee466648a43c9ed179dc10e5b1e97724fce14af1". You have to remove (or rename) that container to be able to reuse that name.")

I had to reboot the host to get it running again.

@sparkydave1981
Copy link
Author

sparkydave1981 commented Aug 17, 2021

I just updated the Supervisor from 6.1 to 6.2 (successfully) and then tried to update HA core from 2021.7.4 to 2021.8.7 but got the below errors in the log.

21-08-18 07:52:00 INFO (MainThread) [supervisor.hassos] Rauc: A - marked slot ke                                                                                                 rnel.0 as good
21-08-18 07:52:00 INFO (MainThread) [supervisor.addons] Phase 'AddonStartup.INIT                                                                                                 IALIZE' starting 0 add-ons
21-08-18 07:52:00 INFO (MainThread) [supervisor.addons] Phase 'AddonStartup.SYST                                                                                                 EM' starting 2 add-ons
21-08-18 07:52:00 WARNING (MainThread) [supervisor.addons.options] Option 'anony                                                                                                 mous' does not exist in the schema for Mosquitto broker (core_mosquitto)
21-08-18 07:52:00 INFO (SyncWorker_3) [supervisor.docker.interface] Cleaning add                                                                                                 on_core_mosquitto application
21-08-18 07:52:00 WARNING (SyncWorker_3) [supervisor.addons.options] Option 'ano                                                                                                 nymous' does not exist in the schema for Mosquitto broker (core_mosquitto)
21-08-18 07:52:00 INFO (SyncWorker_3) [supervisor.docker.addon] Starting Docker                                                                                                  add-on homeassistant/amd64-addon-mosquitto with version 6.0.1
21-08-18 07:52:01 INFO (SyncWorker_10) [supervisor.docker.addon] Starting Docker                                                                                                  add-on homeassistant/amd64-addon-mariadb with version 2.4.0
21-08-18 07:52:01 INFO (MainThread) [supervisor.services.modules.mqtt] Set core_                                                                                                 mosquitto as service provider for mqtt
21-08-18 07:52:02 INFO (MainThread) [supervisor.auth] Auth request from 'core_mo                                                                                                 squitto' for 'hassio_mqtt'
21-08-18 07:52:02 INFO (MainThread) [supervisor.auth] Home Assistant not running                                                                                                 , checking cache
21-08-18 07:52:02 INFO (MainThread) [supervisor.services.modules.mysql] Set core                                                                                                 _mariadb as service provider for MySQL
21-08-18 07:52:06 INFO (MainThread) [supervisor.addons] Phase 'AddonStartup.SERV                                                                                                 ICES' starting 6 add-ons
21-08-18 07:52:06 INFO (SyncWorker_3) [supervisor.docker.interface] Cleaning add                                                                                                 on_core_ssh application
21-08-18 07:52:06 INFO (SyncWorker_3) [supervisor.docker.addon] Starting Docker                                                                                                  add-on homeassistant/amd64-addon-ssh with version 9.1.3
21-08-18 07:52:06 INFO (SyncWorker_10) [supervisor.docker.interface] Cleaning ad                                                                                                 don_a0d7b954_unifi application
21-08-18 07:52:06 INFO (SyncWorker_10) [supervisor.docker.addon] Starting Docker                                                                                                  add-on ghcr.io/hassio-addons/unifi/amd64 with version 0.23.2
21-08-18 07:52:06 INFO (SyncWorker_4) [supervisor.docker.interface] Cleaning add                                                                                                 on_a0d7b954_vscode application
21-08-18 07:52:06 INFO (SyncWorker_4) [supervisor.docker.addon] Starting Docker                                                                                                  add-on ghcr.io/hassio-addons/vscode/amd64 with version 3.6.1
21-08-18 07:52:06 INFO (SyncWorker_9) [supervisor.docker.interface] Cleaning add                                                                                                 on_6a3d001f_assistant_relay application
21-08-18 07:52:07 INFO (SyncWorker_9) [supervisor.docker.addon] Starting Docker                                                                                                  add-on apipa169/amd64-hassio-assistant_relay with version None
21-08-18 07:52:07 WARNING (MainThread) [supervisor.addons.options] Option 'inter                                                                                                 face' does not exist in the schema for Samba share (core_samba)
21-08-18 07:52:07 INFO (SyncWorker_1) [supervisor.docker.interface] Cleaning add                                                                                                 on_core_samba application
21-08-18 07:52:07 WARNING (SyncWorker_1) [supervisor.addons.options] Option 'int                                                                                                 erface' does not exist in the schema for Samba share (core_samba)
21-08-18 07:52:07 INFO (SyncWorker_1) [supervisor.docker.addon] Starting Docker                                                                                                  add-on homeassistant/amd64-addon-samba with version 9.5.1
21-08-18 07:52:07 INFO (SyncWorker_3) [supervisor.docker.addon] Starting Docker                                                                                                  add-on homeassistant/amd64-addon-zwave_js with version 0.1.34
21-08-18 07:52:07 INFO (MainThread) [supervisor.api.middleware.security] /networ                                                                                                 k/interface/default/info access from core_samba
21-08-18 07:52:12 INFO (MainThread) [supervisor.core] Start Home Assistant Core
21-08-18 07:52:12 INFO (SyncWorker_4) [supervisor.docker.interface] Starting hom                                                                                                 eassistant
21-08-18 07:52:12 INFO (MainThread) [supervisor.homeassistant.core] Wait until H                                                                                                 ome Assistant is ready
21-08-18 07:52:24 INFO (MainThread) [supervisor.resolution.evaluate] Starting sy                                                                                                 stem evaluation with state CoreState.STARTUP
21-08-18 07:52:24 INFO (MainThread) [supervisor.resolution.evaluate] System eval                                                                                                 uation complete
21-08-18 07:52:27 INFO (MainThread) [supervisor.homeassistant.api] Updated Home                                                                                                  Assistant API token
21-08-18 07:52:45 WARNING (MainThread) [supervisor.addons.options] Option 'anony                                                                                                 mous' does not exist in the schema for Mosquitto broker (core_mosquitto)
21-08-18 07:52:48 INFO (MainThread) [supervisor.homeassistant.core] Detect a run                                                                                                 ning Home Assistant instance
21-08-18 07:52:48 INFO (MainThread) [supervisor.addons] Phase 'AddonStartup.APPL                                                                                                 ICATION' starting 4 add-ons
21-08-18 07:52:48 INFO (SyncWorker_10) [supervisor.docker.interface] Cleaning ad                                                                                                 don_cebe7a76_hassio_google_drive_backup application
21-08-18 07:52:48 INFO (SyncWorker_10) [supervisor.docker.addon] Starting Docker                                                                                                  add-on sabeechen/hassio-google-drive-backup-amd64 with version 0.104.3
21-08-18 07:52:48 INFO (SyncWorker_5) [supervisor.docker.interface] Cleaning add                                                                                                 on_15ef4d2f_esphome application
21-08-18 07:52:48 INFO (SyncWorker_5) [supervisor.docker.addon] Starting Docker                                                                                                  add-on esphome/esphome-hassio-amd64 with version 1.20.4
21-08-18 07:52:48 INFO (SyncWorker_2) [supervisor.docker.interface] Cleaning add                                                                                                 on_00185a40_simplescheduler application
21-08-18 07:52:48 INFO (SyncWorker_2) [supervisor.docker.addon] Starting Docker                                                                                                  add-on 00185a40/amd64-addon-simplescheduler with version 0.30.05
21-08-18 07:52:48 WARNING (SyncWorker_6) [supervisor.docker.addon] Run On Startu                                                                                                 p.d running with disabled protected mode!
21-08-18 07:52:48 INFO (SyncWorker_6) [supervisor.docker.interface] Cleaning add                                                                                                 on_a1308ec6_run_on_startup_addon application
21-08-18 07:52:48 INFO (SyncWorker_6) [supervisor.docker.addon] Starting Docker                                                                                                  add-on a1308ec6/amd64-addon-run_on_startup_addon with version 0.10
21-08-18 07:52:48 INFO (MainThread) [supervisor.api.middleware.security] /core/i                                                                                                 nfo access from cebe7a76_hassio_google_drive_backup
21-08-18 07:52:48 INFO (MainThread) [supervisor.api.middleware.security] /superv                                                                                                 isor/info access from cebe7a76_hassio_google_drive_backup
21-08-18 07:52:48 INFO (MainThread) [supervisor.api.middleware.security] /snapsh                                                                                                 ots access from cebe7a76_hassio_google_drive_backup
21-08-18 07:52:48 INFO (MainThread) [supervisor.api.middleware.security] /snapsh                                                                                                 ots/c4b1c7ea/info access from cebe7a76_hassio_google_drive_backup
21-08-18 07:52:48 INFO (MainThread) [supervisor.api.middleware.security] /snapsh                                                                                                 ots/fdf7df49/info access from cebe7a76_hassio_google_drive_backup
21-08-18 07:52:48 INFO (MainThread) [supervisor.api.middleware.security] /snapsh                                                                                                 ots/e97ba60a/info access from cebe7a76_hassio_google_drive_backup
21-08-18 07:52:48 INFO (MainThread) [supervisor.api.middleware.security] /snapsh                                                                                                 ots/0bbbe422/info access from cebe7a76_hassio_google_drive_backup
21-08-18 07:52:48 INFO (MainThread) [supervisor.api.middleware.security] /snapsh                                                                                                 ots/82361005/info access from cebe7a76_hassio_google_drive_backup
21-08-18 07:52:53 INFO (MainThread) [supervisor.misc.tasks] All core tasks are s                                                                                                 cheduled
21-08-18 07:52:53 INFO (MainThread) [supervisor.core] Supervisor is up and runni                                                                                                 ng
21-08-18 07:52:53 INFO (MainThread) [supervisor.host.info] Updating local host i                                                                                                 nformation
21-08-18 07:52:53 INFO (MainThread) [supervisor.updater] Fetching update data fr                                                                                                 om https://version.home-assistant.io/stable.json
21-08-18 07:52:53 INFO (MainThread) [supervisor.resolution.check] Starting syste                                                                                                 m checks with state CoreState.RUNNING
21-08-18 07:52:53 INFO (MainThread) [supervisor.resolution.checks.base] Run chec                                                                                                 k for IssueType.PWNED/ContextType.ADDON
21-08-18 07:52:53 WARNING (MainThread) [supervisor.addons.options] Option 'anony                                                                                                 mous' does not exist in the schema for Mosquitto broker (core_mosquitto)
21-08-18 07:52:53 WARNING (MainThread) [supervisor.addons.options] Option 'dark_                                                                                                 mode' does not exist in the schema for Node-RED (a0d7b954_nodered)
21-08-18 07:52:53 WARNING (MainThread) [supervisor.addons.options] Option 'requi                                                                                                 re_ssl' does not exist in the schema for Node-RED (a0d7b954_nodered)
21-08-18 07:52:54 INFO (MainThread) [supervisor.host.services] Updating service                                                                                                  information
21-08-18 07:52:54 INFO (MainThread) [supervisor.host.network] Updating local net                                                                                                 work information
21-08-18 07:52:54 WARNING (MainThread) [supervisor.addons.options] Option 'inter                                                                                                 face' does not exist in the schema for Samba share (core_samba)
21-08-18 07:52:54 INFO (MainThread) [supervisor.resolution.checks.base] Run chec                                                                                                 k for IssueType.FREE_SPACE/ContextType.SYSTEM
21-08-18 07:52:54 INFO (MainThread) [supervisor.resolution.checks.base] Run chec                                                                                                 k for IssueType.SECURITY/ContextType.CORE
21-08-18 07:52:54 INFO (MainThread) [supervisor.resolution.check] System checks                                                                                                  complete
21-08-18 07:52:54 INFO (MainThread) [supervisor.resolution.evaluate] Starting sy                                                                                                 stem evaluation with state CoreState.RUNNING
21-08-18 07:52:54 INFO (MainThread) [supervisor.host.sound] Updating PulseAudio                                                                                                  information
21-08-18 07:52:54 INFO (MainThread) [supervisor.host] Host information reload co                                                                                                 mpleted
21-08-18 07:52:57 INFO (MainThread) [supervisor.resolution.evaluate] System eval                                                                                                 uation complete
21-08-18 07:52:57 INFO (MainThread) [supervisor.resolution.fixup] Starting syste                                                                                                 m autofix at state CoreState.RUNNING
21-08-18 07:52:57 INFO (MainThread) [supervisor.resolution.fixup] System autofix                                                                                                  complete
21-08-18 07:53:20 INFO (MainThread) [supervisor.homeassistant.core] Updating Hom                                                                                                 e Assistant to version 2021.8.7
21-08-18 07:53:20 INFO (SyncWorker_0) [supervisor.docker.interface] Updating ima                                                                                                 ge ghcr.io/home-assistant/generic-x86-64-homeassistant:2021.7.4 to ghcr.io/home-                                                                                                 assistant/generic-x86-64-homeassistant:2021.8.7
21-08-18 07:53:20 INFO (SyncWorker_0) [supervisor.docker.interface] Downloading                                                                                                  docker image ghcr.io/home-assistant/generic-x86-64-homeassistant with tag 2021.8                                                                                                 .7.
21-08-18 07:53:38 INFO (MainThread) [supervisor.api.middleware.security] /networ                                                                                                 k/info access from core_ssh
21-08-18 07:53:38 INFO (MainThread) [supervisor.api.middleware.security] /networ                                                                                                 k/info access from core_ssh
21-08-18 07:53:38 INFO (MainThread) [supervisor.api.middleware.security] /host/i                                                                                                 nfo access from core_ssh
21-08-18 07:53:38 INFO (MainThread) [supervisor.api.middleware.security] /core/i                                                                                                 nfo access from core_ssh
21-08-18 07:54:13 INFO (SyncWorker_0) [supervisor.docker.interface] Stopping hom                                                                                                 eassistant application
21-08-18 07:54:28 INFO (SyncWorker_0) [supervisor.docker.interface] Cleaning hom                                                                                                 eassistant application
21-08-18 07:54:33 INFO (MainThread) [supervisor.homeassistant.module] Update pul                                                                                                 se/client.config: /data/tmp/homeassistant_pulse
21-08-18 07:54:33 INFO (SyncWorker_10) [supervisor.docker.interface] Cleaning ho                                                                                                 meassistant application
21-08-18 07:54:38 ERROR (SyncWorker_10) [supervisor.docker] Can't create contain                                                                                                 er from homeassistant: 409 Client Error for http+docker://localhost/v1.41/contai                                                                                                 ners/create?name=homeassistant: Conflict ("Conflict. The container name "/homeas                                                                                                 sistant" is already in use by container "23d5b7d32a6f6c9866ad03f07c4fbc79dd5c3eb                                                                                                 91297b082e3a32745e0376414". You have to remove (or rename) that container to be                                                                                                  able to reuse that name.")
21-08-18 07:54:38 INFO (MainThread) [supervisor.resolution.module] Create new is                                                                                                 sue IssueType.UPDATE_FAILED - ContextType.CORE / None
21-08-18 07:54:38 ERROR (MainThread) [asyncio] Task exception was never retrieve                                                                                                 d
future: <Task finished name='Task-1044' coro=<process_lock.<locals>.wrap_api() d                                                                                                 one, defined at /usr/src/supervisor/supervisor/utils/__init__.py:24> exception=H                                                                                                 omeAssistantUpdateError()>
Traceback (most recent call last):
  File "/usr/src/supervisor/supervisor/utils/__init__.py", line 33, in wrap_api
    return await method(api, *args, **kwargs)
  File "/usr/src/supervisor/supervisor/jobs/decorator.py", line 107, in wrapper
    raise err
  File "/usr/src/supervisor/supervisor/jobs/decorator.py", line 105, in wrapper
    return await self._method(*args, **kwargs)
  File "/usr/src/supervisor/supervisor/homeassistant/core.py", line 240, in upda                                                                                                 te
    raise HomeAssistantUpdateError()
supervisor.exceptions.HomeAssistantUpdateError
21-08-18 07:54:44 INFO (MainThread) [supervisor.api.middleware.security] /superv                                                                                                 isor/logs access from core_ssh

So this is still a problem.

I tried my usual work-around method of stopping HA via SSH, updating, the starting, but this also failed. After a host reboot I noticed this in the log:

21-08-18 08:29:41 INFO (SyncWorker_8) [supervisor.docker.interface] Cleaning hom                                                                                                 eassistant application
21-08-18 08:29:45 ERROR (SyncWorker_8) [supervisor.docker] Image ghcr.io/home-as                                                                                                 sistant/generic-x86-64-homeassistant not exists for homeassistant

@sparkydave1981
Copy link
Author

Well I still can't update HA versions while HA is running (ie: through the GUI). The only solution seems to be to SSH in, stop HA, update, restart. This is crazy.

Is anyone looking at this?

Latest update attempt log:

21-08-30 10:07:32 INFO (MainThread) [supervisor.homeassistant.api] Updated Home                                             Assistant API token
21-08-30 10:07:34 INFO (MainThread) [supervisor.snapshots] Found 5 snapshot file                                            s
21-08-30 10:07:35 INFO (MainThread) [supervisor.snapshots] Found 5 snapshot file                                            s
21-08-30 10:07:43 INFO (MainThread) [supervisor.api.proxy] Home Assistant WebSoc                                            ket API connection is closed
21-08-30 10:07:46 INFO (MainThread) [supervisor.api.proxy] Home Assistant WebSoc                                            ket API request initialize
21-08-30 10:07:46 INFO (MainThread) [supervisor.api.proxy] WebSocket access from                                             a0d7b954_vscode
21-08-30 10:07:46 INFO (MainThread) [supervisor.api.proxy] Home Assistant WebSoc                                            ket API request running
21-08-30 10:08:28 INFO (MainThread) [supervisor.homeassistant.core] Updating Hom                                            e Assistant to version 2021.8.8
21-08-30 10:08:28 INFO (SyncWorker_8) [supervisor.docker.interface] Updating ima                                            ge ghcr.io/home-assistant/generic-x86-64-homeassistant:2021.8.7 to ghcr.io/home-                                            assistant/generic-x86-64-homeassistant:2021.8.8
21-08-30 10:08:28 INFO (SyncWorker_8) [supervisor.docker.interface] Downloading                                             docker image ghcr.io/home-assistant/generic-x86-64-homeassistant with tag 2021.8                                            .8.
21-08-30 10:08:43 INFO (MainThread) [supervisor.api.middleware.security] /networ                                            k/info access from core_ssh
21-08-30 10:08:43 INFO (MainThread) [supervisor.api.middleware.security] /networ                                            k/info access from core_ssh
21-08-30 10:08:43 INFO (MainThread) [supervisor.api.middleware.security] /host/i                                            nfo access from core_ssh
21-08-30 10:08:43 INFO (MainThread) [supervisor.api.middleware.security] /core/i                                            nfo access from core_ssh
21-08-30 10:09:21 INFO (SyncWorker_8) [supervisor.docker.interface] Stopping hom                                            eassistant application
21-08-30 10:09:21 INFO (MainThread) [supervisor.api.proxy] Home Assistant WebSoc                                            ket API error: Received message 8:1000 is not str
21-08-30 10:09:21 INFO (MainThread) [supervisor.api.proxy] Home Assistant WebSoc                                            ket API connection is closed
21-08-30 10:09:37 INFO (SyncWorker_8) [supervisor.docker.interface] Cleaning hom                                            eassistant application
21-08-30 10:09:42 INFO (MainThread) [supervisor.homeassistant.module] Update pul                                            se/client.config: /data/tmp/homeassistant_pulse
21-08-30 10:09:42 INFO (SyncWorker_5) [supervisor.docker.interface] Cleaning hom                                            eassistant application
21-08-30 10:09:47 ERROR (SyncWorker_5) [supervisor.docker] Can't create containe                                            r from homeassistant: 409 Client Error for http+docker://localhost/v1.41/contain                                            ers/create?name=homeassistant: Conflict ("Conflict. The container name "/homeass                                            istant" is already in use by container "72d5e5a8a65b917e43c4b59251144bdc5903bad6                                            fe12c248d3cd62889e937ec0". You have to remove (or rename) that container to be a                                            ble to reuse that name.")
21-08-30 10:09:47 INFO (MainThread) [supervisor.resolution.module] Create new is                                            sue IssueType.UPDATE_FAILED - ContextType.CORE / None
21-08-30 10:09:47 ERROR (MainThread) [asyncio] Task exception was never retrieve                                            d
future: <Task finished name='Task-877743' coro=<process_lock.<locals>.wrap_api()                                             done, defined at /usr/src/supervisor/supervisor/utils/__init__.py:24> exception                                            =HomeAssistantUpdateError()>
Traceback (most recent call last):
  File "/usr/src/supervisor/supervisor/utils/__init__.py", line 33, in wrap_api
    return await method(api, *args, **kwargs)
  File "/usr/src/supervisor/supervisor/jobs/decorator.py", line 107, in wrapper
    raise err
  File "/usr/src/supervisor/supervisor/jobs/decorator.py", line 105, in wrapper
    return await self._method(*args, **kwargs)
  File "/usr/src/supervisor/supervisor/homeassistant/core.py", line 240, in upda                                            te
    raise HomeAssistantUpdateError()
supervisor.exceptions.HomeAssistantUpdateError

@sparkydave1981
Copy link
Author

Updating Supervisor to 2021.09.0 seems to have fixed my issues.

@github-actions github-actions bot locked and limited conversation to collaborators Oct 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants