Excuse my ignorance here but why are you using its actual IP instead of just localhost or 127.0.0.1? When starting up a local server inside of WSL I’ve never needed to do that (unless it needs to be accessed somewhere else in the network)
I know the blog post says localhost redirection “often fails” but that’s just never been the case for me, and the citation it uses is just a link to the WSL issues page rather than a specific issue.
Localhost mostly works, and I use localhost when it does work.
But when it fails (once a week or so, and this keeps happening on 3 different machines running the latest/a recent Insider build), usually after the PC wakes up from sleep, I have to restart the PC to access via localhost again, which is undesirable for me because I have to spend 10 min restoring all apps & windows back to how they were.
Or I can use the IP address directly and map it to a friendly hostname, in my case `wsl` and keep working. This is done behind the scenes with a scheduled task, so when I see `localhost:PORT` doesn't work, I just retry it with `wsl:PORT`.
The reason I haven't linked to a specific issue is that there's just so many [*], and localhost sharing is still buggy and hasn't been fixed even after 2 years.
Fair enough, hopefully that gets fixed, my machine doesn’t go to sleep that often so maybe that’s why I haven’t been affected. My servers are not usually long-running, I only use them when developing so that’s probably why.
For future reference linking to the issues page when there’s over 1.2k issues is unhelpful to the reader, you’re better off putting that list into your blog post, or just pick one that’s the most useful like https://github.com/microsoft/WSL/issues/7492. I doubt the reader is going to trawl for every single issue to find the ones you’re talking about. It’s like saying “Google it yourself”.
When I had linked it in August 2020, it mostly had results for issues related to localhost forwarding, so it made sense at the time. But linking a live search wasn't the best choice, I agree.
I think linking to a specific issue is more useful, like you say. I'll update the post.
> It’s like saying “Google it yourself”.
Funny enough, almost all traffic is from organic searches :)
I know the blog post says localhost redirection “often fails” but that’s just never been the case for me, and the citation it uses is just a link to the WSL issues page rather than a specific issue.