Failed to connect to localhost port 8888 after 0 ms: Connection refused on WSL2
Windows Version
Microsoft Windows [Version 10.0.22631.3155]
WSL Version
2.0.9.0
Are you using WSL 1 or WSL 2?
- [X] WSL 2
- [ ] WSL 1
Kernel Version
5.15.133.1-1
Distro Version
Ubuntu 22.04.4 LTS
Other Software
I noticed this error when trying to download NVM using curl. However, other applications that need to use the localhost:8888 port also report the same error. VSCODE Example: Failed to establish a socket connection with proxies: ["PROXY localhost:8888"]
- In my research I saw a lot of problems related to the use of Docker (I wasn't able to confirm that my problem was related to my Docker, but it's good to let them know that I have it installed and use it on a daily basis)
Repro Steps
Open terminal WSL2 Run: curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/master/install.sh | bash
Expected Behavior
I expected it to download normally
Actual Behavior
➜ ~ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/master/install.sh | bash % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 curl: (7) Failed to connect to localhost port 8888 after 0 ms: Connection refused
Diagnostic Logs
No response
Hi I'm an AI powered bot that finds similar issues based off the issue title.
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. Thank you!
Closed similar issues:
- WSL2 not connect to http://localhost (#4773), similarity score: 0.80
- Does not connect from WSL to localhost (#6168), similarity score: 0.78
- Cannot connect to WSL:localhost(127.0.0.1) ports from Windows Host. But can connect to WSL:0.0.0.0 ports (#6725), similarity score: 0.78
- ERR_CONNECTION_REFUSED when trying to connect to http://
: , similarity score: 0.77on WSL2 (first preview) (#4136) - Unable to access windows localhost from WSL2 (#4935), similarity score: 0.77
Note: You can give me feedback by thumbs upping or thumbs downing this comment.