-
Notifications
You must be signed in to change notification settings - Fork 829
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
WSL2: docker: Error response from daemon: cgroups: cannot find cgroup mount destination: unknown. #4189
Comments
+1 |
Windows build number: 1903 (OS Build 18932.1000) Docker version:
Here's some steps to reproduce the bug on my WSL2 / Ubuntu: Create an image with this Dockerfile:
At this point running any new container in Docker will result in this error:
And you will have to restart wsl just like @PatrickLang explained. Hope this helps a bit. Simone. |
I encountered this too - the "fix" was running this in WSL: sudo mkdir /sys/fs/cgroup/systemd
sudo mount -t cgroup -o none,name=systemd cgroup /sys/fs/cgroup/systemd Not really a viable fix, but it made my command work. My environment: Client: Docker Engine - Community
Version: 19.03.1
API version: 1.40
Go version: go1.12.5
Git commit: 74b1e89
Built: Thu Jul 25 21:21:05 2019
OS/Arch: linux/amd64
Experimental: false
Server: Docker Engine - Community
Engine:
Version: 19.03.1
API version: 1.40 (minimum version 1.12)
Go version: go1.12.5
Git commit: 74b1e89
Built: Thu Jul 25 21:19:41 2019
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.2.6
GitCommit: 894b81a4b802e4eb2a91d1ce216b8817763c29fb
runc:
Version: 1.0.0-rc8
GitCommit: 425e105d5a03fabd737a126ad93d62a9eeede87f
docker-init:
Version: 0.18.0
GitCommit: fec3683 The command I was running that caused it to error (interestingly, on my system it seemed to be a system load based error, only under high demand did I see this. kind create cluster --config cluster.yaml Where kind: Cluster
apiVersion: kind.sigs.k8s.io/v1alpha3
nodes:
- role: control-plane
- role: control-plane
- role: control-plane
- role: worker
- role: worker
- role: worke |
Windows 2004 (19041.12)
@mylesagray 's fix works for me. |
Windows 2004 (19041.153( Same as @chris-han and also solved with @mylesagray fix. |
For anyone else who found their way to this issue, I just thought it would be worth mentioning that Docker Desktop (or at least the beta version) has quite a nice integration with WSL. You install it, then there is an option under "Resources > WSL Integration" where you can select which distros you want to use it with. For me the default was already selected. Thought it would be worth mentioning, as it seems like less trouble than trying than getting the daemon running properly within your WSL instance. I guess the downside is you end up running multiple VMs instead of one, but I'll take that for a pain-free setup. |
Awesome ! Thank's |
But if you want to use this for running kind and you care about being able to access your "nodes" by private IP, then this is not possible using the Docker Desktop Edge for Windows with WSL2 backend. |
The real MVP. |
@Tacfarinas . Right! This fix also solves this problem in the "native docker as service" on CentOS7 distro 👍 |
this worked for me too |
This guy is a legend |
my wrong information
The solved solution
successfully。 The reason i guess that in the "apt-get install docker-ce=17.03.1 |
Thank you :). This solution worked for me, for the same issue i.e.
docker version
Client: Docker Engine - Community
Version: 19.03.14
API version: 1.40
Go version: go1.13.15
Git commit: 5eb3275d40
Built: Tue Dec 1 19:20:26 2020
OS/Arch: linux/amd64
Experimental: false
Server: Docker Engine - Community
Engine:
Version: 19.03.14
API version: 1.40 (minimum version 1.12)
Go version: go1.13.15
Git commit: 5eb3275d40
Built: Tue Dec 1 19:18:53 2020
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.3.9
GitCommit: ea765aba0d05254012b0b9e595e995c09186427f
runc:
Version: 1.0.0-rc10
GitCommit: dc9208a3303feef5b3839f4323d9beb36df0a9dd
docker-init:
Version: 0.18.0
GitCommit: fec3683 |
The "fix": sudo mkdir /sys/fs/cgroup/systemd
sudo mount -t cgroup -o none,name=systemd cgroup /sys/fs/cgroup/systemd Works for me on Gentoo Linux with OpenRC insted of |
Yes this is the fix |
Hi! I have a fix in my ubuntu |
works for me too....big thanks |
"This Dockerfile" (for some values of 'this' as with the OP) is key here. Some containers expect cgroups to be set up just-so, other containers will not. There are 32 likes on submission as of this writing, so call it feature request "WSL |
Thanks you so much, that work for me |
docker run hello-world
Same problem |
I also had this issue in the past. Usually the fix mentioned works fine:
However today, for some reason it didn't.
|
Set up some housekeeping to run on every domain start. Only do the minimal still for a usable SEL environment * install additional packages * install the current /etc/selrc * Include work-around for microsoft/WSL#4189 * set hostname to WSL distro name * run /etc/rc.local Signed-off-by: Dean Troyer <dean.troyer@salad.com>
Set up some housekeeping to run on every domain start. Only do the minimal still for a usable SEL environment * install additional packages * install the current /etc/selrc * Include work-around for microsoft/WSL#4189 * set hostname to WSL distro name * run /etc/rc.local Signed-off-by: Dean Troyer <dean.troyer@salad.com>
Set up some housekeeping to run on every domain start. Only do the minimal still for a usable SEL environment * install additional packages * install the current /etc/selrc * Include work-around for microsoft/WSL#4189 * set hostname to WSL distro name * run /etc/rc.local Signed-off-by: Dean Troyer <dean.troyer@salad.com>
Set up some housekeeping to run on every domain start. Only do the minimal still for a usable SEL environment * install additional packages * install the current /etc/selrc * Include work-around for microsoft/WSL#4189 * set hostname to WSL distro name * run /etc/rc.local Signed-off-by: Dean Troyer <dean.troyer@salad.com>
Set up some housekeeping to run on every domain start. Only do the minimal still for a usable SEL environment * install additional packages * install the current /etc/selrc * Include work-around for microsoft/WSL#4189 * set hostname to WSL distro name * run /etc/rc.local Signed-off-by: Dean Troyer <dean.troyer@salad.com>
Set up some housekeeping to run on every domain start. Only do the minimal still for a usable SEL environment * install additional packages * install the current /etc/selrc * Include work-around for microsoft/WSL#4189 * set hostname to WSL distro name * run /etc/rc.local Signed-off-by: Dean Troyer <dean.troyer@salad.com>
Please fill out the below information:
Your Windows build number: 18912
What you're doing and what's happening:
Intermittently, Docker CE quits working with a cgroup error. If I run
wsl --shutdown
then restart Ubuntu, it will work again.This should work consistently.
The text was updated successfully, but these errors were encountered: