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 not available anymore #104

Closed
derekoharrow opened this issue Jun 27, 2022 · 8 comments
Closed

Container not available anymore #104

derekoharrow opened this issue Jun 27, 2022 · 8 comments

Comments

@derekoharrow
Copy link

I've restarted/recreated some containers due to issues I had with them (which I have to do fairly often for a small set of containers).
After having done this I get lots of instances of the following in the log file. I'm guessing monitor_docker is trying to track containers by their container id but re-creating them means that they are now different containers.

2022-06-27 13:18:36 ERROR (Thread-4) [custom_components.monitor_docker.helpers] [Docker] transmission: Container not available anymore (3) (DockerError(404, 'No such container: 4ca29d2f5523de93fe73d8ebf13b1a3e2c5ac4131058a9c144934dbeb8c97adb'))
Traceback (most recent call last):
  File "/config/custom_components/monitor_docker/helpers.py", line 751, in _run
    await self._run_container_info()
  File "/config/custom_components/monitor_docker/helpers.py", line 794, in _run_container_info
    raw = await self._container.show()
  File "/usr/local/lib/python3.9/site-packages/aiodocker/containers.py", line 177, in show
    data = await self.docker._query_json(
  File "/usr/local/lib/python3.9/site-packages/aiodocker/docker.py", line 300, in _query_json
    async with self._query(
  File "/usr/local/lib/python3.9/site-packages/aiodocker/utils.py", line 309, in __aenter__
    resp = await self._coro
  File "/usr/local/lib/python3.9/site-packages/aiodocker/docker.py", line 275, in _do_query
    raise DockerError(response.status, json.loads(what.decode("utf8")))
aiodocker.exceptions.DockerError: DockerError(404, 'No such container: 4ca29d2f5523de93fe73d8ebf13b1a3e2c5ac4131058a9c144934dbeb8c97adb')

Restarting Home Assistant fixes the problem, but only until I have to recreate a container again.

@attila123456
Copy link

Same here, most containers are updated automatically by watchtower, and the log just blows up afterwards with thousands of these errors.

@ualex73
Copy link
Owner

ualex73 commented Nov 25, 2022

@attila123456 The containers have a new name or the same name?

@DcR-NL
Copy link

DcR-NL commented Nov 25, 2022

@ualex73 Same issue here, and yes, they have the same name.

@derekoharrow
Copy link
Author

@ualex73 I think it is something to do with the container ID.

When you stop and restart a container, my understanding is that it keeps the same ID.

However, when you re-create a container, such as after pulling a new image down, it get's a new container ID.

I think this is what it is complaining about - it says the container (based on ID) no longer exists. This is technically true, but it has been replaced with a new container ID, but using the same name.

@derekoharrow
Copy link
Author

Any update or progress on this at all?

@dapuzz
Copy link

dapuzz commented Jan 23, 2023

Is perhaps possible to reload the integration in order to refresh the containers list with current ID?
Thanks

@ualex73
Copy link
Owner

ualex73 commented May 17, 2024

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

@ualex73 ualex73 closed this as completed May 23, 2024
@ualex73
Copy link
Owner

ualex73 commented May 23, 2024

I will close this old issue. If still persists, please open a new issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants