Docker 1.3 fails to start on RHEL6.5 - docker

I had earlier followed https://docs.docker.com/installation/rhel/ to install docker on rhel6.5. This used to work till today, till I decided to run "yum update" and upgraded to docker1.3.
Now, /etc/init.d/docker start fails.
-bash-4.1$ sudo /etc/init.d/docker status
docker dead but pid file exists
Contents of /var/log/docker:
-bash-4.1$ more /var/log/docker
\nSun Nov 30 23:29:14 IST 2014\n
2014/11/30 23:29:14 docker daemon: 1.3.1 c78088f/1.3.1; execdriver: native; grap
hdriver:
[dd907331] +job serveapi(unix:///var/run/docker.sock)
[info] WARNING: You are running linux kernel version 2.6.32-431.el6.x86_64, whic
h might be unstable running docker. Please upgrade your kernel to 3.8.0.
/usr/bin/docker: relocation error: /usr/bin/docker: symbol dm_task_get_info_with
_deferred_remove, version Base not defined in file libdevmapper.so.1.02 with lin
k time reference
I don't have an option to upgrade to rhel7 yet, and have already tried to
yum downgrade - but yum list doesn't list the older version anymore
compile the older docker source, but docker doesn't let you build a binary anymore without the docker binary installed :(

/usr/bin/docker: relocation error: /usr/bin/docker: symbol dm_task_get_info_with_deferred_remove, version Base not defined in file libdevmapper.so.1.02 with link time reference
I ran into this at work this week (also on RHEL6.5). I believe the lib-device-mapper that you have isn't exporting a symbol ("Base") that Docker needs. I solved this by upgrading lib-device-mapper to version 1.02.90.
You may have to enable the public_ol6_latest repo in order to get this package.
sudo yum-config-manager --enable public_ol6_latest
And then install the package:
sudo yum install device-mapper-event-libs

TL;DR: In my case I needed to upgrade the package device-mapper-libs on CentOS/RHEL 6.5. Details below.
$ yum update -y device-mapper-libs
On RHEL/CentOS 6.5, I got the same error when trying to run the docker daemon:
$ docker -d
INFO[0000] +job serveapi(unix:///var/run/docker.sock)
INFO[0000] WARNING: You are running linux kernel version 2.6.32-431.el6.x86_64, which might be unstable running docker. Please upgrade your kernel to 3.8.0.
INFO[0000] Listening for HTTP on unix (/var/run/docker.sock)
docker: relocation error: docker: symbol dm_task_get_info_with_deferred_remove, version Base not defined in file libdevmapper.so.1.02 with link time reference
While troubleshooting I came across the discussion docker.io: docker does't run after upgrade for Debian.
For reference here was my environment before the "fix":
$ uname -a
Linux build1 2.6.32-431.el6.x86_64 #1 SMP Fri Nov 22 03:15:09 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
$ cat /etc/redhat-release
CentOS release 6.5 (Final)
Before upgrading device-mapper-libs was at version 1.02.79. In the Debian bug report linked above, it was pointed out that Docker 1.4.1 (which is a different version than what the original poster asked about) is compiled against a newer version of device-mapper-libs (libdevmapper 2:1.02.90-1, note that the package name in Debian is different).
$ yum info device-mapper-libs
Installed Packages
Name : device-mapper-libs
Arch : x86_64
Version : 1.02.79
Release : 8.el6
<...snip...>
Updating device-mapper-libs fixed the problem:
$ yum update -y device-mapper-libs
# Yep, the package was updated to the latest version (1.02.90)
$ rpm -qi device-mapper-libs
Name : device-mapper-libs Relocations: (not relocatable)
Version : 1.02.90 Vendor: CentOS
Release : 2.el6_6.1 Build Date: Wed 26 Nov 2014
<...snip...>
Once the update is completed, the docker daemon will start successfully:
$ # docker -d
INFO[0000] +job serveapi(unix:///var/run/docker.sock)
INFO[0000] WARNING: You are running linux kernel version 2.6.32-431.el6.x86_64, which might be unstable running docker. Please upgrade your kernel to 3.8.0.
INFO[0000] Listening for HTTP on unix (/var/run/docker.sock)
INFO[0000] +job init_networkdriver()
INFO[0000] -job init_networkdriver() = OK (0)
INFO[0000] Loading containers: start.
INFO[0000] Loading containers: done.
INFO[0000] docker daemon: 1.4.1 5bc2ff8/1.4.1; execdriver: native-0.2; graphdriver: devicemapper
INFO[0000] +job acceptconnections()
INFO[0000] -job acceptconnections() = OK (0)
Hope this helps!

I faced the same problem when installing Docker 1.5 on CentOS 7 on Vagrant/VBox. Upgrading DevMapper fixed the problem. To do so, run the command:
$ sudo yum update device-mapper

I met this issue after install docker 1.6 in centOS7 and cannot run docker successfully. After
yum install lvm2
it works for me in centOS7 :)
Hope this useful for people who had same problem in centOS7.

Related

Problem installing Docker Ubuntu, step related to command "pub" (Ubuntu 18.04)

My ubuntu version:
No LSB modules are available./
Distributor ID: Ubuntu /
Description: Ubuntu 18.04.3 LTS /
Release: 18.04 /
Codename: bionic
To install Docker Engine - Community, you need the 64-bit version of one of these Ubuntu versions:
Disco 19.04
Cosmic 18.10
Bionic 18.04 (LTS) (Mine)
Xenial 16.04 (LTS)
Steps I followed:
Uninstall old versions
$ sudo apt-get remove docker docker-engine docker.io containerd runc
Update the apt package index:
$ sudo apt-get update #HasErrors (2)
(1) Err:14 https://dl.bintray.com/rabbitmq/debian $distribution Release
404 Not Found [IP: 3.124. ..........]
------------------------------------------------
(2) E: The repository 'https://dl.bintray.com/rabbitmq/debian $distribution Release' does not have a Release file.
In consequence: When I get to step 3 in the webpage: https://docs.docker.com/install/linux/docker-ce/ubuntu/
$ sudo apt-key fingerprint 0EBFCD88
pub rsa4096 2017-02-22 [SCEA]
9DC8 5822 9FC7 DD38 854A E2D8 8D81 803C 0EBF CD88
uid [ unknown] Docker Release (CE deb) <docker#docker.com>
sub rsa4096 2017-02-22 [S]
I get this error:
Command 'pub' not found, did you mean:
command 'hub' from snap hub (v2.13.0)
command 'dub' from snap dub (1.15.0)
command 'pcb' from deb pcb-gtk
command 'pcb' from deb pcb-lesstif
command 'pua' from deb pglistener
command 'pudb' from deb python-pudb
command 'puf' from deb puf
command 'pdb' from deb python
command 'dub' from deb dub
command 'publ' from deb atfs
See 'snap info <snapname>' for additional versions.
I just want to install Docker for Ubuntu and i am a little stuck here
Instead of installing from the repository, why don't you try doing it directly.
sudo apt-get update
sudo apt-get remove docker docker-engine docker.io
sudo apt install docker.io
sudo systemctl start docker
sudo systemctl enable docker
If this works, you will notice it only works with sudo the workaround for this issue is mentioned here
Let me know if this doesn't work! I'm also quite confused as to why your errors include RabbitMQ when you are trying to install docker on ubuntu?

nvidia-container-cli: initialization error: cuda error: no cuda-capable device is detected

I am using nvidia/cuda:8.0-devel image and tried to run it. But I get the following error.
sudaraka#RnDCompute:~$ docker run -it --runtime=nvidia nvidia/cuda:8.0-devel docker: Error response from daemon: oci runtime error: container_linux.go:265: starting container process caused "process_linux.go:368: container init caused \"process_linux.go:351: running prestart hook 1 caused \\\"error running hook: exit status 1, stdout: , stderr: exec command: [/usr/bin/nvidia-container-cli --load-kmods configure --ldconfig=#/sbin/ldconfig.real --device=all --compute --utility --require=cuda>=8.0 --pid=12053 /var/lib/docker/overlay2/a72cba41e94578ff91c71ab56b07d8e9153386e43383482ac649419ae0a77220/merged]\\\\nnvidia-container-cli: initialization error: cuda error: no cuda-capable device is detected\\\\n\\\"\"".
It says that no cuda-capable device is detected.
I have cuda 8.0 installed.
sudaraka#RnDCompute:~$ nvcc --version nvcc: NVIDIA (R) Cuda compiler driver Copyright (c) 2005-2016 NVIDIA Corporation Built on Mon_Jan_23_12:24:11_CST_2017 Cuda compilation tools, release 8.0, V8.0.62
As well as the driver.
sudaraka#RnDCompute:~$ cat /proc/driver/nvidia/version NVRM version: NVIDIA UNIX x86_64 Kernel Module 384.98 Thu Oct 26 15:16:01 PDT 2017 GCC version: gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.4)
My docker version is 17.09.0-ce. What can be the problem for the error I am getting as no cuda-capable device is detected?
Thank You
It is possible that the installation was not done successfully, could you show the result of nvidia-smi? , you should try to install cuda and nvidia-driver in a separate mode, like this:
cuda 9.2 and nvidia-driver 396
CUDA
wget https://developer.nvidia.com/compute/cuda/9.2/Prod2/local_installers/cuda_9.2.148_396.37_linux
sudo chmod 777 cuda_9.2.148_396.37_linux
sudo sh cuda_9.2.148_396.37_linux
Several questions here, do not in the following:
Install NVIDIA Accelerated Graphics Driver (N)
Do you want to install the OpenGL libraries? (N)
Do you want to run nvidia-xconfig? (N)
NVIDIA
sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt update
sudo apt install nvidia-396
After installation cuda it will be in /usr/local/cuda, and test nvidia driver with nvidia-smi
Install, docker and nvidia-docker too, and test test:
docker run -it --runtime=nvidia nvidia/cuda:8.0-devel
or
nvidia-docker run -it --runtime=nvidia nvidia/cuda:8.0-devel
I hope it's useful, let me know!

docker Error with pre-create check: "We support Virtualbox starting with version 5

I'm trying to create docker machine host using the following command in fedora OS version 25.
docker-machine create -driver=virtualbox host01
I get below error while executing the command.
Error with pre-create check: "We support Virtualbox starting with version 5. Your VirtualBox install is \"WARNING:
The vboxdrv kernel module is not loaded.
Either there is no module available for the current kernel (4.10.12-200.fc25.x86_64) or it failed to load.
Please try load the kernel module by executing as root
dnf install akmod-VirtualBox kernel-devel-4.10.12-200.fc25.x86_64 akmods --kernels 4.10.12-200.fc25.x86_64 && systemctl restart systemd-modules-load.service
You will not be able to start VMs until this problem is fixed.\\n5.1.26r117224\".
Please upgrade at https://www.virtualbox.org"
I have already virtualbox latest version installed. Running the command suggested by
sudo dnf install akmod-VirtualBox kernel-devel-4.10.12-200.fc25.x86_64 akmods --kernels 4.10.12-200.fc25.x86_64 && systemctl restart systemd-modules-load.service
I got the below error
Last metadata expiration check: 0:48:35 ago on Thu Aug 17 22:38:47 2017.
Package akmods-0.5.6-7.fc25.noarch is already installed, skipping.
No package --kernels available.
No package 4.10.12-200.fc25.x86_64 available.
Any suggestions?
I also had this problem and for this I upgrade Virtual box to 5.2 using following commands. This link help me
sudo apt-get remove virtualbox virtualbox-5.1
sudo sh -c 'echo "deb http://download.virtualbox.org/virtualbox/debian xenial contrib" >> /etc/apt/sources.list.d/virtualbox.list'
wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add -
wget -q https://www.virtualbox.org/download/oracle_vbox.asc -O- | sudo apt-key add -
sudo apt-get update
sudo apt-get install virtualbox-5.2
Hope this helps.
For windows users, in 2022 such problem still exists. So for those who use last build (now it is virtualBox-6.1.32-149290-Win), try to use version that starts with prefix 5. But not all '5' versions work. For example, for me worked only version 5.2.42 while versions: 5.2.18, 5.2.20, 5.2.44 didn't work
Helped for win 11 x64

Cannot docker build because of "Couldn't run auplink before unmount" error

When I run docker build I get this:
Sending build context to Docker daemon 10.24kB
WARN[11935] Couldn't run auplink before unmount /var/lib/docker/aufs/mnt/21647778a50f097d4535246ec5206960dd909f4bb8b0e3d04fdd53a7402fc2de-init: exec: "auplink": executable file not found in $PATH
Step 1/2 : FROM debian:jessie
---> 86baf4e8cde9
Step 2/2 : RUN apt-get update
WARN[11935] Couldn't run auplink before unmount /var/lib/docker/aufs/mnt/21647778a50f097d4535246ec5206960dd909f4bb8b0e3d04fdd53a7402fc2de: exec: "auplink": executable file not found in $PATH
---> Running in 1fef9bef5bf7
ERRO[11934] containerd: start container error="shim error: fork/exec /usr/bin/docker-runc: exec format error" id=1fef9bef5bf77141a97669d2aa785e74f9027a849919a937f714e93fbae3916d
ERRO[11935] Create container failed with error: shim error: fork/exec /usr/bin/docker-runc: exec format error
ERRO[11934] containerd: deleting container error="fork/exec /usr/bin/docker-runc: exec format error: \"\""
WARN[11935] Couldn't run auplink before unmount /var/lib/docker/aufs/mnt/21647778a50f097d4535246ec5206960dd909f4bb8b0e3d04fdd53a7402fc2de: exec: "auplink": executable file not found in $PATH
shim error: fork/exec /usr/bin/docker-runc: exec format error
Here is the content of my Dockerfile:
FROM debian:jessie
RUN apt-get update
What is the issue? It makes no sens to me.
ll /usr/bin | grep docker
-rwxr-xr-x 1 root root 18471276 Aug 3 22:08 docker*
-rwxr-xr-x 1 root root 9938352 Aug 3 22:08 docker-containerd*
-rwxr-xr-x 1 root root 8941944 Aug 3 22:08 docker-containerd-ctr*
-rwxr-xr-x 1 root root 3824920 Aug 3 22:08 docker-containerd-shim*
-rwxr-xr-x 1 root root 40328816 Aug 3 22:08 dockerd*
-rwxr-xr-x 1 root root 0 Aug 3 22:08 docker-init*
-rwxr-xr-x 1 root root 0 Aug 3 22:08 docker-proxy*
-rwxr-xr-x 1 root root 0 Aug 3 22:08 docker-runc*
-rwxr-xr-x 1 root root 8962864 Aug 3 21:40 docker-volume-local-persist*
Installing from https://docs.docker.com/engine/installation/linux/docker-ce/binaries/
file $(which docker-runc):
/usr/bin/docker-runc: ELF 64-bit LSB executable, x86-64, version 1 (GNU/Linux), statically linked, for GNU/Linux 2.6.32, BuildID[sha1]=e3d80e183baf26a9d48c3f0435931d42aa1bf340, not stripped
lsb_release -a
Distributor ID: Ubuntu
Description: Ubuntu 17.04
Release: 17.04
Codename: zesty
docker --version
Docker version 17.06.0-ce, build 02c1d87
dockerd --version
Docker version 17.06.0-ce, build 02c1d87
docker-containerd --version
containerd version 0.2.3 commit: cfb82a876ecc11b5ca0977d1733adbe58599088a
docker-containerd-ctr --version
ctr version 0.2.3 commit: cfb82a876ecc11b5ca0977d1733adbe58599088a
docker-init --version
tini version 0.13.0 - git.949e6fa
docker-runc --version
runc version 1.0.0-rc3
commit: 2d41c047c83e09a6d61d464906feb2a2f3c52aa4
spec: 1.0.0-rc5
Is this running on a non-Intel/ARM 64-bit Ubuntu? For example a Raspberry Pi or ARM64 CPU? This error:
shim error: fork/exec /usr/bin/docker-runc: exec format error
Would imply that either (a) the binary install on your machine is corrupted in some way, or (b) you are attempting to run a binary for a different architecture on your system.
Can you post the output of uname -a and file /usr/bin/docker-runc? That might help narrow down the source of your problem.
It looks like something related to aufs FS, What OS Do you use ? and Did you recently updated your machine ?
Update:
For CONFIG_MEMCG_SWAP_ENABLED: missing, CONFIG_RT_GROUP_SCHED: missing and warning: /proc/config.gz does not exist, searching other paths for kernel config ...
These are missing kernel configuration and flags, Please make sure you installed linux-image-extra-$(uname -r) linux-image-extra-virtual, First make sure you stopped docker daemon sudo systemctl stop docker and install these packages (contains extra driver that support containers and aufs check docker docs https://docs.docker.com/engine/installation/linux/docker-ce/ubuntu):
sudo apt-get install \
linux-image-extra-$(uname -r) \
linux-image-extra-virtual
And update your grub GRUB_CMDLINE_LINUX_DEFAULT add thesecgroup_enable=memory swapaccount=1 to your /etc/default/grubconfiguration file then update your grub sudo update-grub check https://github.com/moby/moby/issues/4250 && https://github.com/moby/moby/pull/4251
For aufs problems there is another solution for modern dockers as docker moved from aufs to overlay and overlay2 is to configure your machine and apply overlay but make sure you backed up your docker images and containers as this fix might make you lose them check Unable to start Docker Service in Ubuntu 16.04

How to enable AUFS on Debian?

When I try to install docker via:
curl -sSL https://get.docker.com/ | sh
I get the message:
Warning: current kernel is not supported by the linux-image-extra-virtual package. We have no AUFS support. Consider installing the packages linux-image-virtual kernel and linux-image-extra-virtual for AUFS support.
However, neither package seems to exist on Debian Jessie:
# apt-get install linux-image-virtual linux-image-extra-virtual
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package linux-image-virtual
E: Unable to locate package linux-image-extra-virtual
What am I missing here?
aufs is not supported by modern kernels, so you should skip to overlayfs from aufs. Just restart your docker daemon with the option:
--storage-driver=overlay2
(or add this option to /etc/default/docker)
In some systems you should add the processing of the file /etc/default/docker to start procedure by creating /etc/systemd/system/docker.service with content:
[Service]
EnvironmentFile=-/etc/default/docker
ExecStart=
ExecStart=/usr/bin/docker daemon -H fd:// $OPTIONS \
$DOCKER_STORAGE_OPTIONS \
$DOCKER_NETWORK_OPTIONS \
$BLOCK_REGISTRY \
$INSECURE_REGISTRY \
$DOCKER_OPTS
More info here
Execute
systemctl daemon-reload
for changes to take effect.
Caution! All your images become unreachable. If you want to keep them, just save and reload them. You can find the good description here
UPD. I've changed overlay to overlay2 because it solves a little bit more problem than described here
UDP. Not relevant, since overlay2 used by default in modern version of docker (18-06).
Actually installing a stock jessie gives you a kernel that comes with aufs support. My guess is you upgraded to a higher kernel version through jessie-backports which is not not the standard jessie setup.
This was tested with current Debian jessie 8.7.1 amd64 and kernel 3.16.0.4.
# cat /etc/debian_version
8.7
# dpkg --get-selections | grep linux-image
linux-image-3.16.0-4-amd64 install
linux-image-amd64 install
# dpkg -L linux-image-3.16.0-4-amd64 | grep aufs
/lib/modules/3.16.0-4-amd64/kernel/fs/aufs
/lib/modules/3.16.0-4-amd64/kernel/fs/aufs/aufs.ko
So to answer your question:
You could re-install Debian Jessie or down-grade to the default kernel and you have a jessie with aufs support.
For installing aufs on Debian 9 aka Debian stretch one just have to issue an apt-get install aufs-dkms. This is sadly not available for jessie-backports at this time.
At our company we are driving our docker hosts with an jessie aufs setup and everything is running flawlessly.
Update 08-2018
Even now I can not recommend overlay2 for production. We currently have an issue with containers where mysql is not able to create the /var/run/mysqld.sock when running in a container with the overlay2 storage.
This is addressed in this one year old issue as of August 2018.
You can try
sudo apt-get install linux-image-extra-$(uname -r)
to install an enhanced Kernel version which should contain AUFS support.

Resources