内核目前版本
gnuhealth@localhost:~ $ uname -r 
3.11.6
docker已经启动运行 docker info
gnuhealth@localhost:~ $ sudo docker info 
[sudo] password for gnuhealth: 
FATA[0000] Cannot connect to the Docker daemon. Is 'docker -d' running on this host?
 运行 docker -d
gnuhealth@localhost:~ $ sudo docker -d
INFO[0000] +job serveapi(unix:///var/run/docker.sock)   
INFO[0000] +job init_networkdriver()                    
INFO[0000] Listening for HTTP on unix (/var/run/docker.sock) 
Unable to enable network bridge NAT: iptables failed: iptables --wait -I POSTROUTING -t nat -s 172.17.42.1/16 ! -o docker0 -j MASQUERADE: iptables v1.4.21: 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)
INFO[0000] -job init_networkdriver() = ERR (1)          
FATA[0000]  (exit status 3)
 iptables的版本也升级过,目前版本为
gnuhealth@localhost:~ $ iptables -V
iptables v1.4.21
运行iptables -t net -L
gnuhealth@localhost:~ $ sudo iptables -t net -L
iptables v1.4.21: can't initialize iptables table `net': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
如何解决这个nat表丢失的问题????求大神指导···········

解决方案 »

  1.   

    这个升级内核导致模块缺失可以重置docker的运行环境试试,如下:
    pkill docker
    iptables -t nat -F
    ifconfig docker0 down
    brctl delbr docker0
    docker -d
      

  2.   

    您好,非常感谢您的回复,但好像还是不行····
    输入:iptables -t nat -F  
    lqt@localhost:~ $ sudo iptables -t nat -F
    [sudo] password for gnuhealth: 
    iptables v1.4.21: can't initialize iptables table `nat': Table does not exist (do you need to insmod?)
    Perhaps iptables or your kernel needs to be upgraded.
    后面就是:
    lqt@localhost:~ $ sudo ifconfig docker0 down
    lqt@localhost:~ $ sudo brctl delbr docker0
    lqt@localhost:~ $ sudo docker -d
    INFO[0000] +job serveapi(unix:///var/run/docker.sock)   
    INFO[0000] Listening for HTTP on unix (/var/run/docker.sock) 
    INFO[0000] +job init_networkdriver()                    
    Unable to enable network bridge NAT: iptables failed: iptables --wait -I POSTROUTING -t nat -s 172.17.42.1/16 ! -o docker0 -j MASQUERADE: iptables v1.4.21: 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)
    INFO[0000] -job init_networkdriver() = ERR (1)          
    FATA[0000]  (exit status 3)   
    肿么破??
      

  3.   

    内核版本只要是2.6.32-431.el6.x86_64或者以上的都没问题,日志报你的内核版本过低可能是你的函数库版本过低,尝试更新下面的程序试试。yum upgrade device-mapper-libs -y
      

  4.   

    重新安装内核,之前配置下内核支持NAT