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

create bridge: Netlink error: Operation not supported #12108

Closed
1 of 2 tasks
trulliandloeb opened this issue Oct 1, 2024 · 6 comments
Closed
1 of 2 tasks

create bridge: Netlink error: Operation not supported #12108

trulliandloeb opened this issue Oct 1, 2024 · 6 comments

Comments

@trulliandloeb
Copy link

trulliandloeb commented Oct 1, 2024

Windows Version

10.0.22631.4169

WSL Version

2.2.4.0

Are you using WSL 1 or WSL 2?

  • WSL 2
  • WSL 1

Kernel Version

6.6.36.3-microsoft-standard-WSL2

Distro Version

Clear Linux

Other Software

No response

Repro Steps

At .wslconfig, configure kernel:
[wsl2]
kernel=C:\wsl\kernel\k-6-6-36-3-skylake

Start podman (podman run ubi8-micro date), it shows below error:
Error: preparing container 7dafe340796a932c6a07a558da67586d4dcdd0976cdf92acb368b0afcd9bd953 for attach: netavark (exit code 1): create bridge: Netlink error: Operation not supported (os error 95)

Start dockerd in Clear Linux(), it shows below error:
WARN[2024-10-01T12:07:18.520019934+08:00] Running modprobe bridge br_netfilter failed with message: modprobe: WARNING: Module bridge not found in directory /lib/modules/6.6.36.3-microsoft-standard-WSL2
modprobe: WARNING: Module br_netfilter not found in directory /lib/modules/6.6.36.3-microsoft-standard-WSL2
, error: exit status 1
INFO[2024-10-01T12:07:18.524812044+08:00] unable to detect if iptables supports xlock: 'iptables --wait -L -n': modprobe: FATAL: Module ip_tables not found in directory /lib/modules/6.6.36.3-microsoft-standard-WSL2 iptables v1.8.10 (legacy): can't initialize iptables table filter': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded. error="exit status 3" INFO[2024-10-01T12:07:18.553228829+08:00] stopping event stream following graceful shutdown error="<nil>" module=libcontainerd namespace=moby INFO[2024-10-01T12:07:18.553506215+08:00] stopping healthcheck following graceful shutdown module=libcontainerd INFO[2024-10-01T12:07:18.553519820+08:00] stopping event stream following graceful shutdown error="context canceled" module=libcontainerd namespace=plugins.moby failed to start daemon: Error initializing network controller: error obtaining controller instance: failed to create NAT chain DOCKER: iptables failed: iptables -t nat -N DOCKER: modprobe: FATAL: Module ip_tables not found in directory /lib/modules/6.6.36.3-microsoft-standard-WSL2 iptables v1.8.10 (legacy): can't initialize iptables tablenat': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
(exit status 3)

If I comment the kernel, or use last year's 6.1.21.2-microsoft-standard-WSL2, then everything is okay.

Expected Behavior

Should be no such issue.

Actual Behavior

Network issue happens.

Diagnostic Logs

WslLogs-2024-10-01_12-37-06.zip

Comments

https://github.com/microsoft/WSL2-Linux-Kernel/blob/linux-msft-wsl-6.1.y/arch/x86/configs/config-wsl
https://github.com/microsoft/WSL2-Linux-Kernel/blob/linux-msft-wsl-6.6.y/arch/x86/configs/config-wsl

They have much difference, is the configuration caused module not complied into kernel?

Copy link

github-actions bot commented Oct 1, 2024

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 script will output the path of the log file once done.

If this is a networking issue, please use collect-networking-logs.ps1, following the instructions here

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.

@trulliandloeb
Copy link
Author

Copy link

github-actions bot commented Oct 1, 2024

Diagnostic information
Issue was edited and new log file was found: https://github.com/user-attachments/files/17199446/WslLogs-2024-10-01_12-37-06.zip
.wslconfig found
	Custom kernel found: 'C:\SAPDevelop\wsl\kernel\k-6-6-36-3-alderlake'
Detected appx version: 2.2.4.0

Copy link

github-actions bot commented Oct 1, 2024

Diagnostic information
.wslconfig found
	Custom kernel found: 'C:\SAPDevelop\wsl\kernel\k-6-6-36-3-alderlake'
Detected appx version: 2.2.4.0

@elsaco
Copy link

elsaco commented Oct 1, 2024

@trulliandloeb you're using a custom kernel and your modules aren't loading!

From https://github.com/microsoft/WSL2-Linux-Kernel/releases

However, please be aware that when using a custom kernel, the default module support is disabled for now. If you’re using a custom kernel, we recommend you edit your kernel config file to build-in all of the modules that you need.

@OneBlue
Copy link
Collaborator

OneBlue commented Oct 1, 2024

Indeed @trulliandloeb, if you're using a custom kernel you need to compile in the modules you need (in this case IP_NF_IPTABLES)

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

No branches or pull requests

3 participants