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

WSL Proxy never closes connections to Kube API #7331

Closed
Nino-K opened this issue Aug 9, 2024 · 0 comments · Fixed by rancher-sandbox/rancher-desktop-networking#29
Closed
Assignees
Labels
area/networking area/wsl WSL integration kind/bug Something isn't working platform/windows regression Functionality was working in a previous release and is now broken triage/patch-candidate
Milestone

Comments

@Nino-K
Copy link
Member

Nino-K commented Aug 9, 2024

From Slack conversation

I did the upgrade to Rancher Desktop (1.15.0) and the network tunneling feature seems to crash my kubectl process after an amount of time.
I receive the following error message on my WSL Ubuntu that is connected to Rancher Desktop:
k get pods -A
Get "https://127.0.0.1:6443/api/v1/pods?limit=500": read tcp 127.0.0.1:41466->127.0.0.1:6443: read: connection reset by peer - error from a previous attempt: read tcp 127.0.0.1:41458->127.0.0.1:6443: read: connection reset by peer
In the rancher desktop log of "/var/log/wsl-proxy.log" I see the following until it crashes:
time="2024-08-07T14:41:00+02:00" level=debug msg="port proxy accepted connection from 127.0.0.1:32890"
time="2024-08-07T14:41:00+02:00" level=debug msg="port proxy accepted connection from 127.0.0.1:32902"
time="2024-08-07T14:41:00+02:00" level=debug msg="port proxy accepted connection from 127.0.0.1:32912"
time="2024-08-07T14:41:02+02:00" level=debug msg="port proxy accepted connection from 127.0.0.1:32918"
time="2024-08-07T14:41:02+02:00" level=error msg="port proxy listener failed to accept: accept tcp 127.0.0.1:6443: accept4: too many open files"
time="2024-08-07T14:41:02+02:00" level=error msg="port proxy listener failed to accept: accept tcp 127.0.0.1:6443: accept4: too many open files"
time="2024-08-07T14:41:02+02:00" level=error msg="port proxy listener failed to accept: accept tcp 127.0.0.1:6443: accept4: too many open files"
What I found out so far is that everytime when I execute a kubectl command (e.g. kubectl version, kubectl get pods) on my Ubuntu-WSL a new connection seems to be established.
Command: netstat -tupn | grep 'wsl-proxy'
tcp 0 0 192.168.1.1:56534 192.168.1.2:6443 ESTABLISHED 729/wsl-proxy
tcp 0 0 192.168.1.1:55862 192.168.1.2:6443 ESTABLISHED 729/wsl-proxy
tcp 0 0 192.168.1.1:49422 192.168.1.2:6443 ESTABLISHED 729/wsl-proxy
tcp 0 0 192.168.1.1:44438 192.168.1.2:6443 ESTABLISHED 729/wsl-proxy
Command: "netstat -tupn | grep 'wsl-proxy' | wc -l" results in: 253 ESTABLISHED connections
I have installed WSL2 (2.2.4.0).
Do I miss an upgrade step or any configuration to get it to work? Everything worked fine with Rancher Desktop 1.14.1 without the network tunneling.
Can someone help me to figure out what is causing the issue ? Thanks in advance.

I have also managed to repro this, however, it did not happen with docker or containerd.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/networking area/wsl WSL integration kind/bug Something isn't working platform/windows regression Functionality was working in a previous release and is now broken triage/patch-candidate
Projects
None yet
2 participants