1

I started up a ubuntu virtual machine using vagrant. The version of Ubuntu running is 12.04 precise. I installed docker using the package method outlined on the docker website: Docker version 1.13.0, build 49bf474.

I added docker to upstart, and am able to start and stop docker through the upstart commands:

$ sudo service docker stop
docker stop/waiting

$ sudo service docker start
docker start/running, process 22994

I then try running the command:

$ sudo docker run hello-world
docker: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?.
See 'docker run --help'.

I've looked through the numerous articles on stack overflow, but most of them deal with user permissions. At this point, I wouldn't mind having to put in 'sudo' if I can just get it to run.

Cannot connect to docker daemon pointed me to an attempt to unset the 'DOCKER_HOST' value. I attemtped this with no luck. I tried the 5th answer from Docker command can't connect to Docker daemon, where it's mentioned that this is a network issue, but again with no luck. I tried the 6th answer with adding the docker key, again with no luck.

Does anyone have any ideas of where else I can look as to why I'm getting this error?

EDIT:

When I run $ sudo service docker stauts, I get docker start/running, process {pId}. What's strange is that every time I run it, pId is different.

~$ sudo service docker status
docker start/running, process 28630
~$ sudo service docker status
docker start/running, process 28881
~$ sudo service docker status
docker start/running, process 29007

EDIT 2:

I found Docker can't connect to docker daemon where one answer recommended running debug mode. Unfortunately, running

sudo docker --debug

Kept throwing the standard 'help' error where it did not recognize the flag. I also tried '-d' (per the answer) and '-D' (per the help file) with the same response.

Just looking into things, I tried ps.

$ ps aux | grep docker
root     18776  0.0  3.5  87904 13328 ?        Ssl  20:51   0:00 /usr/bin/dockerd --raw-logs

root 18785 0.0 1.2 59860 4808 ? Ssl 20:51 0:00 docker-containerd -l unix:///var/run/docker/libcontainerd/docker-containerd.sock --metrics-interval=0 --start-timeout 2m --state-dir /var/run/docker/libcontainerd/containerd --shim docker-containerd-shim --runtime docker-runc vagrant 18792 0.0 0.2 11676 948 pts/0 R+ 20:51 0:00 grep --color=auto docker

but has the odd behaviour that everytime I run it, the pId changes.

Community
  • 1
  • 1
JRogerC
  • 598
  • 6
  • 17
  • What does `sudo dockerd` print? – tkausl Jan 28 '17 at 20:41
  • $ sudo dockerd INFO[0000] libcontainerd: new containerd process, pid: 9942 WARN[0000] containerd: low RLIMIT_NOFILE changing to max current=1024 max=4096 FATA[0001] Your Linux kernel version 3.2.0-23-generic is not supported for running docker. Please upgrade your kernel to 3.10.0 or newer. – JRogerC Jan 28 '17 at 21:01

1 Answers1

2

I feel silly adding an answer. I think I found the issue. When I looked in the logs for docker

$ sudo tail -f /var/log/upstart/docker.log -n 500

I saw the same message repeating every second:

time="2017-01-28T20:56:15.265328447Z" level=info msg="libcontainerd: new containerd process, pid: 29392"
time="2017-01-28T20:56:16.271350352Z" level=fatal msg="Your Linux kernel version 3.2.0-23-generic is not supported for running docker. Please upgrade your kernel to 3.10.0 or newer."
/var/run/docker.sock is up

I haven't attemtped it yet, but I think the issue is with the version of UBUNTU I'm using. I'm going to try moving to a newer version and see if that helps.

JRogerC
  • 598
  • 6
  • 17
  • Thanks for the tips! In my case I'm seeing `[graphdriver] prior storage driver aufs failed: driver not supported`. – NikoNyrh Apr 28 '17 at 09:16