Pengwin
Pengwin copied to clipboard
Failed to start service Docker on WSL2
**Trying to setup docker with real linux kernel. Followed wsl2 migration steps for WLinux. Post migration installed docker. Docker daemon not starting. ** A clear and concise description of what the bug is.
To Reproduce Steps to reproduce the behavior:
- Migrate to wsl2
- install latest docker
- sudo service docker start
- See error
time="2019-07-06T12:35:24.385197200+05:30" level=warning msg="Running modprobe bridge br_netfilter failed with message: modprobe: ERROR: ../libkmod/libkmod.c:586 kmod_search_moddep() could not open moddep file '/lib/modules/4.19.43-microsoft-standard/modules.dep.bin'\nmodprobe: WARNING: Module bridge not found in directory /lib/modules/4.19.43-microsoft-standard\nmodprobe: ERROR: ../libkmod/libkmod.c:586 kmod_search_moddep() could not open moddep file '/lib/modules/4.19.43-microsoft-standard/modules.dep.bin'\nmodprobe: WARNING: Module br_netfilter not found in directory /lib/modules/4.19.43-microsoft-standard\n, error: exit status 1"
time="2019-07-06T12:35:24.386495900+05:30" level=warning msg="Running modprobe nf_nat failed with message: modprobe: ERROR: ../libkmod/libkmod.c:586 kmod_search_moddep() could not open moddep file '/lib/modules/4.19.43-microsoft-standard/modules.dep.bin'\nmodprobe: WARNING: Module nf_nat not found in directory /lib/modules/4.19.43-microsoft-standard, error: exit status 1"
time="2019-07-06T12:35:24.387748100+05:30" level=warning msg="Running modprobe xt_conntrack failed with message: modprobe: ERROR: ../libkmod/libkmod.c:586 kmod_search_moddep() could not open moddep file '/lib/modules/4.19.43-microsoft-standard/modules.dep.bin'\nmodprobe: WARNING: Module xt_conntrack not found in directory /lib/modules/4.19.43-microsoft-standard, error: exit status 1"
time="2019-07-06T12:35:24.410128900+05:30" level=info msg="stopping event stream following graceful shutdown" error="
Expected behavior Docker daemon should start successfully and should be able to pull images from registry
Screenshots If applicable, add screenshots to help explain your problem.
Additional context Add any other context about the problem here.
Basic Troubleshooting Checklist
[Yes] I have searched Google for the error message. [Yes] I have checked official WSL troubleshooting documentation: https://docs.microsoft.com/en-us/windows/wsl/troubleshooting#confirm-wsl-is-enabled. [ Yes] I have searched the official Microsoft WSL issues page: https://github.com/Microsoft/WSL/issues. [ Yes] I have searched the Pengwin issues page: https://github.com/WhitewaterFoundry/Pengwin/issues. [ Yes] I have reset Pengwin: Settings->Apps->Apps & features->Pengwin->Advanced Options->Reset. [ Yes] I have disabled and re-enabled WSL in Windows Features. [ Yes] I have run Windows 10 updates and restarted.
What other troubleshooting have you attempted?
Insert here:
Pengwin Version
Find: Settings->Apps->Apps & features->Pengwin->Advanced Options->Version.
Version 1.2.5.0
Windows Build
Run 'systeminfo | findstr /C:"OS"' in Command Prompt and insert here: OS Name: Microsoft Windows 10 Home Insider Preview Single Language OS Version: 10.0.18932 N/A Build 18932 OS Manufacturer: Microsoft Corporation OS Configuration: Standalone Workstation OS Build Type: Multiprocessor Free BIOS Version: American Megatrends Inc. E16P5IMS.108, 23-04-2018
For help on retrieving: https://docs.microsoft.com/en-us/windows/wsl/troubleshooting#check-your-build-number
Exactly same as https://github.com/microsoft/WSL/issues/4165.
Thank you @Biswa96, I ran across an answer of yours on some other topic on Stack Overflow a few days ago. Always so helpful.
The docker installer uses iptables for nat. Unfortunately Debian uses a modified version of nftables. You can convert the entries over to nftables or just setup Debian to use the legacy iptables.
sudo update-alternatives --set iptables /usr/sbin/iptables-legacy sudo update-alternatives --set ip6tables /usr/sbin/ip6tables-legacy
dockerd, should start fine after switching to iptables-legacy.
sudo service docker start
-blemis
Thx a lot @blemis ! I had the same issue and now it's fixed !
Incredible that this solution still works. Also you can check this: https://github.com/WhitewaterFoundry/Pengwin/discussions/734