简体   繁体   English

“来自守护进程的错误响应:无法启动容器......没有这样的文件或目录”在Oracle Linux上运行hello-world

[英]“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 TLDR:我试图在Oracle Linux上运行hello-world容器,我收到一条错误消息:来自守护进程的错误响应:无法启动容器724ed94d9249b636d6820fb8c2e4ba64232f426812e5b03545762 532751f434e:[8]系统错误:mkdir / var / lib / docker / devicemapper / mnt / 724ed94d9249b636d6820fb8c2e4ba6423 2f426812e5b03545762532751f434e / rootfs / sys / fs / cgroup:没有这样的文件或目录

I am trying to install and run Docker on a Oracle Linux machine. 我正在尝试在Oracle Linux机器上安装和运行Docker。 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. 我已按照Oracle网页上的说明进行操作( https://docs.oracle.com/cd/E37670_01/E37355/html/section_kfy_f2z_fp.html ),但遇到了一些问题。

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 ). 安装docker-engine时,我遇到了UEK软件包的依赖问题,但我可以通过此页面上的说明解决这些问题( 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: docker-engine似乎运行得很好,但是当我尝试运行hello-world容器时出现错误:

[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) 我对Linux和Docker的了解很少,所以如果我忘了提及任何重要信息,请问!! = o)

This is a known issue with kernels order than 2.6.32-431 . 这是内核订单的已知问题 ,而不是2.6.32-431 Reason being: 原因是:

"Since it is also not possible to get systemd up on RH6 using lxc." “因为也不可能使用lxc在RH6上进行系统化。”

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). 我尝试在CentOS6.3(与RedHat / OracleLinux非常相似)中进行测试,该内核具有2.6.32-279.5.2.el6.x86_64内核并且遇到了同样的问题(更多信息在日志中)。

[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 ! 所以我升级了内核(2.6.32-573.12.1.el6.x86_64)和docker的工作原理!

PS: Do not do this in production systems without testing. PS:没有测试,不要在生产系统中这样做。

[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. 因此,我建议您检查是否有旧版本的内核<2.6.32-431并进行内核升级并测试它。

To run Docker on Oracle linux, you need the "Unbreakable Enterprise Kernel" 3.8 or higher installed. 要在Oracle Linux上运行Docker,您需要安装“Unbreakable Enterprise Kernel”3.8或更高版本。

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; 请注意,自Docker 1.8.0以来,Docker不再支持内核2.6; the last available builds for 2.6 based distro's (RHEL6/CentOS6) is docker 1.7.1 基于2.6的发行版(RHEL6 / CentOS6)的最新可用版本是docker 1.7.1

The kernel you need is kernel-uek, not "kernel". 你需要的内核是kernel-uek,而不是“kernel”。 The normal kernel is RHEL6 compatible and as such it can't have the fixes / updates you need. 普通内核兼容RHEL6,因此无法获得所需的修复/更新。 The UEK kernel works fine. UEK内核工作正常。

Consider also uninstalling the RHEL kernel, I just got a case where a kernel update switched back to the normal kernel on reboot. 考虑还卸载RHEL内核,我刚刚得到一个内核更新在重启时切换回普通内核的情况。 You don't want that to happen :-( 你不希望发生这种情况:-(

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM