Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

error starting docker daemon on ubuntu 14.04 (Devices cgroup isn't mounted)

I followed docker instructions to install and verify the docker installation (from http://docs.docker.com/linux/step_one/).

I tried on 2 Ubuntu 14.04 machines and on both I got following error when starting docker daemon:

$ sudo docker daemon
INFO[0000] Listening for HTTP on unix (/var/run/docker.sock) 
INFO[0000] [graphdriver] using prior storage driver "aufs" 
INFO[0000] Option DefaultDriver: bridge                 
INFO[0000] Option DefaultNetwork: bridge                
WARN[0000] Running modprobe bridge nf_nat br_netfilter failed with    message: modprobe: WARNING: Module br_netfilter not found. , error: exit status 1 
INFO[0000] Firewalld running: false                     
WARN[0000] Your kernel does not support cgroup memory limit: mountpoint for memory not found 
WARN[0000] mountpoint for cpu not found                 
FATA[0000] Error starting daemon: Devices cgroup isn't mounted 

I appreciate any help to resolve this issue.

like image 866
Dragan Nikolic Avatar asked Aug 14 '15 05:08

Dragan Nikolic


3 Answers

I resolved this issue by starting the docker deamon manually using:

sudo service docker start

like image 83
Simon Avatar answered Oct 13 '22 21:10

Simon


Note: Looks like this issue was only present in Ubuntu 14.04 and earlier. The newer Ubuntu versions don't need this.

Try the following:

  • Log into Ubuntu as a user with sudo privileges.

  • Edit the /etc/default/grub file.

  • Set the GRUB_CMDLINE_LINUX value as follows:

    GRUB_CMDLINE_LINUX="cgroup_enable=memory swapaccount=1"

  • Save and close the file.

  • Update GRUB.

    $ sudo update-grub

  • Reboot your system.

Some folks have reported restarting the docker daemon works:

sudo systemctl restart docker

As noted above the newer docker documentation doesn't refer to this in the new Docker versions.

Update

This works for some folks on Ubuntu 14.04 or earlier:

sudo apt-get install cgroup-lite
like image 31
Rico Avatar answered Oct 13 '22 19:10

Rico


maybe need packages:

apt-get install aufs-tools
apt-get install cgroup-lite
like image 4
virya Avatar answered Oct 13 '22 21:10

virya