使用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. linux查找服务位置

  2. x264码率控制

    1. x264 1.1 preset 的参数主要调节编码速度和质量的平衡,有ultrafast.superfast.veryfast.faster.fast.medium.slow.slower.ve ...

  3. (K8s学习笔记三)创建Namespace

    Namespace(命名空间)很多情况下用于实现多租户的资源隔离.Namespace通过将集群内部的资源对象"分配"到不同的Namespace中,形成逻辑上分为不同项目.小组或用户 ...

  4. python os.path模块函数功能

    1.os.path.abspath(path) 获取绝对路径,实际上等于os.getcwd()+path 2.os.path.basename(path)取path最后的文件或文件名.如果path以/ ...

  5. SAP 结构转JSON

    *使用方式 jsonstr = zui2_json=>serialize( data = ls_in compress = abap_true pretty_name = zui2_json=& ...

  6. vuexy full-wersion项目安装报错问题处理

    npm install grpc@1.23.3 --ignore-scripts npm rebuild node-sass

  7. 结构体struct

    在 C# 中,结构体是值类型数据结构.它使得一个单一变量可以存储各种数据类型的相关数据.struct 关键字用于创建结构体. 结构体是用来代表一个记录.假设您想跟踪图书馆中书的动态.您可能想跟踪每本书 ...

  8. Guava Retry重试机制

    1.添加pom依赖 <dependency> <groupId>com.github.rholder</groupId> <artifactId>gua ...

  9. Software--电商平台系统--P1 需求分析

    2018-01-11  13:58:43 电商平台 需求 1. 网站的页面展示 页面的布局: Product Catalog (商品目录浏览功能): 首页显示"置顶" 商品:   ...

  10. js下载文件防止白屏

    思路:用js创建一个iframe,让后指定src为下载目录. var ifup = document.getElementById("xman-activity-export-downLoa ...