failed to start daemon: Error initializing network controller: Error creating default "bridge" network: Failed to program NAT chain: Failed to inject DOCKER in PREROUTING chain: iptables failed: iptables --wait -t nat -A PREROUTING -m addrtype --dst-type LOCAL -j DOCKER: iptables: No chain/target/match by that name.
时间: 2024-04-25 10:27:43 浏览: 218
这个错误通常与Docker网络设置有关。它表示Docker无法创建名为“bridge”的默认网络,因为在设置NAT链时出现了错误。具体来说,这个错误可能是由于iptables配置错误或者iptables未正确安装导致的。你可以尝试重新安装iptables或者检查iptables配置文件以解决这个问题。另外,你也可以尝试在Docker启动时指定--iptables选项,以使用不同的iptables配置文件。
相关问题
Error starting daemon: Error initializing network controller: error obtaining controller instance: failed to create NAT chain DOCKER: iptables failed: iptables -t nat -N DOCKER: iptables v1.8.4 (legacy): can't initialize iptables table `nat': Permission denied (you must be root)
这个错误是因为你没有足够的权限来创建Docker容器的网络规则。在Linux上,只有root用户才有足够的权限来创建网络规则。因此,你需要以root用户身份运行Docker。
你可以使用以下命令来以root用户身份启动Docker:
```
sudo systemctl start docker
```
如果你还没有将当前用户添加到docker用户组中,则还需要使用以下命令将当前用户添加到docker用户组中:
```
sudo usermod -aG docker $USER
```
然后你需要注销并重新登录才能使更改生效。
could not get initial namespace: no such file or directory WARN[2016-11-04T01:17:08.269217466+08:00] Could not load necessary modules for IPSEC rules: protocol not supported ERRO[2016-11-04T01:17:08.284856383+08:00] failed to set to initial namespace, readlink /proc/4402/task/4402/ns/net: no such file or directory, initns fd -1: bad file descriptor INFO[2016-11-04T01:17:08.286181674+08:00] Default bridge (docker0) is assigned with an IP address 172.17.0.0/16. Daemon option --bip can be used to set a preferred IP address ERRO[2016-11-04T01:17:08.287561174+08:00] failed to set to initial namespace, readlink /proc/4402/task/4402/ns/net: no such file or directory, initns fd -1: bad file descriptor INFO[2016-11-04T01:17:08.450880466+08:00] stopping event stream following graceful shutdown error="<nil>" module=libcontainerd namespace=moby failed to start daemon: Error initializing network controller: Error creating default "bridge" network: Failed to program NAT chain: Failed to inject DOCKER in PREROUTING chain: iptables failed: iptables --wait -t nat -A PREROUTING -m addrtype --dst-type LOCAL -j DOCKER: iptables: No chain/target/match by that name. (exit status 1)
这个错误看起来是Docker容器引起的问题。它指出了在启动Docker守护进程时出现了一些网络问题,无法初始化网络控制器。这可能是由于iptables规则不正确或未正确配置网络桥接引起的。您可以尝试重新安装或更新Docker,检查iptables规则是否正确,并确保网络配置正确。如果问题仍然存在,请提供更多的信息以便我能够更好地帮助您解决问题。
阅读全文