OS:Debian Gnu/Linux 10.7
Kernel:Debian 5.9.6-1~bpo10+1 (2020-11-19) x86_64 GNU/Linux
firewall:nftables v0.9.0 (Fearless Fosdick)
docker:Docker version 18.09.1, build 4c52b90
問題描述:本機使用了nftables作爲默認防火牆組件,使用apt-get install docker.io安裝docker後,執行命令“systemctl restart docker” 後docker異常,通過命令“jjournalctl -u docker.service”查看重啓詳細過程,發現如下錯誤:
1月 08 07:43:04 localhost dockerd[18260]: time="2021-01-08T07:43:04.938383895+08:00" level=info msg="pickfirstBalancer: HandleSubConnStateChange: 0xc000884200, CONNECTING" module=grpc
1月 08 07:43:05 localhost dockerd[18260]: Error starting daemon: Error initializing network controller: error obtaining controller instance: failed to create FILTER chain DOCKER: iptables failed: iptables -t filter -N DOCKER: iptables v1.8.2 (nf_tables): Chain already exists
1月 08 07:43:05 localhost dockerd[18260]: (exit status 1)
問題解決方法:
1、systemctl stop docker
2、ip link set docker0 down
3、brctl delbr docker0
4、systemctl restart nftables.server
5、systemctl start docker