21

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 :(
robbin
  • 1,924
  • 4
  • 20
  • 26

4 Answers4

45

/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

Todd
  • 30,472
  • 11
  • 81
  • 89
  • Thanks Todd, I did notice the discussion on docker blog - https://forums.docker.com/t/upgrading-docker-to-current-version-on-centos/340/9. I don't see the newer version of device-mapper on yum. Any pointers to install/upgrade it? $yum list --showduplicates device-mapper Installed Packages device-mapper.x86_64 1.02.79-8.el6 @anaconda-RedHatEnterpriseLinux-201311111358.x86_64/6.5 – robbin Nov 30 '14 at 18:57
  • @Robbin - Edited my answer to provide more exact instructions on where to find this. – Todd Dec 01 '14 at 15:33
  • 2
    Thanks again @Todd, I did the following to upgrade device-mapper. 1. cd /etc/yum.repos.d 2. wget http://public-yum.oracle.com/public-yum-ol6.repo 3. wget http://public-yum.oracle.com/RPM-GPG-KEY-oracle-ol6 -O /etc/pki/rpm-gpg/RPM-GPG-KEY-oracle 4. yum update device-mapper – robbin Dec 01 '14 at 17:11
  • I was dealing with the repo to get the libraries before getting to this solution, thanks to @Robbin for posting the steps. – atejeda Dec 11 '14 at 22:31
  • Definitely @robbin's suggestion worked as expected!!! Thanks for the entry... This worked for Docker 1.4.0. – Marcello DeSales Dec 30 '14 at 01:33
  • The current version makes RHEL 6.5 crash :( Has anybody experienced the behavior of completely losing connectivity with the RHEL 6.5 host when mounting a volume??? – Marcello DeSales Dec 30 '14 at 21:54
  • Worked like a charm ;) – sbeskur Apr 01 '15 at 20:14
  • in a stock CentOS 6.5 the command `yum-config-manager` does not seem to be present, and, in fact, it's not necessary: the `yum update` will work just fine. – Marco Massenzio Apr 15 '15 at 22:15
17

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!

miguno
  • 14,498
  • 3
  • 47
  • 63
4

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
pcx
  • 984
  • 11
  • 21
  • I've run into the same problem. Docker package MUST require proper dev-mapper version. So I'll try to create an issue for that. – Roman Iuvshin Apr 06 '15 at 14:14
0

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.

Jane
  • 657
  • 8
  • 14