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

Docker ceased working after upgrading to custom kernel version 6.6.36.3 #11771

Closed
1 of 2 tasks
SlowPokeInTexas opened this issue Jul 11, 2024 · 4 comments
Closed
1 of 2 tasks

Comments

@SlowPokeInTexas
Copy link

Windows Version

Microsoft Windows [Version 10.0.22631.3880]

WSL Version

2.2.4.0

Are you using WSL 1 or WSL 2?

  • WSL 2
  • WSL 1

Kernel Version

Linux version 6.6.36.3-microsoft-standard-WSL2+

Distro Version

Ubuntu 23.04

Other Software

Docker Desktop 4.32

Repro Steps

  1. Downloaded and built newest WSL kernel 6.6.36.3-microsoft-standard-WSL2+ (as of 7/11/2024)
  2. Accepted the default kernel build settings
  3. Modified WSL to use the custom kernel
  4. Shutdown and restarted WSL
  5. Docker Desktop won't launch and complains that the docker daemon isn't running
  6. Reverted back to the default WSL kernel (the only change I made)
  7. Docker Desktop and Docker Daemon launch correctly without any other changes than reverting to the default WSL kernel

I have seen this both on my 7950x machine as well as my work Intel laptop. I suspect and fully acknowledge that this could be a PEBKAC problem; there might be a kernel build setting that I should have set.

Expected Behavior

Docker Desktop and Daemon should continue functionin.

Actual Behavior

Docker Desktop complains that the Docker Daemon isn't running

Diagnostic Logs

No response

Copy link

Logs are required for review from WSL team

If this a feature request, please reply with '/feature'. If this is a question, reply with '/question'.
Otherwise please attach logs by following the instructions below, your issue will not be reviewed unless they are added. These logs will help us understand what is going on in your machine.

How to collect WSL logs

Download and execute collect-wsl-logs.ps1 in an administrative powershell prompt:

Invoke-WebRequest -UseBasicParsing "https://raw.githubusercontent.com/microsoft/WSL/master/diagnostics/collect-wsl-logs.ps1" -OutFile collect-wsl-logs.ps1
Set-ExecutionPolicy Bypass -Scope Process -Force
.\collect-wsl-logs.ps1

The scipt will output the path of the log file once done.

Once completed please upload the output files to this Github issue.

Click here for more info on logging
If you choose to email these logs instead of attaching to the bug, please send them to [email protected] with the number of the github issue in the subject, and in the message a link to your comment in the github issue and reply with '/emailed-logs'.

View similar issues

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it!

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

@SlowPokeInTexas
Copy link
Author

SlowPokeInTexas commented Jul 11, 2024

Kindly disregard folks. The bot found a similar issue which was identical to my problem (my apologies for not doing a better job of searching). The TL;DR solution:

  1. Kernel loadable modules are now enabled
  2. The correct modules have to be chosen during the kernel build step.
  3. Chances are you didn't do item 2, or chose the wrong options.
  4. If you use the build configuration file (WSL2-Linux-Kernel/Microsoft/config-wsl) from branch linux-msft-wsl-6.1.y and rebuild, this problem goes away.

@bit-hope
Copy link

bit-hope commented Aug 7, 2024

Here is the Docker check-config.sh (found under docker.docs Kernel Compatibility).

  1. At least, you must modify follow configs in Microsoft/config-wsl from 'm' to 'y':
    CONFIG_BRIDGE=y
    CONFIG_BRIDGE_NETFILTER=y
    CONFIG_NFT_COMPAT=y
    CONFIG_NETFILTER_XT_NAT=y
    CONFIG_NETFILTER_XT_TARGET_MASQUERADE=y
    CONFIG_NETFILTER_XT_MATCH_ADDRTYPE=y
    CONFIG_NETFILTER_XT_MATCH_CONNTRACK=y

    The above modification works well for me.

    After rebuilding the kernel and login in WSL, you need run follow scripts:
    sudo systemctl stop docker
    sudo ip link del docker0
    sudo rm -rf /var/lib/docker/network
    sudo systemctl start docker

    If an error such like "error locating sandbox id 32791b12df33f576fa34a88cc67ceb89e3d8c21582a47ccc5532eb5414f4010f: sandbox 32791b12df33f576fa34a88cc67ceb89e3d8c21582a47ccc5532eb5414f4010f not found" occurred, you need use docker rm xxx to remove your existed containers and rerun them with docker run -dti xxx.

  2. Also, you can modify more configs as you need:
    CONFIG_NETFILTER_XT_MARK=y

    CONFIG_IP_NF_IPTABLES=y
    CONFIG_IP_NF_FILTER=y
    CONFIG_IP_NF_NAT=y
    CONFIG_IP_NF_TARGET_MASQUERADE=y
    CONFIG_IP_NF_MANGLE=y

    CONFIG_IP_VS=y
    CONFIG_NETFILTER_XT_MATCH_IPVS=y

    CONFIG_XFRM_USER=y
    CONFIG_XFRM_ALGO=y
    CONFIG_INET_ESP=y

    CONFIG_IP_VS_RR=y
    CONFIG_NET_CLS_CGROUP=y
    CONFIG_IP_NF_TARGET_REDIRECT=y

    CONFIG_IPVLAN=y
    CONFIG_MACVLAN=y
    CONFIG_DUMMY=y

    CONFIG_NF_NAT_FTP=y
    CONFIG_NF_CONNTRACK_FTP=y
    CONFIG_NF_NAT_TFTP=y
    CONFIG_NF_CONNTRACK_TFTP=y

    CONFIG_BTRFS_FS=y

  3. config-wsl

config-wsl-6.6.36.3.txt

@Merinorus
Copy link

Kindly disregard folks. The bot found a similar issue which was identical to my problem (my apologies for not doing a better job of searching). The TL;DR solution:

  1. Kernel loadable modules are now enabled
  2. The correct modules have to be chosen during the kernel build step.
  3. Chances are you didn't do item 2, or chose the wrong options.
  4. If you use the build configuration file (WSL2-Linux-Kernel/Microsoft/config-wsl) from branch linux-msft-wsl-6.1.y and rebuild, this problem goes away.

I kept trying with the config from the 6.6 branch until I tried but your last point... It did the trick for me. Thank you!

I checked the 6.1 branch and modified my config to a new file. Then I checked the 6.6 branch opened this file to check the config and saved it on the same file again.

Here is my config file for WSL kernel 6.6.36.6 : config-wsl-6.6.36.6.txt. I enabled all Docker mandatory and optional features. I also enabled zRAM and compression algos (lz4, zstd...), which can be unnecessary for you. Feel free to adapt the config.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants