【问题标题】:Running docker using linux kernel 4.3.0 got iptables nat error使用 linux kernel 4.3.0 运行 docker 得到 iptables nat 错误
【发布时间】:2016-03-15 15:46:31
【问题描述】:

我将我的 debian 内核升级到 4.3.0

root@qa-control-nce-yuztest1:/usr/src/kernels/linux-4.3# uname -a
Linux qa-control-nce-yuztest1 4.3.0 #1 SMP Thu Dec 10 00:47:22 CST 2015 x86_64 GNU/Linux

错误发现 docker daemon ha

root@qa-control-nce-yuztest1:/usr/src/kernels/linux-4.3# docker -d
Warning: '-d' is deprecated, it will be removed soon. See usage.
WARN[0000] please use 'docker daemon' instead.          
WARN[0000] Udev sync is not supported. This will lead to unexpected behavior, data loss and errors. For more information, see https://docs.docker.com/reference/commandline/daemon/#daemon-storage-driver-option 
INFO[0000] API listen on /var/run/docker.sock           
WARN[0000] Usage of loopback devices is strongly discouraged for production use. Please use `--storage-opt dm.thinpooldev` or use `man docker` to refer to dm.thinpooldev section. 
INFO[0000] [graphdriver] using prior storage driver "devicemapper" 
FATA[0000] Error starting daemon: Error initializing network controller: error obtaining controller instance: Failed to create NAT chain: iptables failed: iptables -t nat -N DOCKER: iptables v1.4.14: 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) 

似乎iptables nat table 不存在,但我不知道如何处理。

需要您的帮助,在此先感谢!

【问题讨论】:

  • 有人可以帮忙吗?
  • 您找到解决方案了吗?

标签: docker iptables


【解决方案1】:

您需要一个配置了 iptables nat 的内核。我怀疑是因为您自己升级了内核,这意味着您没有使用发行版提供的内核?在这种情况下,您可能从头开始配置它并且没有启用 iptables nat。

运行配置('make menuconfig')时,搜索'_nat',通过它找到iptables nat配置,并启用它。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-08-30
    • 1970-01-01
    • 2013-01-30
    • 2016-05-31
    • 1970-01-01
    相关资源
    最近更新 更多