The docker daemon worked fine before, but after I update the linux kernel version from 4.10 to 4.12, I found that the Docker daemon can't work:
When I run docker ps comes the error:
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
and I run systemctl status docker.service to see the details, it outputs the error:
systemd[1]: Failed to start Docker Application Container Engine.
and the detail error from dockerd':
ERRO[0001] [graphdriver] prior storage driver aufs failed: driver not supported
Error starting daemon: error initializing graphdriver: driver not supported
OS: linux Ubuntu 16.04 LTS kernel: v4.12, docker version :Docker version 17.07.0-ce, build 8784753
Related
Just installed Docker CE following official instructions with the repository in Ubuntu 14.04
Installation went successfully, the daemon is running
$ ps aux | grep docker
[...] /usr/bin/dockerd --raw-logs [...]
My user is in the docker group:
$ groups
[...] docker
The cli can't seem to communicate (same with sudo)
$ docker ps
Cannot connect to the Docker daemon at unix:///var/run/docker.sock.
Is the docker daemon running?
The socket seems to have the correct permissions:
$ ls -l /var/run/docker.sock
srw-rw---- 1 root docker 0 Feb 4 16:21 /var/run/docker.sock
The log seems to claim about some issues though
$ sudo tail -f /var/log/upstart/docker.log
Failed to connect to containerd: failed to dial "/var/run/docker/containerd/docker-containerd.sock": dial unix:///var/run/docker/containerd/docker-containerd.sock: timeout
/var/run/docker.sock is up
time="2018-02-04T16:22:21.031459040+01:00" level=info msg="libcontainerd: started new docker-containerd process" pid=17147
INFO[0000] starting containerd module=containerd revision=89623f28b87a6004d4b785663257362d1658a729 version=v1.0.0
INFO[0000] setting subreaper... module=containerd
containerd: invalid argument
time="2018-02-04T16:22:21.056685023+01:00" level=error msg="containerd did not exit successfully" error="exit status 1" module=libcontainerd
Any advice to make this work ?
Relog and Docker restart already done of course
As #bobbear suggested and is actually mentioned in the official doc one of the prerequisites is:
Version 3.10 or higher of the Linux kernel. The latest version of the kernel available for you platform is recommended.
After having checked my Kernel version:
$ uname -a
Linux [...] 3.2.[...]-generic [...]-Ubuntu [...] x86_64
I searched for candidates:
$ apt-cache search linux-image
And installed my new_kernel:
$ sudo apt-get install \
linux-image-new_kernel \
linux-headers-new_kernel \
linux-image-extra-new_kernel
Same situation happend on me. IS because your linux kernel version too low !!! check it use command "uname -r" , if the version below "3.10" (for example: debian 7 whezzy default version is 3.2 ) ,even you install docker-ce suceessfully, you will still can not start docker daemon success.That why! All most answers on the web tell you to 'restart' bla bla bla... but they did not consider this problem.
I had installed docker in my aws linux machine a while ago and was using it for kong testing purposes,
Machine details:
Linux ip-172-31-10-102 4.9.70-22.55.amzn1.x86_64 #1 SMP Wed Dec 20 23:36:28 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
Today when i tried to run normal hello-world container in my docker, i am facing the following error.
[root#ip-172-31-10-102 ~]# docker run hello-world
systemd cgroup flag passed, but systemd support for managing cgroups is not
available
docker: Error response from daemon: oci runtime error: systemd cgroup flag
passed, but systemd support for managing cgroups is not available.
ERRO[0000] error waiting for container: context canceled
I am not sure what configuration has messed in here,i am able to see docker info and container list everything but not able to run a container.
i tried re-installing dockers but still see the same error.
I am trying to start my dockerd daemon by this command - dockerd &
Then i start getting the error as below -
ERRO[0036] libcontainerd: failed to receive event from containerd: rpc error: code = 12 desc = unknown service types.API
This keeps rolling again and again and i am unable to start any container after that. If i close the session and open a new session, i could see docker ps is accessible. But i am unable to start any container. While starting the container I am getting error -
docker run hello-world
docker: Error response from daemon: unknown service types.API. ERRO[0000] error waiting for container: context canceled
Please let me know if any logs are needed.
Why do you start the docker daemon using dockerd & and not systemctl start docker.service? This is probably the cause of your problem.
In order to start the daemon at boot, you need to run systemctl enable docker.service. See Getting Started with Containers.
Note that the kernel for Red Hat Enterprise Linux 6 only supports a limited subset of the functionality needed for container support, and I don't think anyone tests either the daemon or container images on that operating system version.
I've installed Docker via pacman -S docker, but when I'm trying to run Dockerd it says
INFO[0000] libcontainerd: new containerd process, pid: 9792
WARN[0000] containerd: low RLIMIT_NOFILE changing to max current=1024 max=4096
FATA[0001] Your Linux kernel version 3.4.39 is not supported for running docker. Please upgrade your kernel to 3.10.0 or newer.
I'm trying to run it with DOCKER_NOWARN_KERNEL_VERSION=1 and it gives me
INFO[0000] libcontainerd: new containerd process, pid: 9810
WARN[0000] containerd: low RLIMIT_NOFILE changing to max current=1024 max=4096
ERRO[0001] [graphdriver] prior storage driver devicemapper failed: devicemapper: Error running deviceCreate (CreatePool) dm_task_run failed
Error starting daemon: error initializing graphdriver: devicemapper: Error running deviceCreate (CreatePool) dm_task_run failed
What did I do wrong?!..
Running this on Orang Pi PC
Thanks
I've found, that kernel > 4.0 does exist for this Pi. I've installed Armbian on my Orange Pi PC and I'm sure that it the best thing you could install. I goes with linux-4.10.3 on the board and works fine.
I'm building some CentOS VM with VMWare, with no access to internet, so I've downloaded and made local repositories, including this one
Then I have installed docker-engine.x86_64, and when starting the docker daemon, I get the following errors :
[root]# dockerd
DEBU[0000] docker group found. gid: 993
...
...
DEBU[0001] Error retrieving the next available loopback: open /dev/loop-control: no such device
ERRO[0001] **There are no more loopback devices available.**
ERRO[0001] [graphdriver] prior storage driver "devicemapper" failed: loopback attach failed
DEBU[0001] Cleaning up old mountid : start.
FATA[0001] Error starting daemon: error initializing graphdriver: loopback attach failed
After manually add the loop module which control loop device with this command :
insmod /lib/modules/3.10.0-327.36.2.el7.x86_64/kernel/drivers/block/loop.ko
The error changes to :
[graphdriver] prior storage driver "devicemapper" failed: devicemapper: Error running deviceCreate (CreatePool) dm_task_run failed
I've read that it could be because I have not enough space disk, I think it's not that, any idea?
[root]# df -k .
Filesystem blocs de 1K Used Available Used Mounted on
/dev/mapper/centos-root 51887356 2436256 49451100 5% /
I got the "There are no more loopback devices available" error, which stopped dockerd from running.
I fixed it by ensuring the storage driver was 'overlay':
# /usr/bin/dockerd -D --storage-driver=overlay
This was on Debian Jessie and docker running as a systemd service/unit.
To make it permanent, I created a systemd drop-in:
$ cat /etc/systemd/system/docker.service.d/docker.conf
[Service]
ExecStart=
ExecStart=/usr/bin/dockerd -H fd:// --storage-driver=overlay