WSL: Services running in WSL 2 no longer accessible from Windows

Discussed in https://github.com/microsoft/WSL/discussions/9744

<div type='discussions-op-text'>

Originally posted by Trey96 March 6, 2023 Not sure if anyone else is having this problem, but I searched and wasn’t able to find anything related to my issue. It seems like the WSL localhost is no longer being shared with the Windows localhost, and I cannot access WSL services from Windows via localhost.

I am running multiple domains on Nginx inside of WSL 2. In my Windows hosts file I am pointing all of those domains to 127.0.0.1. Until recently that was working just fine. However it has stopped working completely, and when I try to connect to the domain from the browser (Chrome) I get a connection refused error. Further investigation reveals there are no ports listening on 80 for 127.0.0.1, in fact nothing appears to be active on 127.0.0.1 anymore, especially WSL which used to be active. It seems WSL 2 has stopped binding to localhost but I am not sure why.

WSL version: 1.1.3.0
Kernel version: 5.15.90.1
Windows version: 10.0.22621.1344 (Windows 11)
Distro: Ubuntu 20.04

I recently installed Docker on my computer which runs on WSL. So I am not sure if that might have caused problems. Though I have since uninstalled Docker, but it had not affect. I am not sure if this is a bug with WSL or something I am doing wrong.

Any help identifying what might be the problem or any pointers on how to resolve it (or troubleshoot further) is much appreciated!</div>

Log Files (Updated 3/21/2023):

WslLogs-2023-03-21_23-12-21.zip

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 16 (2 by maintainers)

Most upvoted comments

@pmartincic This seems to be issue for a lot of people - in the end, this render WSL useless in high load scenarios…