使用Windows的WSL 2里面的Ubuntu安装docker之后,启动docker服务一直失败,提示Docker is not running。使用dockerd命令会出现如下错误:

INFO[2023-03-01T18:22:07.565628800+08:00] [core] [Channel #7 SubChannel #8] Subchannel Connectivity change to IDLE  module=grpc
INFO[2023-03-01T18:22:07.565895700+08:00] [core] [Channel #7] Channel Connectivity change to IDLE module=grpc
failed to start daemon: Error initializing network controller: error obtaining controller instance: unable to add return rule in DOCKER-ISOLATION-STAGE-1 chain: (iptables failed: iptables --wait -A DOCKER-ISOLATION-STAGE-1 -j RETURN: iptables v1.8.7 (nf_tables): RULE_APPEND failed (No such file or directory): rule in chain DOCKER-ISOLATION-STAGE-1
(exit status 4))

解决办法:

docker安装程序使用iptables进行nat转换。不幸的是Debian使用nftables。您可以将条目转换为nftables,或者只是设置Debian以使用遗留的iptables。

sudo update-alternatives --set iptables /usr/sbin/iptables-legacy
sudo update-alternatives --set ip6tables /usr/sbin/ip6tables-legacy #启动命令
sudo service docker start

参考链接:

https://forums.docker.com/t/failing-to-start-dockerd-failed-to-create-nat-chain-docker/78269

https://stackoverflow.com/questions/57351688/unable-to-start-docker-in-wsl2-using-new-windows-terminal

https://stackoverflow.com/questions/48008675/run-docker-on-ubuntu-on-windows-subsystem-for-linux/64261697#64261697

docker出现“Failing to start dockerd: failed to create NAT chain DOCKER”错误的更多相关文章

  1. Docker iptables failed: iptables -t nat -A DOCKER -p tcp

    Dokcer网络问题 因为操作或修该过iptables导致docker容器出现如下错误: [root@mysqlserver ~]# docker restart cvnavi-centos-tomc ...

  2. failed to create cublas handle: CUBLAS_STATUS_ALLOC_FAILED 错误解决方法

    解决: config = tf.ConfigProto() config.gpu_options.allow_growth = True session = tf.Session(config=con ...

  3. docker开启2376端口CA认证及IDEA中一键部署docker项目

    嘿,大家好,今天更新的内容是docker开启2376端口CA认证及IDEA中一键部署docker项目... 先看效果 我们可以通过idea一键部署docker项目,还以通过idea的控制台实时查看容器 ...

  4. pip报failed to create process

    使用pip命令的时候报failed to create process 1.错误提示窗口如下图 2.报这个错误的原因,是因为你改动了python的目录名称或位置.因为,我的电脑是安装了anaconda ...

  5. docker: Error response from daemon: driver failed programming external connectivity on endpoint jolly_shockley

    1. docker 启动image错误 docker: Error response from daemon: driver failed programming external connectiv ...

  6. 【docker】docker启动、重启、关闭命令,附带:docker启动容器报错:docker: Error response from daemon: driver failed programming external connectivity on endpoint es2-node

    在关闭并放置centos 的防火墙重启之后[操作:https://www.cnblogs.com/sxdcgaq8080/p/10032829.html] 启动docker容器就发现开始报错: [ro ...

  7. iptables failed: iptables --wait -t nat -A DOCKER -p tcp -d 0/0 --dport 8001 -j DNAT --to-destination 172.17.0.5:8080 ! -i docker0: iptables: No chain/target/match by that name.

    在docker容器上部署项目后,启动docker容器,出现 iptables failed: iptables --wait -t nat -A DOCKER -p tcp -d 0/0 --dpor ...

  8. 运行容器出现docker: Error response from daemon: driver failed programming external connectivity on endpoint elegant_ptolemy (7fe85ca6bd744449ff82b81c1577d73b6821c4e51780c8238fad6aa0cb940522): (iptables fai

    运行容器时出现以下报错: docker: Error response from daemon: driver failed programming external connectivity on ...

  9. 【Docker】iptables failed: iptables --wait -t nat -A DOCKER -p tcp -d 0/0 --dport 8480 -j DNAT --to-destination 172.17.0.2:80 ! -i docker0: iptables: No chain/target/match by that name

    启动容器的时候,出现如下错误: Error response / --dport -j DNAT --to-destination ! -i docker0: iptables: No chain/t ...

  10. 解决Docker容器 iptables问题---docker: Error response from daemon: driver failed programming external connectivity on endpoint quizzical_thompson

    一.问题现象 最近在研究Docker容器日志管理时,启动容器出现iptables相关报错,具体问题如下 运行容器 [root@node-11 ~]# docker run -d -p 24224:24 ...

随机推荐

  1. Eclipse 获取maven项目出现问题汇总

    1.errors occurred during the build,可以试试加上下图的配置,路径根据自己jak安装路径去修改

  2. usb 2.0 packet

    注意PID[7:0] = {~pid[3:0], pid[3:0]}

  3. centos NTP时间同步

    1.先设置时区 timedatectl set-timezone Asia/Shanghai 2安装ntp服务 yum install chrony 3.修改ntp配置文件的ntp服务器 vi /et ...

  4. Java基础__03.异常

    什么是异常? 异常是指程序运行中出现的各种例外情况,如文件找不到.网络连接失败.传参错误...异常发生在程序运行期间,它影响了正常的程序执行流程. 异常体系结构: 在java中,异常是被当作对象来处理 ...

  5. 将pb模型参数提取转成torch模型

    1 import tensorflow as tf 2 import onnx 3 import onnxsim 4 import numpy as np 5 import torch 6 from ...

  6. python 查找文件夹下以特定字符开头的某类型文件 - os.walk

    Python os.walk() 方法 os.walk() 方法用于通过在目录树中游走输出在目录中的文件名,向上或者向下.os.walk() 方法是一个简单易用的文件.目录遍历器,可以帮助我们高效的处 ...

  7. 什么是axios

    原文: https://blog.csdn.net/qq_40837310/article/details/123028044 1.使用格式和jquery的ajax很相似,和最初的相比可以链式调用,1 ...

  8. wsl 的 tail -f 不好使

    windows 上的sub linux ubuntu 的tail -f 不好使 在/etc/profile 中加入alias alias tailf='tail -f ---disable-inoti ...

  9. 瑞士军刀 sox 系列 :给.raw文件添加header变身.wav文件

    1.先去安装 sox https://sourceforge.net/projects/sox/files/sox/ 2.将sox的安装目录加到系统path变量里. 3.开始执行命令 sox -t r ...

  10. select remove option safari 兼容

    select 移除某一 option 的 javascript 公司用的代码是 var ddlPrimaryResource = document.getElementById(ddlPrimaryR ...