Docker on RHEL 6 Cgroup mounting failing

judoole picture judoole · Aug 7, 2014 · Viewed 14k times · Source

I'm trying to get my head around something that's been working on a Centos+Vagrant, but not on our providers RHEL (Red Hat Enterprise Linux Server release 6.5 (Santiago)). A sudo service docker restart hands this:

Stopping docker:                                             [  OK  ]
Starting cgconfig service: Error: cannot mount cpuset to /cgroup/cpuset: Device or resource busy
/sbin/cgconfigparser; error loading /etc/cgconfig.conf: Cgroup mounting failed
Failed to parse /etc/cgconfig.conf                           [FAILED]

Starting docker:                                              [  OK  ]

The service starts okey enough, but images cannot run. A mounting failed error is shown when I try. And the startup-log also gives a warning or two. Regarding the kernelwarning, centos gives the same and has no problems as Epel should resolve this:

WARNING: You are running linux kernel version 2.6.32-431.17.1.el6.x86_64, which might be unstable running docker. Please upgrade your kernel to 3.8.0.
2014/08/07 08:58:29 docker daemon: 1.1.2 d84a070; execdriver: native; graphdriver:
[1233d0af] +job serveapi(unix:///var/run/docker.sock)
[1233d0af] +job initserver()
[1233d0af.initserver()] Creating server
2014/08/07 08:58:29 Listening for HTTP on unix (/var/run/docker.sock)
[1233d0af] +job init_networkdriver()
[1233d0af] -job init_networkdriver() = OK (0)
2014/08/07 08:58:29 WARNING: mountpoint not found

Anyone had any success overcoming this problem or should I throw in the towel and wait for the provider to update to RHEL 7?

Answer

tonysok picture tonysok · Jun 23, 2015

I have the same issue.

enter image description here

(1) check cgconfig status

# /etc/init.d/cgconfig status

if it stopped, restart it

# /etc/init.d/cgconfig restart

check cgconfig is running

enter image description here

(2) check cgconfig is on

# chkconfig --list cgconfig

cgconfig 0:off 1:off 2:off 3:off 4:off 5:off 6:off

if cgconfig is off, turn it on

enter image description here

(3) if still does not work, may be some cgroups modules is missing. In the kernel .config file, make menuconfig, add those modules into kernel and recompile and reboot

after that, it should be OK

enter image description here