# docker run -d -p 80:80 demo
 

linux 运行docker 镜像报错:

/usr/bin/docker-current: Error response from daemon: oci runtime error: container_linux.go:235: starting container process caused "process_linux.go:245: running exec setns process for init caused \"exit status 30\"".
 

[root@izuf6hk9yepi9n3i7bg6pkz share]# docker run -d -p 80:80 demo
050a6cee1ff09155f02a670f545d7b013db68e641156806c28d552267531af0d
/usr/bin/docker-current: Error response from daemon: oci runtime error: container_linux.go:235: starting container process caused "process_linux.go:245: running exec setns process for init caused \"exit status 30\"".
[root@izuf6hk9yepi9n3i7bg6pkz share]# rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
[root@izuf6hk9yepi9n3i7bg6pkz share]# rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-2.el7.elrepo.noarch.rpm
Retrieving http://www.elrepo.org/elrepo-release-7.0-2.el7.elrepo.noarch.rpm
Retrieving http://elrepo.org/elrepo-release-7.0-4.el7.elrepo.noarch.rpm
Preparing...                          ################################# [100%]
Updating / installing...
   1:elrepo-release-7.0-4.el7.elrepo  ################################# [100%]
[root@izuf6hk9yepi9n3i7bg6pkz share]# yum --enablerepo=elrepo-kernel install  kernel-ml-devel kernel-ml -y
Loaded plugins: fastestmirror, product-id, search-disabled-repos, subscription-manager

This system is not registered with an entitlement server. You can use subscription-manager to register.

Loading mirror speeds from cached hostfile
 * elrepo: mirrors.tuna.tsinghua.edu.cn
 * elrepo-kernel: mirrors.tuna.tsinghua.edu.cn
elrepo                                                                                        | 2.9 kB  00:00:00     
elrepo-kernel                                                                                 | 2.9 kB  00:00:00     
(1/2): elrepo-kernel/primary_db                                                               | 1.9 MB  00:00:00     
(2/2): elrepo/primary_db                                                                      | 472 kB  00:00:00     
Resolving Dependencies
--> Running transaction check
---> Package kernel-ml.x86_64 0:5.6.11-1.el7.elrepo will be installed
---> Package kernel-ml-devel.x86_64 0:5.6.11-1.el7.elrepo will be installed
--> Finished Dependency Resolution

Dependencies Resolved

=====================================================================================================================
 Package                      Arch                Version                           Repository                  Size
=====================================================================================================================
Installing:
 kernel-ml                    x86_64              5.6.11-1.el7.elrepo               elrepo-kernel               49 M
 kernel-ml-devel              x86_64              5.6.11-1.el7.elrepo               elrepo-kernel               13 M

Transaction Summary
=====================================================================================================================
Install  2 Packages

Total download size: 62 M
Installed size: 272 M
Downloading packages:
(1/2): kernel-ml-5.6.11-1.el7.elrepo.x86_64.rpm                                               |  49 MB  00:00:06     
(2/2): kernel-ml-devel-5.6.11-1.el7.elrepo.x86_64.rpm                                         |  13 MB  00:00:18     
---------------------------------------------------------------------------------------------------------------------
Total                                                                                3.4 MB/s |  62 MB  00:00:18     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Warning: RPMDB altered outside of yum.
  Installing : kernel-ml-devel-5.6.11-1.el7.elrepo.x86_64                                                        1/2 
  Installing : kernel-ml-5.6.11-1.el7.elrepo.x86_64                                                              2/2 
  Verifying  : kernel-ml-5.6.11-1.el7.elrepo.x86_64                                                              1/2 
  Verifying  : kernel-ml-devel-5.6.11-1.el7.elrepo.x86_64                                                        2/2 

Installed:
  kernel-ml.x86_64 0:5.6.11-1.el7.elrepo                 kernel-ml-devel.x86_64 0:5.6.11-1.el7.elrepo                

Complete!
[root@izuf6hk9yepi9n3i7bg6pkz share]# docker run -d -p 80:80 demo
3135920f25bff4404d2f780738cbff1468d074bd82094f50a175d167700fa535
[root@izuf6hk9yepi9n3i7bg6pkz share]# 

 

解决办法:

环境为centos7,linux内核版本为3.10

出现该问题的原因是内核3.10的bug,升级linux内核即可,升级办法如下,升级完成后重启系统,选择对应的内核版本启动即可。

 

1、导入key
rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org

2、安装elrepo的yum源
rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-2.el7.elrepo.noarch.rpm

3、安装内核
在yum的ELRepo源中,有mainline颁布的,可以这样安装:
yum --enablerepo=elrepo-kernel install  kernel-ml-devel kernel-ml -y

Logo

更多推荐