Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to start service Docker on WSL2 #485

Open
rsrini7 opened this issue Jul 6, 2019 · 5 comments
Open

Failed to start service Docker on WSL2 #485

rsrini7 opened this issue Jul 6, 2019 · 5 comments
Labels
Upstream Issue This is an issue with an upstream package. User Support This is a user who needs help. Workaround We have a workaround for this issue.

Comments

@rsrini7
Copy link

rsrini7 commented Jul 6, 2019

**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:

  1. Migrate to wsl2
  2. install latest docker
  3. sudo service docker start
  4. 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="" module=libcontainerd namespace=moby
time="2019-07-06T12:35:24.410615600+05:30" level=info msg="stopping event stream following graceful shutdown" error="context canceled" module=libcontainerd namespace=plugins.moby
time="2019-07-06T12:35:24.410643100+05:30" level=info msg="stopping healthcheck following graceful shutdown" module=libcontainerd
time="2019-07-06T12:35:24.411191200+05:30" level=info msg="pickfirstBalancer: HandleSubConnStateChange: 0xc420644480, TRANSIENT_FAILURE" module=grpc
time="2019-07-06T12:35:24.411214100+05:30" level=info msg="pickfirstBalancer: HandleSubConnStateChange: 0xc420644480, CONNECTING" module=grpc
Error starting daemon: Error initializing network controller: error obtaining controller instance: failed to create NAT chain DOCKER: iptables failed: iptables --wait -t nat -N DOCKER: iptables v1.8.2 (nf_tables): CHAIN_ADD failed (No such file or directory): chain PREROUTING

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

@Biswa96
Copy link

Biswa96 commented Jul 6, 2019

Exactly same as microsoft/WSL#4165.

@sirredbeard sirredbeard added Upstream Issue This is an issue with an upstream package. User Support This is a user who needs help. Workaround We have a workaround for this issue. labels Jul 8, 2019
@sirredbeard
Copy link

Thank you @Biswa96, I ran across an answer of yours on some other topic on Stack Overflow a few days ago. Always so helpful.

@blemis
Copy link

blemis commented Aug 4, 2019

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

@C0coleplub0
Copy link

Thx a lot @blemis ! I had the same issue and now it's fixed !

@crramirez
Copy link
Collaborator

Incredible that this solution still works. Also you can check this: #734

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Upstream Issue This is an issue with an upstream package. User Support This is a user who needs help. Workaround We have a workaround for this issue.
Projects
None yet
Development

No branches or pull requests

6 participants