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

WSL2: docker: Error response from daemon: cgroups: cannot find cgroup mount destination: unknown. #4189

Open
PatrickLang opened this issue Jun 18, 2019 · 3 comments

Comments

@PatrickLang
Copy link
Member

@PatrickLang PatrickLang commented Jun 18, 2019

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.

docker run -it --rm -v /home/user/aks-engine:/go/src/github.com/Azure/aks-engine -w /go/src/github.com/Azure/aks-engine  quay.io/deis/go-dev:v1.22.1 bash
Unable to find image 'quay.io/deis/go-dev:v1.22.1' locally
v1.22.1: Pulling from deis/go-dev
9ff7e2e5f967: Pull complete                                                                                                                                                                      59856638ac9f: Pull complete                                                                                                                                                                      6f317d6d954b: Pull complete                                                                                                                                                                      a9dde5e2a643: Pull complete                                                                                                                                                                      692b28bf9c4d: Pull complete                                                                                                                                                                      5075eab28b88: Pull complete                                                                                                                                                                      Digest: sha256:e872262e17cbc9b562a0d98d7abd75c6ee35eee782f13ba6e0ad0ec5e0b92753
Status: Downloaded newer image for quay.io/deis/go-dev:v1.22.1
docker: Error response from daemon: cgroups: cannot find cgroup mount destination: unknown.
Makefile:55: recipe for target 'dev' failed
make: *** [dev] Error 125
  • What's wrong / what should be happening instead:

This should work consistently.

  • Docker Version
$ docker version
Client:
 Version:           18.09.6
 API version:       1.39
 Go version:        go1.10.8
 Git commit:        481bc77
 Built:             Sat May  4 02:35:57 2019
 OS/Arch:           linux/amd64
 Experimental:      false

Server: Docker Engine - Community
 Engine:
  Version:          18.09.6
  API version:      1.39 (minimum version 1.12)
  Go version:       go1.10.8
  Git commit:       481bc77
  Built:            Sat May  4 01:59:36 2019
  OS/Arch:          linux/amd64
  Experimental:     false
@simmessa

This comment has been minimized.

Copy link

@simmessa simmessa commented Jul 11, 2019

+1

@simmessa

This comment has been minimized.

Copy link

@simmessa simmessa commented Jul 19, 2019

Windows build number: 1903 (OS Build 18932.1000)

Docker version:

Client:
 Version:           18.09.6
 API version:       1.39
 Go version:        go1.10.8
 Git commit:        481bc77
 Built:             Sat May  4 02:35:57 2019
 OS/Arch:           linux/amd64
 Experimental:      false

Server: Docker Engine - Community
 Engine:
  Version:          18.09.6
  API version:      1.39 (minimum version 1.12)
  Go version:       go1.10.8
  Git commit:       481bc77
  Built:            Sat May  4 01:59:36 2019
  OS/Arch:          linux/amd64
  Experimental:     false

Here's some steps to reproduce the bug on my WSL2 / Ubuntu:

Create an image with this Dockerfile:
https://gist.github.com/simmessa/5304c435b62739f4b86946a4f653c1be

docker build . -t wsl2bugimage:latest

docker run -td --name wsl2bug --privileged -p 222:22 wsl2bugimage:latest

At this point running any new container in Docker will result in this error:

docker run -it hello-world
docker: Error response from daemon: cgroups: cannot find cgroup mount destination: unknown.

And you will have to restart wsl just like @PatrickLang explained.

Hope this helps a bit.

Simone.

@mylesagray

This comment has been minimized.

Copy link

@mylesagray mylesagray commented Aug 5, 2019

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 cluster.yaml was this (essentially creating 6 k8s nodes):

kind: Cluster
apiVersion: kind.sigs.k8s.io/v1alpha3
nodes:
- role: control-plane
- role: control-plane
- role: control-plane
- role: worker
- role: worker
- role: worke
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.