Loading... 问题背景 在服务器上修改了端口的相关配置,导致jenkins的容器启动失败,报如下错误: ```shell Cannot start service jenkins: driver failed programming external connectivity on endpoint jenkins (289b01f799f57f40a1bca130235548bf664dcb7ca042ea74f6fa7fa578c5913c): (iptables failed: iptables --wait -t nat -A DOCKER -p tcp -d 0/0 --dport 50000 -j DNAT --to-destination 172.17.0.2:50000 ! -i docker0: iptables: No chain/target/match by that name. ``` 解决方案 根据前半段的信息去 google 上查找问题,发现并没有相关的资料。看到里面有关键字iptables,觉得问题应该在这。直接搜索 `iptables: No chain/target/match by that name` 找到了答案。 1. 清空所有的 iptables chains ```shell sudo iptables -t filter -F sudo iptables -t filter -X ``` 2. 重启 docker 服务即可 ```shell sudo systemctl restart docker ``` 最后修改:2022 年 10 月 25 日 © 允许规范转载 赞 如果觉得我的文章对你有用,请随意赞赏
此处评论已关闭