System unhealthy because of portainer

Hi there,

I’m using HA for several years in combination of portainer as container manager. Since 2022.10.1 I got an error that my HA installation is unhealthy because of the portainer container. Very strange because I got Portainer running for a long long time.

My system is up to date. Latest version of OS, Portainer etc. And Google didn’t gave me someone else with this strange error.

The error line in my supervisor container is:
22-10-11 06:43:28 ERROR (MainThread) [supervisor.resolution.evaluations.container] Found image in unhealthy image list 'portainer/portainer-ce' on the host

Info about the system:
Debian 11.5
Portainer Community Edition 2.15.1
Home Assistant 2022.10.2
Supervisor 2022.10.0
Frontend 20221006.0

When I try to upgrade my HA, my supervisor is preventing that because of the unhealthy state.
22-10-11 08:16:02 WARNING (MainThread) [supervisor.jobs] 'HomeAssistantCore.update' blocked from execution, system is not healthy

4 Likes

Hi! Same for me. Tried to uninstall Portainer and restarts, but nothing helps. I’m on the same versions as you. Really annoying.

Read the end of it:

2 Likes

login via putty and run
ha jobs options --ignore-conditions healthy

*The system remains unhealthy but it does not block any installation updates.

37 Likes

You are right. Had same problem and solved with your advise.

you are my saviour! thanks a lot!

this deserves more love…(AND SHOULDVE BEEN IN THE RELEASE NOTES/BREAKING CHANGES) It took me a good hour of googling and HA documentation before i found this solution.

4 Likes

Thank you!!! I have rebooted the container and the entire system before finding this!!! thank you.

2 Likes

I’ve had this in my config for a long time and re-executed the command above, but I still cannot update an addon due to some supervisor error.

In the logs I only see:

22-10-26 20:50:26 INFO (MainThread) [supervisor.resolution.evaluate] Starting system evaluation with state CoreState.RUNNING
22-10-26 20:50:26 ERROR (MainThread) [supervisor.resolution.evaluations.container] Found image in unhealthy image list ‘portainer/portainer’ on the host
22-10-26 20:50:26 INFO (MainThread) [supervisor.resolution.evaluate] System evaluation complete
22-10-26 20:50:35 CRITICAL (MainThread) [supervisor.jobs] The following job conditions are ignored and will make the system unstable when they occur: {<JobCondition.HEALTHY: ‘healthy’>}

Is there something different now?

after “ha jobs options -ignore…”
make sure to do a “ha jobs reset” to restore protection, then “ha supervisor restart”

Also. alternative is to just stop portainer in docker, restart supervisor… do whatever you need to in your installation, then restart portainer. “docker stop portainer”, then “ha supervisor restart”, then update or do some stuff then “docker start portainer”. Probably sudo on all of the above.

Permanent fix to stop supervisor from recognizing it is to rename the portainer container and image. Supervisor is just name checking.

Don’t ask for support if you do this but IMO it is idiotic that portainer is now “unhealthy” instead of unsupported. I understand they don’t want to support the problems it can create but blocking updates for portainer users is asinine.

7 Likes

Worked for me. This seems like a lame fix, to turn off an integrity check. I would like to understand the issue.

Thanks for this, it is the best solution so far IMO. And I completely agree, blocking updates for us is not great… it should just be “unsupported” like as it has been before

You can rename the Docker image and container. To do this, stop and delete the running container called portainer-ce and the corresponding image:

docker stop portainer-ce
docker rm portainer-ce
docker image rm portainer/portainer-ce

Then load the latest portainer-ce image, rename it and delete the image named portainer-ce, e.g.:

docker pull portainer/portainer-ce
docker image tag portainer/portainer-ce:latest example/hafen-ce:latest
docker image rm portainer/portainer-ce

The previous Portainer-ce volume remains and is allocated as before when the new container is started:

docker run -d -p 8000:8000 -p 9000:9000 --name hafen-ce --restart always -v /var/run/docker.sock:/var/run/docker.sock -v portainer-ce:/data example/hafen-ce:latest

Of course, you can also create a new volume and move the contents of the old volume to the new one. Once started, Portainer can be reached as before. After restarting the HA host, the error no longer appears in the Supervisor log.

5 Likes

I have had more than portainer on my docker. So i turned off all non home assistant related containers and then restarted home assistant. It worked for me.

@cwoodhouse The issue is that the HA team decided that they don’t want to support anyone running any software that can has privileges above HA and therefore can modify/regulate/throttle HA in any way. Because of portainer’s ability to mess with docker containers, you could mess with HA and cause it to misbehave. Then it’s hard to provide support. Again, this is a reason it should be consider unsupported, not unhealthy and the choice to block folks from upgrading with portainer seems like a poor choice to me. It’s just going to cause folks to find work arounds for their workarounds rather than acknowleding a lack of official support if we break our modified toys.

@cjwazzy Thanks for the explanation. I actually decided to upgrade to HassOS running in VirtualBox VM on Debian 11 running on an old 2012 MacMini. Got HA up and running right away, and HA is quite happy, but my new problem is that VirtualBox and Docker seem to interfere with each other when running simultaneously on Deb 11, so now I can’t run my other apps. Arrgh!

My next hack was to run Proxmox so HA could run in its own VM with HassOS, but Proxmox would not load onto my host machine which is a MacMini 2011. I will just keep going with the hacks listed above. Thanks everybody for the help.