当前位置:   article > 正文

Docker 无法启动_failed to start daemon: error initializing network

failed to start daemon: error initializing network controller: error obtaini

环境:WSL2 Ubuntu2204.1.0.7
问题描述:通过 service docker start 启动显示 OK,但是 service docker status 显示 Docker is not running,查看日志 cat /var/log/docker.log 发现如下报错:

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))
  • 1
  • 2

解决方法:切换 iptables 为 legacy 模式

sudo update-alternatives --set iptables /usr/sbin/iptables-legacy
sudo update-alternatives --set ip6tables /usr/sbin/ip6tables-legacy
sudo update-alternatives --set arptables /usr/sbin/arptables-legacy
  • 1
  • 2
  • 3
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/IT小白/article/detail/217945
推荐阅读
相关标签
  

闽ICP备14008679号