Skip to content

cgroups: cannot found cgroup mount destination: unknown #219

Open

Description

@xgenvn
  • This is a bug report
  • This is a feature request
  • I searched existing issues before opening this one

Expected behavior

docker run hello-world

should run normally.

Actual behavior

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

Steps to reproduce the behavior

Install latest stable or edge builds (17.12 or 18.01), using:
https://docs.docker.com/install/linux/docker-ce/ubuntu/

Output of docker version:

Client:                                    
 Version:       18.01.0-ce                 
 API version:   1.35                       
 Go version:    go1.9.2                    
 Git commit:    03596f5                    
 Built: Wed Jan 10 20:11:05 2018           
 OS/Arch:       linux/amd64                
 Experimental:  false                      
 Orchestrator:  swarm                      
                                           
Server:                                    
 Engine:                                   
  Version:      18.01.0-ce                 
  API version:  1.35 (minimum version 1.12)
  Go version:   go1.9.2                    
  Git commit:   03596f5                    
  Built:        Wed Jan 10 20:09:37 2018   
  OS/Arch:      linux/amd64                
  Experimental: false                      

Output of docker info:

Containers: 16                                                                    
 Running: 0                                                                       
 Paused: 0                                                                        
 Stopped: 16                                                                      
Images: 1                                                                         
Server Version: 18.01.0-ce                                                        
Storage Driver: overlay2                                                          
 Backing Filesystem: extfs                                                        
 Supports d_type: true                                                            
 Native Overlay Diff: true                                                        
Logging Driver: json-file                                                         
Cgroup Driver: cgroupfs                                                           
Plugins:                                                                          
 Volume: local                                                                    
 Network: bridge host macvlan null overlay                                        
 Log: awslogs fluentd gcplogs gelf journald json-file logentries splunk syslog    
Swarm: inactive                                                                   
Runtimes: runc                                                                    
Default Runtime: runc                                                             
Init Binary: docker-init                                                          
containerd version: 89623f28b87a6004d4b785663257362d1658a729                      
runc version: b2567b37d7b75eb4cf325b77297b140ea686ce8f                            
init version: 949e6fa                                                             
Security Options:                                                                 
 seccomp                                                                          
  Profile: default                                                                
Kernel Version: 4.4.0                                                             
Operating System: Ubuntu 16.04.3 LTS                                              
OSType: linux                                                                     
Architecture: x86_64                                                              
CPUs: 1                                                                           
Total Memory: 512MiB                                                              
Name: SRV_01                                                                      
ID: BBRL:P36V:7QOO:IRBR:X2TC:UC47:4L7N:IIIQ:OLSL:KWS2:OVAZ:TKKF                   
Docker Root Dir: /var/lib/docker                                                  
Debug Mode (client): false                                                        
Debug Mode (server): false                                                        
Registry: https://index.docker.io/v1/                                             
Labels:                                                                           
Experimental: false                                                               
Insecure Registries:                                                              
 127.0.0.0/8                                                                      
Live Restore Enabled: false                                                       
                                                                                  
WARNING: No cpuset support                                                        
WARNING: bridge-nf-call-iptables is disabled                                      
WARNING: bridge-nf-call-ip6tables is disabled                                     

Additional environment details (AWS, VirtualBox, physical, etc.)

> uname -a

Linux DAAA_S1 4.4.0 #1 SMP Fri Jan 5 21:20:16 MSK 2018 x86_64 x86_64 x86_64 GNU/Linux
> ls /sys/fs/cgroup/
beancounter  cpu          cpuacct  freezer  memory   net_cls,net_prio  perf_event  systemd
blkio        cpu,cpuacct  devices  hugetlb  net_cls  net_prio          pids        ve

AppArmor is also deactivated.
Running under root terminal/normal terminal returns same issue.
Docker pull is working.
Confirmed working under 17.09.1~ce-0~ubuntu

Activity

  1. adriantunez commented on Feb 13, 2018

    @adriantunez

    Hi @xgenvn, have you fixed that issue? I'm at the same point but it occurs when docker is ran by a pipeline using gitlab ci/cd... Not sure if in my case it is a docker or a gitlab related issue

  2. xgenvn commented on Feb 13, 2018

    @xgenvn
    Author

    @AdrianAntunez I installed specific version: 17.09.1~ce-0~ubuntu and it's working fine now.

  3. adriantunez commented on Feb 15, 2018

    @adriantunez

    @xgenvn I will give it a try ASAP and I will let you know if it worked for me or not. Thx!!

  4. philippbussche commented on Mar 17, 2018

    @philippbussche

    @AdrianAntunez ran into the same issue, it is working with this configuration for me:

    image: docker:17.09

    services:
    - docker:17.09-dind

  5. hectornevarez commented on Mar 17, 2018

    @hectornevarez

    Same issue here, I'm running:

    Version: 17.12.1-ce
    API version: 1.35
    Go version: go1.9.4
    Git commit: 7390fc6
    Built: Tue Feb 27 22:17:40 2018
    OS/Arch: linux/amd64

  6. jkbaseer commented on Mar 20, 2018

    @jkbaseer

    @philippbussche hey philip, so only the docker was a problem is it? Am also facing the same problem

    My version

    `Client:
    Version: 17.12.0-ce
    API version: 1.35
    Go version: go1.9.2
    Git commit: c97c6d6
    Built: Wed Dec 27 20:03:51 2017
    OS/Arch: darwin/amd64

    Server:
    Engine:
    Version: 17.12.0-ce
    API version: 1.35 (minimum version 1.12)
    Go version: go1.9.2
    Git commit: c97c6d6
    Built: Wed Dec 27 20:12:29 2017
    OS/Arch: linux/amd64
    Experimental: true
    `

    For me Docker Hello World is working without a issue though.

  7. dinar-dalvi commented on Mar 22, 2018

    @dinar-dalvi

    I ran into similar issue found a temp fix on another place.
    Temp fix:
    sudo mkdir /sys/fs/cgroup/systemd
    sudo mount -t cgroup -o none,name=systemd cgroup /sys/fs/cgroup/systemd

  8. jkbaseer commented on Mar 22, 2018

    @jkbaseer

    Hello @dinar-dalvi thanks a lot! Do i need to do this on the route directory of the Server? or in the app folder(for example: meteor/hello-app/

  9. xgenvn commented on Mar 22, 2018

    @xgenvn
    Author

    @dinar-dalvi I tried this before, however the systemd is existed and mounted. Downgrading seems to fix the issue.

  10. jkbaseer commented on Mar 22, 2018

    @jkbaseer

    @xgenvn: downgrading the container to which version?

  11. xgenvn commented on Mar 22, 2018

    @xgenvn
    Author

    @jkbaseer you might want to try

    sudo apt remove docker-ce
    sudo apt install docker-ce=17.09.1~ce-0~ubuntu
    
  12. jkbaseer commented on Mar 22, 2018

    @jkbaseer

    image
    Am i doing it rightly?

    (Ps: Also i have few containers am using for other project, will that be removed as well? or is there a single command only to downgrade? )

  13. d-a-v commented on Mar 28, 2018

    @d-a-v

    On devuan/ascii this worked (over 18.03):

    sudo apt-get install docker-ce=17.09.1~ce-0~debian
    
  14. xgenvn commented on Mar 29, 2018

    @xgenvn
    Author

    @jkbaseer no, I was speaking of Ubuntu command line, I'm not sure on Mac.

  15. jkbaseer commented on Mar 29, 2018

    @jkbaseer
  16. 129 remaining items

  17. melekabbassi commented on Nov 8, 2022

    @melekabbassi

    I ran into similar issue found a temp fix on another place. Temp fix: sudo mkdir /sys/fs/cgroup/systemd sudo mount -t cgroup -o none,name=systemd cgroup /sys/fs/cgroup/systemd

    Thank you!!

  18. nikos445 commented on Dec 20, 2022

    @nikos445

    Almost same problem was occured to my jenkins pipelines after upgrading from Ubuntu Server 21.04 to 22.04.

    The solution that worked for me was to disable the cgroup_hierarchy from grub boot.
    Note: I am using containerd and runc instead of docker but this may work also in docker

    Solution Commands:

    echo "GRUB_CMDLINE_LINUX=systemd.unified_cgroup_hierarchy=false" | sudo tee /etc/default/grub.d/cgroup.cfg
    sudo update-grub
    

    Previously mentioned solution did not work... it was displaying that mounts was already mounted

    sudo mkdir -p /sys/fs/cgroup/systemd
    sudo mount -t cgroup -o none,name=systemd cgroup /sys/fs/cgroup/systemd

  19. leni1 commented on Jan 9, 2023

    @leni1

    Instead, I uninstalled docker-ce & re-installed docker-ce, using these steps: https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-ubuntu-22-04 and all my docker & snaps worked fine.

    Had an issue related to this and a re-install of docker worked for me on KDE Neon 5.24 (which uses Ubuntu 22.04 as a base)

  20. Lupunita commented on Jan 12, 2023

    @Lupunita

    In cgroups v2 - By default, a non-root user can only get memory controller and pids controller to be delegated.

    I resolved this by following steps from https://rootlesscontaine.rs/getting-started/common/cgroup2/#enabling-cpu-cpuset-and-io-delegation

  21. TheMessik commented on Feb 18, 2023

    @TheMessik

    Same issue here with GitLab CI/CD - can be fixed by using the same version for dind image as on host.

    test-debian11-docker-dind:
      image: docker:20.10.12
      services:
        - name: docker:20.10.12-dind
    

    Has anyone managed to resolve this?

  22. drpaneas commented on Apr 4, 2023

    @drpaneas

    I encountered this as well ...

  23. nutellatux commented on May 5, 2023

    @nutellatux

    Almost same problem was occured to my jenkins pipelines after upgrading from Ubuntu Server 21.04 to 22.04.

    The solution that worked for me was to disable the cgroup_hierarchy from grub boot. Note: I am using containerd and runc instead of docker but this may work also in docker

    Solution Commands:

    echo "GRUB_CMDLINE_LINUX=systemd.unified_cgroup_hierarchy=false" | sudo tee /etc/default/grub.d/cgroup.cfg
    sudo update-grub
    

    Previously mentioned solution did not work... it was displaying that mounts was already mounted

    sudo mkdir -p /sys/fs/cgroup/systemd
    sudo mount -t cgroup -o none,name=systemd cgroup /sys/fs/cgroup/systemd

    OS: "Ubuntu 22.04.2 LTS" its fixed!!!! TKS!!!!!!!!!!!!

    1. sudo apt-get update
    2. sudo apt-get -y install cgroup-tools
    3. sudo mkdir /sys/fs/cgroup/systemd
    4. sudo mount -t cgroup -o none,name=systemd cgroup /sys/fs/cgroup/systemd
    5. echo "GRUB_CMDLINE_LINUX=systemd.unified_cgroup_hierarchy=false" | sudo tee /etc/default/grub.d/cgroup.cfg
    6. sudo update-grub
  24. renepavlik commented on May 26, 2023

    @renepavlik

    I just faced this after upgrading a debian stretch machine to bullseye. The trick with

    sudo mkdir /sys/fs/cgroup/systemd
    sudo mount -t cgroup -o none,name=systemd cgroup /sys/fs/cgroup/systemd
    

    worked for me, but it was a bad lead.

    The root of the problem was elsewhere, in the fact, that docker-ce (and related) package was staying on the old version built for stretch. This means it works on bullseye but uses cgroups v1 while in bullseye, there is cgroups2.

    The real resolution was to upgrade docker-ce to the bullseye version.

  25. Sieboldianus commented on Jul 27, 2023

    @Sieboldianus

    Thanks @renepavlik . I can confirm, updating docker solved this problem for me under Debian bullseye. Here's the link to how to do this, just follow https://docs.docker.com/engine/install/debian/#install-using-the-repository.

  26. magnusja commented on Nov 29, 2023

    @magnusja

    Hi, there I had the same error after upgrading from Ubuntu 21.04 to 21.10. On each dist upgrade, libraries on your computer are being disabled. With the help of my Ubuntu expert colleague @MVermue we solved it.

    My error:

    ERROR: for xxxdocker_mysql_1  Cannot start service mysql: cgroups: cgroup mountpoint does not exist: unknown

    Solution: package got disabled on upgrade, we need to manually overlook them and fix

    Problem situation:

    * After upgrade from every ubuntu version, you need to do the following checks:
    
    /etc/apt/sources.list.d
    ls -lah

    Now you see a list, like the following

    ...
    ansible-ubuntu-ansible-focal.list
    ansible-ubuntu-ansible-focal.list.distUpgrade
    ansible-ubuntu-ansible-focal.save
    docker.list
    docker.list.distUpgrade
    docker.list.save
    mysql.list
    mysql.list.distUpgrade
    mysql.list.save
    ...
    

    Step 1:

    We need to edit the files which end on ".list", f.e.: sudo vim docker.list Check the URL in the file, click on it, check if "dist" folder exists (and make sure you see Release, so you know it has been released) and the latest OS system you are on. In my case, it should be "impish".

    Changed from

    # deb [arch=amd64] https://download.docker.com/linux/ubuntu disco stable

    New content

    deb [arch=amd64] https://download.docker.com/linux/ubuntu impish stable

    Step 2

    Take a peek at the content of the .distUpgrade file.

    cat docker.list.distUpgrade

    If all lines are commented, you can remove the file with sudo rm docker.list.distUpgrade. (If there are lines not commented. They must be in the .list file, then you can remove the distUpgrade.)

    Step 3

    Repeat step 1 and 2 for all .list/.distUpgrade files in this folder.

    Step 4

    Repeat step 1 and 2 in the folder /etc/apt/.

    Step 5

    sudo apt update
    sudo apt upgrade

    Finished and fixed. Now all your tools are up-to-date.

    OMG thank you so much! This should be the highlighted solution!

  27. greatquux commented on Nov 30, 2023

    @greatquux

    @magnusja this is definitely helpful, however these are steps everyone should take after an Ubuntu upgrade if they have added any PPAs to their system. for safety during the upgrade they get disabled, and these steps should be taken to re-enable them afterwards. this can help get the latest package versions installed for the new Ubuntu you have upgraded to. there are other reasons why this message may come up however, so it's not necessarily the solution for everyone, but is good general advice nonetheless.

  28. magnusja commented on Dec 1, 2023

    @magnusja

    @magnusja this is definitely helpful, however these are steps everyone should take after an Ubuntu upgrade if they have added any PPAs to their system. for safety during the upgrade they get disabled, and these steps should be taken to re-enable them afterwards. this can help get the latest package versions installed for the new Ubuntu you have upgraded to. there are other reasons why this message may come up however, so it's not necessarily the solution for everyone, but is good general advice nonetheless.

    I mean if Ubuntu is not able to provide a working Docker package in their own repos, then certainly using Docker official PPA is the way to go. I agree that you probably should think about if you want to activate other PPAs as well. But people also added the PPA back in the days for a reason.

  29. adebisi-fa commented on Apr 18, 2024

    @adebisi-fa

    I ran into similar issue found a temp fix on another place. Temp fix: sudo mkdir /sys/fs/cgroup/systemd sudo mount -t cgroup -o none,name=systemd cgroup /sys/fs/cgroup/systemd

    This worked for me, in 2024. Thank YOU @dinar-dalvi!!

    SERVER:
    Ubuntu 22.04.

    Client: Docker Engine - Community
    Version: 26.0.1
    API version: 1.40 (downgraded from 1.45)
    Go version: go1.21.9
    Git commit: d260a54
    Built: Thu Apr 11 10:53:25 2024
    OS/Arch: linux/amd64
    Context: default

    Server: Docker Engine - Community
    Engine:
    Version: 19.03.12
    API version: 1.40 (minimum version 1.12)
    Go version: go1.13.10
    Git commit: 48a66213fe
    Built: Mon Jun 22 15:44:17 2020
    OS/Arch: linux/amd64
    Experimental: false
    containerd:
    Version: 1.2.13
    GitCommit: 7ad184331fa3e55e52b890ea95e65ba581ae3429
    runc:
    Version: 1.0.0-rc10
    GitCommit: dc9208a3303feef5b3839f4323d9beb36df0a9dd
    docker-init:
    Version: 0.18.0
    GitCommit: fec3683

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions