使用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. centos7.6 dokcer-compose在线和离线安装

    在线安装可参考官网文档:https://docs.docker.com/compose/install/#install-compose curl -SL https://github.com/doc ...

  2. java8 升级 17 兼容测试 emt4j

    测试兼容性的,emt4j 在readme 里 download 节目,点击下载 https://github.com/adoptium/emt4j /root/emt4j-0.3/bin/analys ...

  3. ERA5气压层数据驱动WRF的一些问题

    感谢Dawn的建议,兰溪之水的WRF教程 参考了一些经验,并结合实际后,成功用ERA5驱动WRF.实际上,用ERA5数据驱动WRF的方法和用ERA-Interim 数据驱动WRF极其类似. 总结几点是 ...

  4. prometheus Alertmanager webhook

      一.自定义邮件告警 二.使用docker部署微信机器人告警 1.制作镜像 2.启动容器和指定webhook容器 一.自定义邮件告警 在alertmanager服务的配置文件中指定自定义告警文件 # ...

  5. Web开发 学习 调试 调优

    目录 快捷操作 调试方法 基本调试方法 修改参数和请求重发 Chrome抓包分析 性能优化 安全 cURL请求 参考 参考:MDN 调试HTML 参考:什么是浏览器开发者工具? 参考:检查和编辑页面与 ...

  6. Java 日期类 处理

    原始方案:SimpleDateFormat sdf = new SimpleDateFormat("YYYY-MM-DD"); //线程不安全类,最好不要用了,替代方案: Date ...

  7. SAP 常见函数

    *大小写转换 TRANSLATE STRING TO UPPER CASE. TRANSLATE STRING TO LOWER CASE. *前缀去零 CALL FUNCTION 'CONVERSI ...

  8. ResponseUtil 请求返回

    package com.infosec.sso.common; import java.io.IOException; import java.util.HashMap; import java.ut ...

  9. 敌兵布阵 HDU - 1166 - 单点修改,区间查询:树状数组/线段树

    C国的死对头A国这段时间正在进行军事演习,所以C国间谍头子Derek和他手下Tidy又开始忙乎了.A国在海岸线沿直线布置了N个工兵营地,Derek和Tidy的任务就是要监视这些工兵营地的活动情况.由于 ...

  10. 面试视频知识点整理1-7(http协议)

    http协议类 1)http协议的主要特点             简单快速   统一资源符 灵活          通过http协议,可以修改http头,完成不同数据类型的传输 无连接        ...