user1274399
user1274399

Reputation: 115

“Error response from daemon: Cannot start container … no such file or directory” on Oracle Linux running hello-world

TLDR: I am trying to run the hello-world container on a Oracle Linux and I am getting an error message: Error response from daemon: Cannot start container 724ed94d9249b636d6820fb8c2e4ba64232f426812e5b03545762 532751f434e: [8] System error: mkdir /var/lib/docker/devicemapper/mnt/724ed94d9249b636d6820fb8c2e4ba6423 2f426812e5b03545762532751f434e/rootfs/sys/fs/cgroup: no such file or directory

I am trying to install and run Docker on a Oracle Linux machine. I have followed the instructions on the Oracle webpage (https://docs.oracle.com/cd/E37670_01/E37355/html/section_kfy_f2z_fp.html), but had some problems.

When installing the docker-engine I had some dependencies problem with the UEK packages, but I could solve those with the instructions on this page (https://docs.oracle.com/cd/E37670_01/E37355/html/ol_obtain_uek.html).

The docker-engine seemed to run just fine, but when I try to run the hello-world container I got an error:

[root ~]# docker run hello-world
Timestamp: 2016-01-13 14:58:06.420677559 -0200 BRST
Code: System error

Message: mkdir /var/lib/docker/devicemapper/mnt/724ed94d9249b636d6820fb8c2e4ba64232f426812e5b03545762532 751f434e/rootfs/sys/fs/cgroup: no such file or directory

Frames:
0: setupRootfs
Package: github.com/opencontainers/runc/libcontainer
File: rootfs_linux.go@40

1: Init
Package: github.com/opencontainers/runc/libcontainer.(*linuxStandardInit)
File: standard_init_linux.go@57

2: StartInitialization
Package: github.com/opencontainers/runc/libcontainer.(*LinuxFactory)
File: factory_linux.go@242

3: initializer
Package: github.com/docker/docker/daemon/execdriver/native
File: init.go@35

4: Init
Package: github.com/docker/docker/pkg/reexec
File: reexec.go@26

5: main
Package: main
File: docker.go@18

6: main
Package: runtime
File: proc.go@63

7: goexit
Package: runtime
File: asm_amd64.s@2232
Error response from daemon: Cannot start container 724ed94d9249b636d6820fb8c2e4ba64232f426812e5b03545762 532751f434e: [8] System error: mkdir /var/lib/docker/devicemapper/mnt/724ed94d9249b636d6820fb8c2e4ba6423 2f426812e5b03545762532751f434e/rootfs/sys/fs/cgroup: no such file or directory

Can anybody help me with this?

My knowledge on both Linux and Docker are quite few, so if I forgot to mention any important information please ask!!=o)

Upvotes: 1

Views: 4774

Answers (3)

Florian Heigl
Florian Heigl

Reputation: 126

The kernel you need is kernel-uek, not "kernel". The normal kernel is RHEL6 compatible and as such it can't have the fixes / updates you need. The UEK kernel works fine.

Consider also uninstalling the RHEL kernel, I just got a case where a kernel update switched back to the normal kernel on reboot. You don't want that to happen :-(

Upvotes: 0

thaJeztah
thaJeztah

Reputation: 29047

To run Docker on Oracle linux, you need the "Unbreakable Enterprise Kernel" 3.8 or higher installed.

After that, you can follow the installation procedure in the documentation

Note that kernel 2.6 is no longer supported by Docker since Docker 1.8.0; the last available builds for 2.6 based distro's (RHEL6/CentOS6) is docker 1.7.1

Upvotes: 1

Maniankara
Maniankara

Reputation: 452

This is a known issue with kernels order than 2.6.32-431. Reason being:

"Since it is also not possible to get systemd up on RH6 using lxc."

I tried testing in CentOS6.3 (which is very similar to RedHat/OracleLinux) which had 2.6.32-279.5.2.el6.x86_64 kernel and got the same problem (More information was in the logs).

[user@localhost ~]$ docker -v
Docker version 1.7.1, build 786b29d
[user@localhost ~]$ docker run  hello-world
Error response from daemon: Cannot start container 6853f515819f8928fa5a9b4f2b2af2c117e2c6183dbc1f9ea59c29a28adc45a8: no such file or directory
[user@localhost ~]$ 

There is however a work around by upgrading your kernel if that is an option. So I upgraded the kernel (2.6.32-573.12.1.el6.x86_64) and docker works !

PS: Do not do this in production systems without testing.

[root@localhost ~]# yum -y update kernel
Loaded plugins: fastestmirror, presto
Loading mirror speeds from cached hostfile
 * base: ftp.crc.dk
...
Dependency Updated:
  dracut.noarch 0:004-388.el6    dracut-kernel.noarch 0:004-388.el6    dracut-network.noarch 0:004-388.el6    kernel-firmware.noarch 0:2.6.32-573.12.1.el6   

Complete!
[user@localhost ~]$ reboot
...
[user@localhost ~]$ uname -r
2.6.32-573.12.1.el6.x86_64
[user@localhost ~]$ docker run hello-world

Hello from Docker.
...
For more examples and ideas, visit:
 https://docs.docker.com/userguide/

[user@localhost ~]$ 

So, I recommend you to check if you have an older version of kernel < 2.6.32-431 and do a kernel upgrade and test it out.

Upvotes: 2

Related Questions