Comments (10)
Logs are required for review from WSL team
If this a feature request, please reply with '/feature'. If this is a question, reply with '/question'.
Otherwise please attach logs by following the instructions below, your issue will not be reviewed unless they are added. These logs will help us understand what is going on in your machine.
How to collect WSL logs
Download and execute collect-wsl-logs.ps1 in an administrative powershell prompt:
Invoke-WebRequest -UseBasicParsing "https://raw.githubusercontent.com/microsoft/WSL/master/diagnostics/collect-wsl-logs.ps1" -OutFile collect-wsl-logs.ps1
Set-ExecutionPolicy Bypass -Scope Process -Force
.\collect-wsl-logs.ps1
The scipt will output the path of the log file once done.
Once completed please upload the output files to this Github issue.
Click here for more info on logging
If you choose to email these logs instead of attaching to the bug, please send them to [email protected] with the number of the github issue in the subject, and in the message a link to your comment in the github issue and reply with '/emailed-logs'.
View similar issues
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!
Open similar issues:
- WSL2 - No internet connectivity. DNS Issues(Temporary failure in name resolution) (#6404), similarity score: 0.83
- WSL2 - No internet/network on brand new Windows install/etc (#7625), similarity score: 0.82
Closed similar issues:
- wsl2 DNS failure (#8474), similarity score: 0.84
- No network connectivity WSL 2 (not DNS/firewall related?) (#10572), similarity score: 0.81
- WSL2 - Temporary failure in name resolution (#6601), similarity score: 0.81
Note: You can give me feedback by thumbs upping or thumbs downing this comment.
from wsl.
I have the exact same issue, started today as well.
WslLogs-2024-06-14_17-43-54.zip
from wsl.
@kohlerdominik It's a really annoying problem.
I found a quick fix incase it really bothers you - doesn't seem to affect my project code but things feel slower in general.
I just downgrade to WSL1 and it works
# Open Powershell
C:\WINDOWS\system32>wsl --list
Windows Subsystem for Linux Distributions:
Ubuntu (Default)
# Set WSL to Version 1
C:\Users\priv>wsl --set-version Ubuntu 1
It says it takes a few minutes but in reality it took almost an hour for me.
I'm hoping a proper fix will be here so I can switch back to WSL2.
Cheers and hope it helps!
P.S. I tried to switch back to WSL2 afterwards and the network issue still persisted, so I guess switching back and forth doesnt' work 👎
from wsl.
@cyberjj999 after investigating I found, that etc/resolv.conf
is a symbolic link to a non-existing file. After creating that file with the following content, the name resolution works again
nameserver [our company dns server ip - don't add this if you only require internet dns]
nameserver 1.1.1.1
This is quite an ugly workaround, though, because it works staticly only for our work environment and the internet.
I guess the resolv.conf should be taken from the windows network adapter usually (so DHCP-conf is properly forwared), but this did break.
from wsl.
Hi,
There are quite a few differences between WSL1 and WSL2.
See #4150 (comment). The thread is mentioned in the weblink above.
I'm using NAT mode, and this works perfectly for Photon OS on WSL2.
from wsl.
Yes, there is a difference between version 1 and 2, but currently version 2 doesn't work anymore, and version 1 still performs as expected. Thanks to @cyberjj999 for hinting on temporarily switch to version 1.
Running 10.0.22631.3737 FWIW
from wsl.
On x86_64,
WSL 2.1.5 works flawlessly with version 2. Regular installations are not affected, because wsl —update
does not update to 2.2.4.
WSL with version 1 is not an option for distributions with systemd requirements.
from wsl.
On x86_64, WSL 2.1.5 works flawlessly with version 2. Regular installations are not affected, because
wsl —update
does not update to 2.2.4. WSL with version 1 is not an option for distributions with systemd requirements.
I'm still deeply lost with what's happening. I happen to need to use ollama
which requires wsl2
so my current approach of reverting to wsl1
will not work.
I have uploaded the logs above.
Incidentally, I saw in another issue (#11675) mentioning similar things, and your suggestion for WSL reinstallation.
# see https://learn.microsoft.com/en-us/windows/wsl/install-manual#step-1---enable-the-windows-subsystem-for-linux
# Open a Powershell Terminal (Administrator)
dism /online /disable-feature /FeatureName:Microsoft-Windows-Subsystem-Linux
dism /online /disable-feature /featurename:VirtualMachinePlatform
dism /online /disable-feature /FeatureName:Microsoft-Hyper-V
rm "$env:userprofile\.wslconfig"
# reboot
# Open a Powershell Terminal (Administrator)
dism /online /enable-Feature /All /FeatureName:Microsoft-Windows-Subsystem-Linux /norestart
dism /online /enable-feature /All /Featurename:VirtualMachinePlatform /norestart
dism /online /enable-Feature /All /FeatureName:Microsoft-Hyper-V /norestart
bcdedit /set hypervisorlaunchtype auto
# reboot
# Open a Powershell Terminal (Administrator)
wsl --install
I'll give it a shot tomorrow if there's no alternative solution.
Can I ask regarding the backup for WSL which you suggested: wsl --export <distribution-name> <path\filename.tar>
, if WSL2 still doesn't have connection after I do your WSL reinstallation step, how can I re-import these backup contents into my new WSL2?
(I have custom bash scripts/commands + other installations like ollama
and it'd be nice if i can easily re-import them to my new WSL2...)
from wsl.
Diagnostic information
Issue was edited and new log file was found: https://github.com/user-attachments/files/15858698/WslLogs-2024-06-16_22-35-16.zip
Detected appx version: 2.2.4.0
from wsl.
- fyi Ollama does not require WSL, it's an option. But yes, I'm using this option, too.
- Before considering a reinstallation of WSL, backup your work locally e.g. to the hard disk, usb drive, etc. Shutdown the vm(s) with
vm -d <distribution-name> --shutdown
and use the export functionality. - Run
wsl --uninstall
. Run the recipe mentioned above. - Reinstalling WSL x86_64 actually is a reset to version 2.1.5. Hence there shouldn't be a networkMode related issue as in 2.2.4.
- After the reinstallation, use the import function. Configure .wslconfig as needed.
From my perspective, Ollama, security-hardened by VMware Photon OS (one of the origins of Cbl mariner), runs best in VMware Workstation. But built-in WSL in Windows 11 as homelab use-case has become good enough. Not all functions are fail-safe yet.
Clarification:
wsl --unregister -d <distribution-name>
deletes a custom distribution, but
wsl --uninstall
+WSL reinstallation not.
from wsl.
Related Issues (20)
- systemd Not Booting Up in WSL 2 Despite Configuration in wsl.conf HOT 8
- Error 0x8007019e and Wsl/CallMsi/0x80070424 and Wsl/REGDB_E_CLASSNOTREG HOT 2
- WSL failed to reopen after run wsl --shutdown HOT 5
- WSL2 can't receive jumbo frames when using a VPN with a 9000 MTU and mirrored network. HOT 6
- Failed conversion of Ubuntu from version 1 to version 2 HOT 5
- Ability to configure domain name from wsl.conf HOT 3
- systemd can't see the files if the disk is mounted to WSL before WSL starts. HOT 2
- systemd Not Booting Up in WSL 2 Despite Configuration in wsl.conf HOT 13
- bluetooth HOT 1
- Windows 11 - WSL2 takes 10+ minutes to launch HOT 3
- Failed to update from 23.10 to 24.04 on WSL2, by 2024.6.13 HOT 2
- wsl2 更新失败(退出代码: 1603)。 Error code: Wsl/CallMsi/Install/ERROR_INSTALL_FAILURE HOT 5
- Could not write value to key \SOFTWARE\Classes\Drive\shell\WSL HOT 23
- GUI apps via VcXsrv not starting from 14 Jun 2024 HOT 9
- Cannot uninstall WSL any more HOT 6
- wsl high latency HOT 2
- Cannot start WSL after 2 weeks every time HOT 1
- cannot ssh into wsl2, system feezes HOT 3
- Failed to attach disk 'C:\Program Files\WSL\system.vhd' to WSL2: The system cannot find the file specified HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wsl.