Get the App
SLTechnology News&Howtos  ›  Servers  › 

What errors will be encountered when installing docker on centos-6.5 that is upgraded to kernel-3.17

Shulou Source: shulou.com Published: 2022-06-01 02:14:27 09月26日 Update

Editor to share with you what errors you will encounter when installing docker on the centos-6.5 upgraded to kernel-3.17, I believe most people do not know much about it, so share this article for your reference. I hope you will gain a lot after reading this article. Let's learn about it together.

Install docker on the centos-6.5 upgraded to kernel-3.17 and execute the following command directly:

Yum install golangyum install docker-iochkconfig add dockerservice docker start

However, the following error occurred:

[root@osd2 ~] # service docker startStarting cgconfig service: Error: cannot mount memory to / cgroup/memory: No such file or directory/sbin/cgconfigparser; error loading / etc/cgconfig.conf: Cgroup mounting failedFailed to parse / etc/cgconfig.conf [FAILED] Starting docker: [OK] [root@osd2 ~] # service docker start [root@osd2 ~] # service docker statusdocker dead but pid file exists

Check the cgconfig:

[root@osd2 ~] # / etc/init.d/cgconfig statusStopped [root@osd2 ~] # / etc/init.d/cgconfig startStarting cgconfig service: Error: cannot mount memory to / cgroup/memory: No such file or directory/sbin/cgconfigparser; error loading / etc/cgconfig.conf: Cgroup mounting failedFailed to parse / etc/cgconfig.conf [FAILED] [root@osd2 ~] # ls / cgroup/blkio devices freezer memory net_cls

There is memory, but it is an error and needs to be modified:

[root@osd2] # cat / etc/cgconfig.conf## Copyright IBM Corporation. 2007 Authors: Balbir Singh # This program is free software; you can redistribute it and/or modify it# under the terms of version 2.1 of the GNU Lesser General Public License# as published by the Free Software Foundation.## This program is distributed in the hope that it would be useful, but# WITHOUT ANY WARRANTY; without even the implied warranty of# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.## See man cgconfig.conf for further details.## By default, mount all controllers to / cgroup/mount {cpuset = / cgroup/cpuset Cpu = / cgroup/cpu; cpuacct = / cgroup/cpuacct;# memory = / cgroup/memory; devices = / cgroup/devices; freezer = / cgroup/freezer; net_cls = / cgroup/net_cls; blkio = / cgroup/blkio;}

Start cgconfig again and everything is fine. However, when you restart docker, you still get an error:

[root@osd2 ~] # service docker statusdocker dead but pid file exists [root@osd2 ~] # tailf / var/log/docker\ nMon Jan 5 14:04:33 CST 2015\ n2015 docker daemon 05 14:04:33 docker daemon: 1.3.2 39fa2max 1.3.2; execdriver: native Graphdriver: [910cf963] + job serveapi (unix:///var/run/docker.sock) [910cf963] + job init_networkdriver () [info] Listening for HTTP on unix (/ var/run/docker.sock) Unable to enable network bridge NAT: iptables failed: iptables-I POSTROUTING-t nat-s 172.17.42.1 Unable to enable network bridge NAT 16!-o docker0-j MASQUERADE: iptables v1.4.7: can't initialize iptables table `nat': Table does not exist (do you need to insmod?) Perhaps iptables or your kernel needs to be upgraded. (exit status 3) [910cf963]-job init_networkdriver () = ERR (1) 14:04:33 on 2015-01-05 (exit status 3)

The log shows that the nat bridge cannot be created. Take a look at the normal docker environment and modules:

[root@lm backup] # lsmod | grep natebtable_nat 2009 0 ebtables 18135 1 ebtable_natiptable_nat 6051 1 nf_nat 23316 2 ipt_MASQUERADE,iptable_natnf_conntrack_ipv4 9506 4 iptable_nat,nf_natnf_conntrack 80390 6 xt_conntrack,xt_state,ipt_MASQUERADE,iptable_nat,nf_nat,nf_conntrack_ipv4ip_tables 17831 3 iptable_nat,iptable_mangle Iptable_ filter [root @ lm backup] # find / lib/modules/2.6.32-504.1.3.el6.x86_64/-name "* nat*" / lib/modules/2.6.32-504.1.3.el6.x86_64/kernel/net/ipv4/netfilter/nf_nat_proto_dccp.ko/lib/modules/2.6.32-504.1.3.el6.x86_64/kernel/net/ipv4/netfilter/nf_nat_proto_udplite .ko / lib/modules/2.6.32-504.1.3.el6.x86_64/kernel/net/ipv4/netfilter/nf_nat_ftp.ko/lib/modules/2.6.32-504.1.3.el6.x86_64/kernel/net/ipv4/netfilter/nf_nat_proto_sctp.ko/lib/modules/2.6.32-504.1.3.el6.x86_64/kernel/net/ipv4/netfilter/nf_nat_proto_gre.ko / lib/modules/2.6.32-504.1.3.el6.x86_64/kernel/net/ipv4/netfilter/nf_nat_sip.ko/lib/modules/2.6.32-504.1.3.el6.x86_64/kernel/net/ipv4/netfilter/nf_nat_tftp.ko/lib/modules/2.6.32-504.1.3.el6.x86_64/kernel/net/ipv4/netfilter/nf_nat_pptp.ko/lib/modules/2 .6.32-504.1.3.el6.x86_64/kernel/net/ipv4/netfilter/nf_nat.ko/lib/modules/2.6.32-504.1.3.el6.x86_64/kernel/net/ipv4/netfilter/iptable_nat.ko/lib/modules/2.6.32-504.1.3.el6.x86_64/kernel/net/ipv4/netfilter/nf_nat_snmp_basic.ko/lib/modules/2.6.32-504.1 .3.el6.x86 _ 64/kernel/net/ipv4/netfilter/nf_nat_amanda.ko/lib/modules/2.6.32-504.1.3.el6.x86_64/kernel/net/ipv4/netfilter/nf_nat_h423.ko/lib/modules/2.6.32-504.1.3.el6.x86_64/kernel/net/ipv4/netfilter/nf_nat_irc.ko/lib/modules/2.6.32-504.1.3.el6.x86 _ 64/kernel/net/bridge/netfilter/ebt_snat.ko/lib/modules/2.6.32-504.1.3.el6.x86_64/kernel/net/bridge/netfilter/ebt_dnat.ko/lib/modules/2.6.32-504.1.3.el6.x86_64/kernel/net/bridge/netfilter/ebtable_nat.ko/lib/modules/2.6.32-504.1.3.el6.x86_64/kernel/net/sched/act_nat .ko / lib/modules/2.6.32-504.1.3.el6.x86_64/kernel/drivers/net/natsemi.ko/lib/modules/2.6.32-504.1.3.el6.x86_64/kernel/drivers/net/phy/national.ko

The environment in which the kernel was compiled:

[root@osd2 /] # lsmod | grep natebtable_nat 2071 0 ebtables 26518 1 ebtable_ [root @ osd2 modprobe.d] # find / lib/modules/3.17.4/-name "* nat*" / lib/modules/3.17.4/kernel/net/sched/act_nat.ko/lib/modules/3.17.4/kernel/net/bridge/netfilter/ebt_snat.ko/lib/modules/3.17.4/ Kernel/net/bridge/netfilter/ebt_dnat.ko/lib/modules/3.17.4/kernel/net/bridge/netfilter/ebtable_nat.ko/lib/modules/3.17.4/kernel/drivers/net/ethernet/natsemi/lib/modules/3.17.4/kernel/drivers/net/ethernet/natsemi/natsemi.ko/lib/modules/3.17.4/kernel/drivers/net/phy/national.ko

The above error is caused by the lack of the nat module, which requires recompiling the kernel or using the old kernel.

The above is all the contents of the article "what errors will be encountered when installing docker on centos-6.5 upgraded to kernel-3.17". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Tags: Errors upgrades kernels articles content environment compilation not much again commands most that is logs more modules knowledge industry information channels channels Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Huawei Microsoft MySQL vpn OPPO Reno