-
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
WSL2 localhost forwarding doesn't seem to work #4636
Comments
Interestingly, the opposite has been the case for me. 19013 now works again.
Strange.
…On Sun, Nov 3, 2019 at 7:19 AM John Lam ***@***.***> wrote:
I'm seeing this too. But for me 19008 was working, but 19013 is where I
see a regression.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#4636?email_source=notifications&email_token=AAOS3XEUEZSKIBNDA6R3D3TQR3MWRA5CNFSM4JIB6CSKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEC5VDLA#issuecomment-549147052>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAOS3XDMWNJYVDUKNL5UEHLQR3MWRANCNFSM4JIB6CSA>
.
--
*Kevin Wu*
Software Engineer | Riot Games
contact@kevinwu.io <impguard@kevinwu.io>
|
recently chrome added a change that forces all traffic to https. Try accessing localhost in firefox or setup ssl in your webserver for localhost. |
@impguard localhost now works for you right? We also added in some more improvements in build 19018, so if you're still experiencing the issue please upgrade and let us know if that resolves it. :) |
Yes, it worked since the latest set of builds. Thanks! |
This started happening to me recently. I'm currently running:
I don't know why but vscode and wsl2 are having networking problems. When I get one working the other stops. 😢 |
When I run |
Can confirm running on the latest Windows 10 Insider Preview 18536.1000 broke the localhost binding between WSL2 and the host. This was previously working for me before. To reproduce: On your WSL2 machine, as @meatherly pointed out: Attempt to access that machine using your favorite browser on your host Windows OS at Then, determine the WSL2 IP, which will generally be visible using It appears the localhost binding between WSL2 and the host OS broke in the most recent release. |
Updated to |
same here - please fix! |
Same! Went to bed with a functioning localhost:3000 and woke up without. |
looks like this is the issue - #4769 |
@seanmetrix - indeed, fix is inbound. |
Please fix this. If Chrome or Firefox runs localhost:3000 successfully, but VS-Code got issues in connectivity. and vice versa. |
Seems like this problem is solved on |
@talalsiddiqui Try to change your Insider settings to "Release Preview" and do Windows Update. That's what I'm using. |
I have set my settings to FAST, plus now i changed to Preview Settings and click updates. there are no updates. |
Do you know how i can go back to build 19041. |
I am in build 19536 and have to restart WSL 2 via powershell. localhost URLs will stop working Earlier builds work. |
19041 build. Localhost broken (switched to wsl2 to fix folder rename trouble, but there is another serious thing...) |
I thought I was tripping. Glad I'm not the only one with this issue. Any word on a fix release? |
Regressed recently, tracking with #4769 |
I confirm that localhost:3000 (a meteorjs dev service) does not work on google chrome as @valeryan mentioned. |
build 19541. Localhost does not work on Chromium. |
Just as a bit more info on this. I encountered this issue after an update of VSCode Insiders Preview (1.55.0), then I switched to the normal VSCode (1.54.3) and the issue was gone. At least until today, when after a restart it appeared again (this was also after happened after VSCode updated itself) and fortunately a network reset solved my issue, but the issue might be caused by VSCode packages on the VM. |
This is a strange issue. For me it happens roughly on every second boot of my computer. When it happens, usually I just need to restart my pc and it returns to normal. |
For me, nothing helped, but turning off "IP Helper" service in Windows. |
To show addresses and ports configured in portproxy:
To reset portproxy config(if you saw above a list of addresses and ports it now will be deleted)
In my case, I had a few entries forwarding 0.0.0.0 to the old wsl2 IP(previous attempts). Obviously, nothing worked except calling the new IP directly. My remaining problem is to make my external IP get forwarded to the wsl2 IP. I managed to make it work with the windows installation configuring my router. But the same does not work for the WSL2 internal IP. OS Name: Microsoft Windows 10 Pro |
As a reply to myself and others looking to solve this issue. For me the solution was to turn off fast startup on windows. https://www.tenforums.com/tutorials/4189-turn-off-fast-startup-windows-10-a.html |
I'm on 20H2 and can't connect from inside WSL2 to services running on the windows host. When I try to to a curl to localhost:8080 it just says connection refused. I already deactivated fast startup. |
I have not seen this problem for a long time but it started again two days or so ago. I always have the problem after oppening the ubuntu. I am using wsl2 on windows 2004 1941.928. isn't there any permenent solution to this issue yet? |
if you used proxy software, close any retry it. |
In my case, Docker Desktop installed was causing the issue. After uninstalling it, it worked. |
I'm having the same issue after upgrading to WSL2 and installing docker desktop. None of the above solutions worked. |
The only solution that works for me is to run |
nothing works for me, have to run my app on 0.0.0.0 and access it through the Ip adress of the WSL 2 instance |
worked for me |
and the fix remains after restarting your pc? for me it doesn't |
@izzyyhh yes it does for me. I am using ubuntu. |
Sometimes works and sometimes not after Windows restart.
After uninstall Docker the issue still persists. It works for you by lucking.
This was the only solution that worked to me, before restart and even after restart Windows. After running wsl --shutdown command the Docker notify that the WSL 2 backend is stopped and ask if I want to restart it. After Docker restarting the WSL 2 backend, localhost forwarding started working again. Looks like Docker is initializing WSL2 with the right gateway subnet mask. |
I had this issue and to my surprise closing off my vpn app (privacyinternetaccess) solved the issue. |
I suddenly have this issue. And nothing mentioned above has helped so far 😢 |
I am currently experiencing this issue too and none of the solutions above work for me. |
This worked for me !! |
What worked for me was editing my
Then running the following from PowerShell
Here is my full configuration # Settings apply across all Linux distros running on WSL 2
[wsl2]
# (CAUSED ISSUE) Turn on default connection to bind WSL 2 localhost to Windows localhost
# localhostforwarding=true
# (CAUSED ISSUE) Switch networking mode to mirrored
#networkingMode=mirrored
#hostAddressLoopback=true
# Disables nested virtualization
nestedVirtualization=false
# Turns on output console showing contents of dmesg when opening a WSL 2 distro for debugging
debugConsole=true
# Enable experimental features
[experimental]
sparseVhd=true |
@asleepace I'm here because I'm also experiencing the issue. Like you, I have concluded that |
Your Windows build number: Microsoft Windows [Version 10.0.19008.1000]
What you're doing and what's happening:
Running Ubuntu 18.04 with WSL 2 enabled. For example running in Powershell
Within a terminal for WSL2, I run a simple python HTTP server
Then, trying to access the server from chrome within windows at localhost:8000. I get a "site could not be reached error"
I believe it should be working since WSL2 supports forwarding. Unfortunately, I'm not familiar enough with the netstack between windows + WSL2 to diagnose. Let me know if I can provide more info. Thanks!
The text was updated successfully, but these errors were encountered: