ualex73 / monitor_docker

Monitor Docker containers from Home Assistant
Apache License 2.0
301 stars 37 forks source link

Recreating a docker container causes errors looking for old one until reboot #122

Closed bartowski1182 closed 6 months ago

bartowski1182 commented 1 year ago

When I bring a docker container down and back up, I see my logs spammed with:

2023-04-21 16:16:03.098 ERROR (Thread-2 (RunDocker)) [custom_components.monitor_docker.helpers] [Docker] teslamate_teslamate_1: Container not available anymore (3) (DockerError(404, 'No such container: bc556f452791ea270bf943e754ba42a4c55426700f7997113be784fc7b4a8772'))

The annoying part is that the sensors are updated fine and are able to bind to the new docker container, despite the errors in the logs. Can we either get a fix for this or a way restart the monitor_docker integration?

AlexKusnezov commented 1 year ago

same here, thanks for pointing it out

derekoharrow commented 1 year ago

Duplicate of #104

I've raised a new request (#124) asking to add a reload capability which would at least avoid the need to restart HA.

ualex73 commented 6 months ago

Can you test the latest version, I believe it is fixed in this one. If confirmed, I will make a new version.

derekoharrow commented 6 months ago

Looking good so far. I have only been running it for about 30 minutes, but have killed and re-created some containers and it seems to be ok.

ualex73 commented 6 months ago

Sounds like a good test 👍

ualex73 commented 6 months ago

No negative response, so I will close this ticket :-) if it happens again, please raise a new ticket with info.