Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Docker 1.3 fails to start on RHEL6.5

Tags:

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 :(
like image 571
robbin Avatar asked Nov 30 '14 18:11

robbin


People also ask

Is Docker supported on RHEL 7?

OS requirements. To install Docker Engine, you need a maintained version of RHEL 7, RHEL 8 or RHEL 9 on s390x (IBM Z). Archived versions aren't supported or tested. The overlay2 storage driver is recommended.

How do I open Docker in RHEL 8?

Red Hat Enterprise Linux 8 does not support Docker: on this distribution it has been replaced by Red Hat own tools like buildah and podman , which are compatible with Docker but don't need a server/client architecture to run.

How do you check if a Docker container is running or not?

The operating-system independent way to check whether Docker is running is to ask Docker, using the docker info command. You can also use operating system utilities, such as sudo systemctl is-active docker or sudo status docker or sudo service docker status , or checking the service status using Windows utilities.


2 Answers

/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

like image 99
Todd Avatar answered Sep 19 '22 05:09

Todd


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!

like image 35
Michael G. Noll Avatar answered Sep 22 '22 05:09

Michael G. Noll