-
Notifications
You must be signed in to change notification settings - Fork 847
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
In mirrored network mode the Kafka client is unable to connect to the server properly. #11450
Comments
View similar issuesPlease 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! Open similar issues:
Diagnostic information
|
update: |
update 2: |
@OneBlue "Is there any WSL configuration that can change this parameter?" |
I had the same problem [experimental]
firewall=false |
it's do nothing |
Hi. Can you please collect networking logs by following the instructions below? |
Please check my previous response. I have identified the cause of the issue. It appears that in /proc/sys/net/ipv4/ip_local_port_range, there are only 300 ports available, ranging from 60500 to 60800. This limitation results in an error "Cannot assign requested address" when attempting to create more than 300 connections to the same IP and port. Additionally, in bridge mode, the range is expanded to 32768 to 60999, providing over thirty thousand ports. If you still require network logs, please let me know, and I will collect them for you. |
Yes we will need logs to further assist you. thanks |
/emailed-logs |
Hi there. I see 2 bind requests that showed up about 1 minute before the end of the trace - one for ::0 port 62698, one for ::0 port 6400. both were successful. was this run native on the root, or within a container that something created within Linux? |
Both of these ports are being listened on by a Java program running in a Linux environment.My current issue isn't with listening ports, but rather, as a network client, I'm running out of available client ports. Currently, it seems there are only 300 available ports in the /proc/sys/net/ipv4/ip_local_port_range file. This results in a 'Cannot assign requested address' error when I try to establish more than 300 socket connections to the server. |
Oh, thank you for clarifying. |
@keith-horton Is there any workaround for this while this is not configurable ?
with
im in And another note... most tools i have problem with are GO applications kubectl / kapp (carvel kapp) and medusa ( a tool to import export hashicorp vault secrets ) |
GO applications seem to be prone for this problem because many tools do not set |
There's not an immediate work around, but we have a fix ready. Thanks! |
@keith-horton its hard to guess as i cant really verify the connection count and im not sure how exactly the next usable free port is allocated 🤷 If there is a fix coming, it would be nice to:
For me this problem occurs in two sceanrios:
The first is not really a problem, but the second leads to a point where WSL will always hit the limit, forcing me or WSL users in general to switch to a linux vm for some commands. |
Windows Version
10.0.22635.3430
WSL Version
2.2.1.0
Are you using WSL 1 or WSL 2?
Kernel Version
5.15.150.1
Distro Version
Ubuntu 22.04
Other Software
org.springframework.kafka:spring-kafka:2.9.13
jdk 1.8
Repro Steps
Using the Java program I've written to connect to the Kafka server.
Expected Behavior
Successfully connected.
Actual Behavior
It threw an error and raised an exception.
It seems that according to my comparison, the connect0 method includes an isIPv6Available method. This method always returns false in NAT or bridged network modes but returns true in mirrored mode. This could be the cause of the error, especially considering that your machine and the Kafka server are only connected via IPv4 network.
Diagnostic Logs
WslLogs-2024-04-11_15-55-32.zip
The text was updated successfully, but these errors were encountered: