-
Notifications
You must be signed in to change notification settings - Fork 822
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
Port forwarding repeated failure on WSL 1.1.0 #9508
Comments
Downgrading to 1.0.3 resolves the issue.
|
I am having the same issue Port Forwarding works for a few seconds, then doesn't work. Distro Version: Ubuntu 20.04 |
Same issue for me with a nextjs 13 project. Distro Version: Archlinux Downgrading it to 1.0.3, as suggested by @rudyzeinoun , did make it work again. |
/logs |
Hello! Could you please provide more logs to help us better diagnose your issue? To collect WSL logs, download and execute collect-wsl-logs.ps1 in an administrative powershell prompt:
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 Thank you! |
Thanks for reporting this. I need logs from someone because I can't reproduce. I installed apache2, default config. |
Here's my log. I removed 1.0.3 and reinstalled 1.1.0 from the Store. The problem is reproducible again. |
I confirm the same issue. 1 connection is successful and then I can't access it anymore. Here is my log if it can help: |
I am getting similar problem I believe. My experience is with starting up DDEV with Docker.
|
With WSL 1.1.0 it's connecting over IPv6 only. This is on Windows 10. The web server is running inside a WSL instance:
On Windows side
but
More info:
|
Ahhh, Thank-you! I was wondering. Is it bound to ::1 on the guest/wsl side? |
From the logs I've looked at it appears the binds on the guest are port 80 ipv6 This means that the relay is going to bind the host(windows side) at ::1 port 80. |
@rudyzeinoun, I checked your logs and saw the relay bound ::1 80 on the host side, forwarded two connections, and then closed the listening socket 6 seconds later. Did you already verify that the port is still bound on the guest side inside WSL? Using something similar to |
Non deterministic repro instructions here: #9516 (comment) . If someone is experiencing failure to forward after a period other than exactly 1 minute then please say. Because in that case there may be a second issue. Thanks again for your patience. |
Was able to reproduce the bug where the port tracker stops tracking immediately. |
Yes, the port is still bound on the guest side. If I restart the service (unbind, bind again), it works for another 1 or 2 connections and disappears from host side again. |
Im having the same issue after updating (automatically via app store) to 1.1.0. I didn't realize It had updated until I went digging around these issues and found this ticket. Wasted half a day on this yesterday disabling firewalls and resetting networks and ended up giving up and switching to my Macbook so I could actually work before I discovered this. The issue was as described here, I could usually boot my machine, open WSL, run docker and my dev API, it would work using localhost from the Windows host, in any browser for a about 30 seconds, then it would just stop working. Connection direct to the dynamic IP worked, localhost did not. Performing Downgrading to 1.0.3 as suggested by @rudyzeinoun did solve the issue. |
WslLogs-2023-01-24_00-11-56.zip My dev environment starts two servers, one on port 4200 and one on 4201. If I only start one of them and no other services that require a forwarded port, the connection and forwarded port is stable. Seconds after attempting to spawn another service that would require a forwarded port, all port forwarding stops working. Services are still accessible from within the WSL distribution no matter what is going on with the forwarding. |
I believe I am experiencing this issue via aws-sam-cli where when running a lambda function locally, docker hits an exception mapping ports |
Similar issues with running docker swarm stack, unable to bind ports. One of our dev machines got an update over the weekend, took us better part of the day to realize it was WSL 1.1.0 update. We downgraded and all is fixed. Docker stack error snippet: |
This works for me, great thanks! |
I tried to downgrade to 1.0.3 as well but I'm still not able to get the port forwarding to work. 😢 On Windows:
Pretty much did most of the stuff (i.e., firewall disable on vEthernet, disable Fast Startup) to no effect. This is also a Next.js app as the one of the posters earlier. |
@jayg-hive open a debug console by adding
you're affected by the port proxy issue. |
This is a massively broken release because of this. Wasted huge amount of time because of this release. Edit: removed comment asking where auto update was, found it. |
@JshGrn disable it in the Microsoft Store app (click photo on top right, Settings, disable app updates) Just do remember to come here ocasional to manually update the other apps... |
@pedrolamas Yeah I saw in the end my bad, yeah I will come back in a month and hope its working again, is there any update on the timeline estimated for a fix on this? |
Thanks for linking this thread, I'll go ahead and see if downgrading works. EDIT: Working on my end! |
Thanks everyone for the feedback. The fix for this issue is in WSL 1.1.3 |
More specifically it is now back to the behavior that was part of 1.0.3 |
Just tried it - my Docker Compose projects are happy :) |
Nice work! How long does it typically take for a new version to arrive in the Windows Store? I just removed 1.0.3 that I installed manually and installed WSL2 from the Windows store, but I have 1.1.2. |
It's in pre-release for now so only insiders will receive it through the store. It'll be available for everyone once we decide that it's stable enough to go for GA. In the meantime, non-insider users can download and install the package manually like you did. |
Thanks. I'm a Windows 11 Beta Insiders user, but it is only giving me 1.1.2. Is there any way to get 1.1.3 automatically through the store so that I can just forget about this, rather than need to monitor releases for manual updates? Also, since 1.1.2 is only a partial fix for this issue, it seems like 1.1.3 should be the one available, with 1.0.3 available for non-insiders |
I think that 1.1.3 reintroduced the problem in my machine, where the 1.1.2 fixed it :\ |
@Cremesis, can you open a new bug? 1.1.3 is supposed to be a revert to the behavior present in 1.0.3, feel free to mention me on the issue. |
@nickchomey, We don't push builds to everyone at once. This bug is a great example of why we have an insiders ring that we push to before going to GA. The release process isn't our favorite thing either? |
I understand that. But my point is that you've pushed a partial fix (1.1.2) to me rather than the full fix (1.1.3). It seems to me that I should only be receiving 1.0.3 or 1.1.3... |
I get where you're coming from. This is why I wasn't going to mark the bug as closed till I was sure it had rolled out. I can ask someone who knows more about the release process via the store, but I'm pretty sure it's not instantaneous like that. |
Ok. Anyway I've installed 1.1.3 manually and am not having problems thus far. I'll follow up in a couple weeks to see what version the store has. |
@Cremesis, @rajshrimohanks: If you're still experiencing an issue on 1.1.3 I'd greatly appreciate it if you opened a new bug and posted logs. |
Having to download manually as 1.1.2 still latest in Store on windows insider preview (19/02/2023), checking if fixed now. EDIT: Fixed for me, great. |
No issue, it was an error on my part: I had a |
I just installed from the windows store and received 1.1.3.0. Again, I'm Windows Beta Insider. Hope this helps some people |
In normal use, execute docker ps or docker restart on the probability line. All forwarding ports fail. Restarting wsl doesn't work. You can only restart windows |
Locking this thread because the functionality/feature in question was reverted to the old behavior. Any issues should be filed as new bugs or comments on other bugs. |
Version
Microsoft Windows [Version 10.0.22623.1095]
WSL Version
Kernel Version
5.15.83.1
Distro Version
Ubuntu 20.04
Other Software
Apache/2.4.41
mysqld Ver 10.3.37-MariaDB-0ubuntu0.20.04.1
PHP 8.1 + php8.1fpm
systemd enabled in /etc/wsl.conf
Repro Steps
With WSL 1.1.0 (recently pushed to Store although marked as pre-release), port forwarding fails repeatedly.
Start Apache on the Ubuntu distro, and from Command Prompt on Windows, try to:
telnet localhost 80
It will work.
A few seconds later, repeat the telnet command and it will fail.
Port forwarding no longer works to connect to WSL Ubuntu's running services.
Expected Behavior
telnet command should keep working on the port.
Actual Behavior
telnet command will timeout.
On first try:
netstat -an | findstr /c:"80" | findstr /c:"LISTENING"
Shows port 80 as Listening.
After a few seconds, repeat the netstat command, the port is no longer listed.
This applies to any service running on WSL, and not just Apache.
Port forwarding fails after a few seconds of the service going up.
Restart apache "service apache2 restart". The port will appear on netstat. Wait 10 seconds and check again. It disappears.
Diagnostic Logs
No response
The text was updated successfully, but these errors were encountered: