Multiple add-ons fail to start with same error

Hi All,

Recently I have been having a lot of trouble updating my add-ons and getting them started after updates.

eg: Just tried to update VS Code add-on. The add-on appears to have updated despite an error about the container being in use, however it won’t start, giving the below error.

## Failed to start add-on

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.")

Same issue starting ‘Simple Scheduler’ after an update (which also gave the container error during that process)

## Failed to start add-on

409 Client Error for http+docker://localhost/v1.41/containers/create?name=addon_00185a40_simplescheduler: Conflict ("Conflict. The container name "/addon_00185a40_simplescheduler" is already in use by container "d75fd9128762a5de36d9ad190f987d565bbb1b4c3b167ec108d90c9fb1b6f301". You have to remove (or rename) that container to be able to reuse that name.")

I’ve restarted HA but it didn’t help. Running HA OS 6.1, core version 2021.6.3, supervisor version 2021.6.8 on NUC.

From the Supervisor log: (basically as per above)

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")

Any ideas?

Weird. Did you try removing the addon completely and then adding it again?

Not yet. Given that it seems to occur for any running add-on I figure it’s some sort of bug in the Supervisor rather than anything to do with any particular add-on.

could be supervisor but I assume you are on 2021.06.8 for supervisor? Working ok here.

I’ve not had any issues updating those addons using the NUC image. Are you running the NUC image or supervised?

Tried a host reboot?

The portainer addon might shed some light too. Stop the addons and check that they have stopped with portainer.

1 Like

Yes, stated above.

Running NUC/generic image.

A host reboot seems to have restarted the add-ons with the updated versions. Very odd.

I had a lot of trouble updating HA OS to the next major version in recent times with the same sort of issue, containers claiming the name is in use. Not sure what to do to get things happy again. Everything works once I finally get the updates complete, it’s just a pain getting there

I’m coming back to this as it appears to be bigger than just add-ons. When I tried to upgrade HA from 2021.6.x to 2021.7.1 I faced the same issue as the 2021.5.x to 2021.6.x where HA would not load after the update. On connecting via SSH I found that HA thought it was happily running the newer version. Rebooting the host proved the only way to get HA fully functioning with GUI, but then it had reverted to the old version (in both instances of recent major releases).

The fix (both the last major releases) was to login via SSH, stop HA, upgrade, restart HA.

Point releases seem to upgrade without any issue.

My add-ons are still giving me the above errors (409 client error… conflict, container name already in use), however they DO actually upgrade…sometimes… not all the time, other times a host reboot is required.

Created an issue on Github as I have not been able to update HA core from 2021.7.2 to 2021.7.3 without doing it again via SSH.