gpt4 book ai didi

linux - 运行 hello-world 的 Oracle Linux 上的 “Error response from daemon: Cannot start container … no such file or directory”

转载 作者:塔克拉玛干 更新时间:2023-11-02 23:49:54 24 4
gpt4 key购买 nike

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

我正在尝试在 Oracle Linux 机器上安装和运行 Docker。我已按照 Oracle 网页 ( https://docs.oracle.com/cd/E37670_01/E37355/html/section_kfy_f2z_fp.html ) 上的说明进行操作,但遇到了一些问题。

在安装 docker-engine 时,我遇到了 UEK 包的一些依赖性问题,但我可以按照本页 (https://docs.oracle.com/cd/E37670_01/E37355/html/ol_obtain_uek.html) 上的说明解决这些问题。

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

谁能帮我解决这个问题?

我对 Linux 和 Docker 的了解都很少,所以如果我忘记提及任何重要信息,请询问!!=o)

最佳答案

这是一个已知的 issue内核顺序高于 2.6.32-431 .原因是:

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

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

[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 ~]$

不过,如果可以的话,可以通过升级内核来解决这个问题。所以我升级了内核(2.6.32-573.12.1.el6.x86_64)并且 docker 工作了!

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 ~]$

因此,我建议您检查是否有旧版本的内核 < 2.6.32-431 并进行内核升级并进行测试。

关于linux - 运行 hello-world 的 Oracle Linux 上的 “Error response from daemon: Cannot start container … no such file or directory”,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34796125/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com