內核目前版本
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表丟失的問題????求大神指導···········
uj5u.com熱心網友回復:
這個升級內核導致模塊缺失可以重置docker的運行環境試試,如下:pkill docker
iptables -t nat -F
ifconfig docker0 down
brctl delbr docker0
docker -d
uj5u.com熱心網友回復:
您好,非常感謝您的回復,但好像還是不行····輸入: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)
腫么破??
uj5u.com熱心網友回復:
我也碰到了相同的問題,請問你這個問題解決掉了嗎?uj5u.com熱心網友回復:
內核版本只要是2.6.32-431.el6.x86_64或者以上的都沒問題,日志報你的內核版本過低可能是你的函式庫版本過低,嘗試更新下面的程式試試。yum upgrade device-mapper-libs -y
uj5u.com熱心網友回復:
樓主解決了沒,問題與你描述的一樣一樣的。。uj5u.com熱心網友回復:
謝謝,按照這個方式解決了問題uj5u.com熱心網友回復:
重新安裝內核,之前配置下內核支持NAT轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/44152.html
標籤:Docker
