-
Notifications
You must be signed in to change notification settings - Fork 0
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 + JLab Network = phantom network timeouts #4
Comments
Worth pointing out that if I use PowerShell to run curl or wget to grab the files from maven central the files are downloaded nearly instantly. We do have an upstream intercepting TLS proxy server at JLab that may be interacting in odd ways with the WSL networking. In order for wget to work inside WSL I had to add our internal PKI cert plus enable legacy renegotiation:
|
Tried a few of the suggested fixes from related issues mentioned above. Syncing the hardware clock didn't do anything. Disabling IP6 at the Windows adapter and inside WSL by making IP4 higher precedence didn't do anything. Rebooting the machine didn't fix it. Next thing I tried was overriding the DNS server. Many suggest using Google's 8.8.8.8, but that doesn't work, presumably because our intercepting proxy blocks it, Commenting out the WSL2 configured DNS server and setting it to one of our internal DNS servers appears to fix the issue:
Note: Must add |
Note: I still have no idea WHY explicitly defining the DNS server worked. Some notes to follow up with:
|
Also worth pointing out there are a few other firewalls/anti-virus apps on the PC besides the HyperV one mentioned above that I have to work around as well (and are probably stepping all over each-other too):
The first two are new to the new machine so that could be a clue. |
There is a broader issue affecting Docker Desktop containers as well and the WSL2 Ubutunu distribution fix mentioned above only fixes it for the WSL2 Ubuntu distribution, not for Docker Desktop containers. Specifically
|
After a Docker Desktop crash followed by Factory Reset now compose appears to be working fine. Not very satisfying. So I tried to uninstall everything, reboot, and then re-install everything again, and reboot. This means uninstalling Docker Desktop, Ubuntu, and WSL2. Turns out there are two instances of WSL2 and on re-install 2 are put back. Weird. Screenshot: I re-installed using the directions here: https://learn.microsoft.com/en-us/windows/wsl/install, which means simply running
It's confusing that the Microsoft Store could be used for this as well with possibly different outcome and also strangely the store lists two different Ubuntu apps, and even the one with implicit version actually uses the same version as the one with explicit version (22.0.4.2). Weird. Screenshot: Just to be safe I also unchecked the WSL "Windows Feature" during uninstall and confirmed it's re-checked (enabled) after re-installing with I can confirm that the previous behavior inside WSL2 Ubuntu returns, in that wget is unreliable again. Screenshot: Docker Desktop re-installed without a hitch and now works without a problem so far. I haven't found how to get it back into the odd state it was in before. I guess I just keep using it until it breaks again. Might break once I attempt to fix phantom network error in WSL. |
I think my initial interpretation of the packet capture data is misleading. After doing some reading it appears that in both working and timeout scenarios a list of answers are returned for both IP4 and for IP6 and it appears the lists are identical, but the difference is that order the lists are returned differs. In the working case IP4 answers are returned first (A records) whereas in the timeout case IP6 answers are returned first (AAAA records). This ordering could be a coincidence and perhaps is not important. What really matters is that the chosen IP to use differs in the working vs timeout cases. It isn't clear how the choice is made.
|
I guess I'm seeing this issue: microsoft/WSL#5806 DNS lookup response is erroneously mixing AUTHORITY response in ANSWERS section:
|
This of course only creates more questions:
If/when Windows 12 comes out someone else can migrate over first! |
Moving forward with |
@slominskir I read through your updates and appreciate the level of detail that you included here. Have you had a chance to come back to this issue and explore the |
@karolswdev - Nope, I'm still relying on explicit configuration / override to one of our corporate domain DNS servers. It does look like dnsTunneling is about to be the default mode of operation though as there is a pre-release stating as much, so presumably soon new users will never see the dark corner of WSL discussed here. |
Got a new Windows 11 PC with latest everything and the Wildfly bash setup scripts no longer work properly in WSL2. Specifically network requests periodically timeout.
Related:
This was working before on Windows 10 Enterprise (JLab) and Windows 11 Home (Personal), but likely with older Ubuntu distros and possibly older versions of WSL2 or at least possibly different install methods (app store version differs apparently?).
Fully patched Windows 11 Installed on 11/14/2023 with Windows 11 Enterprise Version 22H2 build 22621.2506.
Fully patched WSL2:
I ended up just letting the
server-setup.sh
script run all afternoon and it eventually did complete. The output just contains a bunch of seemingly random timeouts followed by retries (took an hour or two when it should have run in less than a minute):The text was updated successfully, but these errors were encountered: