WSL: WSL2 Kernel do not support `nftables` and causing docker failed to start up in Ubuntu 20.10+
Environment
Windows build number: 21327
Your Distribution version: Ubuntu Hirsute Hippo (development branch)
Whether the issue is on WSL 2 and/or WSL 1: WSL2
Steps to reproduce
- Installing Ubuntu 20.10 (the best way is Ubuntu on Windows Community Preview)
- installing docker from the ubuntu repository (
sudo apt install docker.io) - start
dockerd;
Expected behavior
dockerd should end up at the state API listen on /var/run/docker.sock
Actual behavior
dockerd throws the following error:
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))
Some related stuff
related article: https://patrickwu.space/2021/03/09/wsl-solution-to-native-docker-daemon-not-starting/ related bug report: https://bugs.launchpad.net/ubuntu-wsl-integration/+bug/1908539
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 9
- Comments: 17
wsl2 ubuntu 22.04, This worked for me
This saved the day! Thanks! 😃
Thanks a lot. wsl2 ubuntu 22.04 with Docker Desktop in Windows 10 Enterprise 21H2 here. You saved my day! 😄
From the output of
uname -ain your Debian distribution, it seems that it is still running in WSL1 environment. You can confirm that by runningwsl.exe -l -vcommand. If yes, try to convert the distribution withwsl.exe --set-version Debian 2command.Thanks a lot, docker is running!
This seems to be an old issue. dockerd works without those iptables commands in newer Linux distributions with WSL from Windows Store.
It also works in Debian distro