-
Notifications
You must be signed in to change notification settings - Fork 0
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
Got exception when needed to restart #3
Comments
Im using socket-proxy for docker host
|
I pushed a fix (0c6057a). You probably started or stopped a container defined outside of a Is Tecnativa/docker-socket-proxy the proxy you are talking about? If so, this project needs the following permissions: |
Thanks alot |
I think using ALLOW_RESTARTS=1 and the latest version fixed everything Great work |
Talked too fast.
|
I've added more log traces. The code doesn't expect (yet) any container to disappear so it won't work if there are services that remove containers (watchtower?) but I suspect it's something else because the proxy API is logging two different container ids in the same error message:
Do you mind trying again and sharing the container logs? Thank you for your patience. |
Just adding a note that watchtower support would be wonderful. |
Yeah, it was the watchtower that updated Gluetun. Gluetun pushed a new release and Watchtower updates it, which caused the whole stack depending on it to lose connection. |
Ok, that makes sense. I'll make the script handle this case and only log an error if a container is not available anymore when we try to restart it, for example because watchtower has updated it, the stack has been rebuilt or the user just removed it with |
After commit 7295fca I don't expect the container to crash if it's trying to restart a container while watchtower is removing and updating it. Please give it a try when possible. |
im still seeing this restarter | 2023-09-28T15:08:03.586274819Z Container gluetun (id cef21da8dee3, service gluetun) restarted
restarter | 2023-09-28T15:08:03.606773656Z The following containers depend on service gluetun and will be restarted in 30 seconds:
restarter | 2023-09-28T15:08:03.608356355Z qbittorrent (id d2543234000c, service qbittorrent)
restarter | 2023-09-28T15:08:38.071354033Z Restarting container qbittorrent (id d2543234000c, service qbittorrent)
restarter | 2023-09-28T15:08:49.117722348Z Could not restart container qbittorrent (id d2543234000c, service qbittorrent) because of error: 500 Server Error for http://socket-proxy:2375/v1.43/containers/d2543234000cc6be03349c23270e65c22135499cdfa6cbd8a1703ac4e2f95406/restart?t=10: Internal Server Error ("Cannot restart container d2543234000cc6be03349c23270e65c22135499cdfa6cbd8a1703ac4e2f95406: No such container: a7a0622a5331c1e838b668c6e7c5ad808c0ca8f78213f95eec29e3d07331b6e6") was after gluetun update from watchtower |
Thank you for taking the time to test the latest version. Do you know if watchtower also updated the qbittorrent container? Here are some things that might help me:
If you prefer, you can reach me on Twitter or Reddit (same username as here). |
Nevermind, I have replicated the issue so there is no need to collect logs, etc. It's the same issue qdm12/deunhealth#11 that Quentin has been working on. I'll read his notes and see if I can do my own implementation. |
restarter | 2023-09-24T12:30:02.509038316Z Traceback (most recent call last): restarter | 2023-09-24T12:30:02.509065623Z File "/usr/src/app/./restarter.py", line 32, in <module> restarter | 2023-09-24T12:30:02.509143644Z service = event["Actor"]["Attributes"]["com.docker.compose.service"] restarter | 2023-09-24T12:30:02.509219177Z ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ restarter | 2023-09-24T12:30:02.509233587Z KeyError: 'com.docker.compose.service'
The text was updated successfully, but these errors were encountered: