iameteor
By:
iameteor

Start Docker error message

June 14, 2014 12.2k views
I was trying to run "docker -d" command to start docker service and install dokku by myself, but I got an error message. Any idea? Thanks! Environment: Ubuntu+Nginx+RoR+Unicorn Error Message:
[2758c589] +job serveapi(unix:///var/run/docker.sock)
[2758c589] +job initserver()
[2758c589.initserver()] Creating server
[2758c589] +job init_networkdriver()
2014/06/14 02:19:41 Listening for HTTP on unix (/var/run/docker.sock)
[2758c589] -job init_networkdriver() = OK (0)
2014/06/14 02:19:41 WARNING: Your kernel does not support cgroup swap limit.
Error loading docker apparmor profile: exec: "/sbin/apparmor_parser": stat /sbin/apparmor_parser: no such file or directory ()
[2758c589] -job initserver() = ERR (1)
2014/06/14 02:19:41 Error loading docker apparmor profile: exec: "/sbin/apparmor_parser": stat /sbin/apparmor_parser: no such file or directory ()
2 comments
3 Answers
This error is because the file /sbin/apparmor_parser is missing:
2014/06/14 02:19:41 Error loading docker apparmor profile: exec: "/sbin/apparmor_parser": stat /sbin/apparmor_parser: no such file or directory ()
That command is provided by the apparmor package. Please ensure it is installed:
sudo apt-get install apparmor

kitto@kitto-OptiPlex-3020 ~ $ sudo docker -d
INFO[0000] +job serveapi(unix:///var/run/docker.sock)

INFO[0000] Listening for HTTP on unix (/var/run/docker.sock)
INFO[0000] +job initnetworkdriver()

INFO[0000] -job initnetworkdriver() = OK (0)

INFO[0000] WARNING: Your kernel does not support cgroup swap limit.

Solution:

sudo apt-get install apparmor


kitto@kitto-OptiPlex-3020 ~ $sudo service docker start

docker start/running, process 20306
kitto@kitto-OptiPlex-3020 ~ $ sudo service docker restart
docker stop/waiting
docker start/running, process 20366
kitto@kitto-OptiPlex-3020 ~ $ ps aux | grep docker

root 20366 0.5 0.1 329880 8348 ? Ssl 13:48 0:00 /usr/bin/docker -d
kitto 20426 0.0 0.0 13424 916 pts/9 S+ 13:48 0:00 grep --colour=auto docker

Problem is solved!

Have another answer? Share your knowledge.