-
Notifications
You must be signed in to change notification settings - Fork 897
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
Stopping containers doesn't work on Ubuntu 23.10 #1891
Comments
Hi there! 👋🏼 As you're new to this repo, we'd like to suggest that you read our code of conduct as well as our contribution guidelines. Thanks a bunch for opening your first issue! 🙏 |
Same here, came after my upgrade to ubuntu 23.10. |
Yeah, seems to be related to apparmor permissions. Perhaps @simskij has some insights? |
Here is a kernel log that happened when watchtower got the error
|
This bug contains some more info (not on Ubuntu 23.10, so I cannot test it unfortunately): I guess we need to allow watchtower/docker to send signals using an apparmor rule somehow. I have very little experience with apparmor though :/ |
Looks like this change fixes the issue
and then tell apparmor to reload the modified profile by running
|
I don't have a /etc/apparmor.d/docker profile, according to aa-status I have a docker-default profile, however cannot find that in /etc/apparmor.d/ ps. from my short research I think the correct way would be to create a new profile and pass that to Watchtower as a security option (https://docker-docs.uclv.cu/engine/security/apparmor/) |
same issue here - ubuntu 23.10 |
Since the default AppArmor profile is generated dynamically you will not be able to edit it, or (afaik) even read its current contents. Could anyone on an older version share their |
No need for that. Just reinstall docker and everything works...
Wysłano z Samsung w Plus
Sent from Outlook for Android<https://aka.ms/AAb9ysg>
…________________________________
From: Quinten ***@***.***>
Sent: Sunday, January 21, 2024 3:18:53 PM
To: containrrr/watchtower ***@***.***>
Cc: lukaszzyla ***@***.***>; Comment ***@***.***>
Subject: Re: [containrrr/watchtower] Stopping containers doesn't work on Ubuntu 23.10 (Issue #1891)
Docker automatically generates and loads a default profile for containers named docker-default. On Docker versions 1.13.0 and later, the Docker binary generates this profile in tmpfs and then loads it into the kernel. On Docker versions earlier than 1.13.0, this profile is generated in /etc/apparmor.d/docker instead.
Since the default AppArmor profile is generated dynamically you will not be able to edit it, or (afaik) even read its current contents. Could anyone on an older version share their /etc/apparmor.d/docker so we can use it as template to create a modified AppArmor profile for watchtower?
—
Reply to this email directly, view it on GitHub<#1891 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AI2CO7LPAOPYKVH5AFPILNLYPUPU3AVCNFSM6AAAAABBEMODP6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMBSGY2DGOBVHE>.
You are receiving this because you commented.Message ID: ***@***.***>
|
Ok, a little bit more context would be great. what did you do? Apt reinstall docker.io did not work. |
Google for it.
Basically apt remove packages and apt install them again.
Do not remove your volumes and images and everything you already have will still be there afterwards.
Sorry i cannot provide you the exact link now but this should be enough
sudo apt-get remove docker docker-engine docker.io
And then reinstall.
Or find a good guide on installing docker from scratch and do it backwards first.
Wysłano z Samsung w Plus
Sent from Outlook for Android<https://aka.ms/AAb9ysg>
…________________________________
From: danst0 ***@***.***>
Sent: Sunday, January 21, 2024 7:31:24 PM
To: containrrr/watchtower ***@***.***>
Cc: lukaszzyla ***@***.***>; Comment ***@***.***>
Subject: Re: [containrrr/watchtower] Stopping containers doesn't work on Ubuntu 23.10 (Issue #1891)
Ok, a little bit more context would be great. what did you do? Apt reinstall docker.io did not work.
—
Reply to this email directly, view it on GitHub<#1891 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AI2CO7JR746KA2YHOWBTCVDYPVNHZAVCNFSM6AAAAABBEMODP6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMBSG4ZDCNBSHE>.
You are receiving this because you commented.Message ID: ***@***.***>
|
Ok. My install of 23.10 is quite new. Why should that work?Am 21.01.2024 um 22:15 schrieb lukaszzyla ***@***.***>:
Google for it.
Basically apt remove packages and apt install them again.
Do not remove your volumes and images and everything you already have will still be there afterwards.
Sorry i cannot provide you the exact link now but this should be enough
sudo apt-get remove docker docker-engine docker.io
And then reinstall.
Or find a good guide on installing docker from scratch and do it backwards first.
Wysłano z Samsung w Plus
Sent from Outlook for Android<https://aka.ms/AAb9ysg>
…________________________________
From: danst0 ***@***.***>
Sent: Sunday, January 21, 2024 7:31:24 PM
To: containrrr/watchtower ***@***.***>
Cc: lukaszzyla ***@***.***>; Comment ***@***.***>
Subject: Re: [containrrr/watchtower] Stopping containers doesn't work on Ubuntu 23.10 (Issue #1891)
Ok, a little bit more context would be great. what did you do? Apt reinstall docker.io did not work.
—
Reply to this email directly, view it on GitHub<#1891 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AI2CO7JR746KA2YHOWBTCVDYPVNHZAVCNFSM6AAAAABBEMODP6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMBSG4ZDCNBSHE>.
You are receiving this because you commented.Message ID: ***@***.***>
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: ***@***.***>
|
There is some problem with docker default profile. Happened to me after update.
Nevertheless - uninstalling and reinstalling should create new default.profile - at lear that was my thinking after seeing the problem. And it was solved as currently watchtower does the job correctly.
Wysłano z Samsung w Plus
Sent from Outlook for Android<https://aka.ms/AAb9ysg>
…________________________________
From: danst0 ***@***.***>
Sent: Monday, January 22, 2024 6:03:48 AM
To: containrrr/watchtower ***@***.***>
Cc: lukaszzyla ***@***.***>; Comment ***@***.***>
Subject: Re: [containrrr/watchtower] Stopping containers doesn't work on Ubuntu 23.10 (Issue #1891)
Ok. My install of 23.10 is quite new. Why should that work?Am 21.01.2024 um 22:15 schrieb lukaszzyla ***@***.***>:
Google for it.
Basically apt remove packages and apt install them again.
Do not remove your volumes and images and everything you already have will still be there afterwards.
Sorry i cannot provide you the exact link now but this should be enough
sudo apt-get remove docker docker-engine docker.io
And then reinstall.
Or find a good guide on installing docker from scratch and do it backwards first.
Wysłano z Samsung w Plus
Sent from Outlook for Android<https://aka.ms/AAb9ysg>
________________________________
From: danst0 ***@***.***>
Sent: Sunday, January 21, 2024 7:31:24 PM
To: containrrr/watchtower ***@***.***>
Cc: lukaszzyla ***@***.***>; Comment ***@***.***>
Subject: Re: [containrrr/watchtower] Stopping containers doesn't work on Ubuntu 23.10 (Issue #1891)
Ok, a little bit more context would be great. what did you do? Apt reinstall docker.io did not work.
—
Reply to this email directly, view it on GitHub<#1891 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AI2CO7JR746KA2YHOWBTCVDYPVNHZAVCNFSM6AAAAABBEMODP6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMBSG4ZDCNBSHE>.
You are receiving this because you commented.Message ID: ***@***.***>
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: ***@***.***>
—
Reply to this email directly, view it on GitHub<#1891 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AI2CO7PCJ5QGRE62KBKC5BLYPXXLJAVCNFSM6AAAAABBEMODP6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMBTGI3DEOBVHA>.
You are receiving this because you commented.Message ID: ***@***.***>
|
There is not package docker or docker-engine. reinstall did not work. Still looking for a solution. |
Install Docker Engine on Ubuntu | Docker Docs<https://docs.docker.com/engine/install/ubuntu/>
just follow the first commands to uninstall everything.
do not forget sudo
for pkg in docker.io docker-doc docker-compose docker-compose-v2 podman-docker containerd runc; do sudo apt-get remove $pkg; done
…________________________________
From: danst0 ***@***.***>
Sent: 23 January 2024 9:01 PM
To: containrrr/watchtower ***@***.***>
Cc: lukaszzyla ***@***.***>; Comment ***@***.***>
Subject: Re: [containrrr/watchtower] Stopping containers doesn't work on Ubuntu 23.10 (Issue #1891)
There is not package docker or docker-engine. reinstall did not work. Still looking for a solution.
—
Reply to this email directly, view it on GitHub<#1891 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AI2CO7NH6C7YPEGMANQO423YQAJIVAVCNFSM6AAAAABBEMODP6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMBWHAZDSNBZGY>.
You are receiving this because you commented.Message ID: ***@***.***>
|
Doing the complete reinstall (but skipping the cleanup of old containers/images/volumes) worked for me. |
Complete uninstall, reinstall didn't work here. |
hi, sorry to hear that.
This is strange, as we have the similar setup and similar problem.
I am also on ubuntu 23.10 and it did the trick for me. are you sure you haven't tried other solutions that could have influenced your setup/config?
maybe your problem is also connected to missing apparmor?
Can you check sudo apparmor_status ?
I can see that watchtower has docker-default profile defined in apparmor_status:
41 processes have profiles defined.
41 processes are in enforce mode.
/watchtower (1480) docker-default
I am not a specialist in linux but I remember I did install apparmor which I did not have before.
…________________________________
From: danst0 ***@***.***>
Sent: 24 January 2024 8:54 PM
To: containrrr/watchtower ***@***.***>
Cc: lukaszzyla ***@***.***>; Comment ***@***.***>
Subject: Re: [containrrr/watchtower] Stopping containers doesn't work on Ubuntu 23.10 (Issue #1891)
Complete uninstall, reinstall didn't work here.
—
Reply to this email directly, view it on GitHub<#1891 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AI2CO7PJWVOPBBDUIIIL653YQFRHLAVCNFSM6AAAAABBEMODP6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMBYHAYTQNBXGQ>.
You are receiving this because you commented.Message ID: ***@***.***>
|
Seems to be.
|
I can't be of much help here.
|
Hi,
The file |
As a temporary patch on my system, I disabled the apparmor rules for /usr/sbin/runc Following the documentation to disable one single apparmor profile (link on help.ubuntu.com: Disable one profile ) :
docker can now send signals to its containers. re-activating is documented in the next paragraph in the page above:
docker stop will not be able to send a signal to its containers anymore. (repost of my comment on the launchpad issue) note: if anyone has a better fix (something that would only target the action of runc on docker containers for example ?) I'm interested |
@LeGEC There has been some activity on the Launchpad Issue and the fixes have been merged in the upstream projects (Moby and containerd). The fix that worked for me is to do the following:
|
I had a similar issue with a bare metal installation of Kubernetes. After upgrading to Ubuntu 23.10, my cluster was in a bad state and rebooting it with runc did not terminate successfully: exit status 1: unable to signal init: permission denied My solution was not only to re-install Re-installing |
@kprinssu Thank you very much for posting the solution here. First, it did not work for me, and I was a bit frustrated because I've been searching for months. I managed to look into the apparmor message about the denial today and saw that for me the peer is not Yay, finally. :-) |
The issue: SIGTERM is not catched inside a container (Mint 22). |
It happens on Ubuntu 24.04(Kubeneters 1.30). But I never test on new versions.
|
I fixed it by running |
I have the same error |
The issue seems to be on ubuntu release greater than 22.04. I have created a Kubernetes cluster on ubuntu 24.04 and I'm facint this issue. I do a new deployment and the previous one's pods won't terminate. Logs below if anyone can help me. My Kubernetes is on Ubuntu 24.04. Warning FailedKillPod 3m48s (x14 over 13m) kubelet error killing pod: [failed to "KillContainer" for "redacted" with KillContainerError: "rpc error: code = Unknown desc = failed to kill container "98837f85dacd8fdce140338e77f0b8cd2439b4c0e9c901d9fc6467c24d428db0": unknown error after kill: runc did not terminate successfully: exit status 1: unable to signal init: permission denied\n: unknown", failed to "KillPodSandbox" for "67d219c5-00dc-4405-840f-148bd60d32d2" with KillPodSandboxError: "rpc error: code = Unknown desc = failed to stop container "98837f85dacd8fdce140338e77f0b8cd2439b4c0e9c901d9fc6467c24d428db0": failed to kill container "98837f85dacd8fdce140338e77f0b8cd2439b4c0e9c901d9fc6467c24d428db0": unknown error after kill: runc did not terminate successfully: exit status 1: unable to signal init: permission denied\n: unknown"] |
You probably also need to adjust the apparmor profile, like so many of us. Read this post and the linked issue. It explains what you can do. |
I tried that but that didn't help. |
This quick fix worked for me. Thank you! -- Ubuntu 24.04.1 LTS |
Thank you, this works for me. |
Describe the bug
Several weeks ago I noticed errors from watchtower when updating other containers. At first I thought the container was taking too long to exit, so I added a --stop-timeout=60s to the watchtower command, but that didn't help. Looking more info the logs, I see that it gets the error right way after trying to stop the container. This happens when trying to update different containers. I can manually restart then just fine.
Not certain, but this issue might have started after upgrading from Ubuntu 23.04 to Ubuntu 23.10. Or possibly after the most recent watchtower update
Steps to reproduce
(see full log below)
Expected behavior
Expected that watchtower can successfully kill (and restart) containers.
Screenshots
No response
Environment
Your logs
Additional context
No response
The text was updated successfully, but these errors were encountered: