-
Notifications
You must be signed in to change notification settings - Fork 822
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 no internet access (unable to resolve host address) on windows 1909 build 18363.1139 #6427
Comments
About 90K of my company employees are on this version of the windows and we do not have any means to upgrade windows ourselves. I assume similar thing happens in other companies. |
What is your networking set up like on this machine? Do you have any VPNs? |
hi @craigloewen-msft, thank you so much the follow-up. We do have an option to use VPN and most of the time it is turned off. I can get any extra information you need if you tell me how to get that information :) |
by the way if I convert the distro to use WSL-1 |
Could you please try the scenario where you don't have internet access and try to use WSL 2 both with the VPN turned on and off? And could you also file feedback when you're in the state where your network access doesn't work? (Instructions here). Also thank you for the positive feedback! 😁 |
@armenic: Can you please the output of the following commands:
? |
@OneBlue, thanks for follow-up:
|
The same problem has appeared today for me after the last Windows update kb4598242.
|
Thank you for the info @armenic . It looks like traceroute isn't installed, and without an internet connection, you can't install it, so can you please the share the output of the following:
What I'm trying to figure out is if this is a DNS or a routing issue. |
Just to give an update. |
@OneBlue, I have a feeling that you are going to get to the root cause! Here we go, as you requested:
|
just to be helpful in case this is DNS issue, the
|
@armenic: Yes, something is clearly wrong with DNS. Can you share the output of |
here we go my friend (@OneBlue), anything you say: original state
after change which I guess did not help :(
|
Thank you @armenic. This is interesting, ICMP works, but IP doesn't. This appears to be a routing issue, so I'm gonna need to collect some logs and have a deeper look at what's happening. I know that you can't use Feedback Hub, so can you please follow the Record WSL logs manually section I just created and share the log file ? (Note: the PR isn't merged yet, so the wprp file needs to be downloaded from here) |
@OneBlue @armenic very similar situation here. I have already taken the following steps:
Please advise how to proceed; I am a Windows Insider in the beta channel and my machine is fully up-to-date. I have Feedback Hub locally installed and I am familiar with provided feedback and performing diagnostic captures. Anything you need as far as analytics is concerned, I am happy to provide. This is very important for me to get fixed because during this past summer I moved my dev environment over to WSL 2 almost exclusively. I am a professional JavaScript/web developer so I have upcoming deadlines/commitments to several clients/companies, and without this functionality, my productivity is quite trivial. Thank you in advance! |
@killshot13 I use WSL2 and haven't had this issue, but have had an issue with the clock: #5324 - at least one of two things I did seemed to fix that issue: 1) Upgrading from Ubuntu 18.04 to 20.04, and 2) Switching from the Windows Insider Beta channel back to the Windows Preview channel. I also had random green screen system crashes on the Beta channel. As you've reinstalled Ubuntu - it seems that sometimes a distro needs to be re-registered with WSL, either by upgrading/reinstalling or by forcing it with My winver is 20H2 19042.746. |
@drkvogel I have not tried that yet; honestly I hadn't thought of it but it's certainly worth a shot. Stay tuned, and thank you! |
@OneBlue, sorry to bother. Just to let you know that the same issue happens with any Linux distro + WSL2, I tried Ubuntu 20.04 LTS and Kali as well. Hopefully the solution for Ubuntu 18.04 will be applicable to all distros. |
尝试了centos,ubuntu,debain,都不可以,什么时候能解决这个问题呢? |
@armenic : From what we can see in the logs, the issue appears to come from deeper in the stack, so we'll need more diagnostics. I've updated the "networking issues" section with a new script that should gather everything we need. Can you please run this script and share both the generated @killshot13: Please follow the same instructions so we can figure out if it's the same issue or not. |
@OneBlue, thanks for follow-up. Both the output and wsl.etl are in the attached zip file. Please keep doing the great job! |
Having a similar if not the same exact issue. User has anyconnect VPN client. Disconnecting from VPN and closing WSL does not fix the issue for him either. |
is there any good solution, I'm behind a heavy VPN/Proxy setup and i do not maintain nor can I access. If I upgrade to WSL2 it doesn't work. I tried the VPN fix but its not a good approach. And from this ticket I do not get a feeling its being worked on. And its more a logging of workarounds and not a permanent fix. |
I don't think we will ever see a solution for this. It has been months and nothing has happened. |
I met the same issue with VPN, and in my case, the root cause is the DNS resolution, wsl will update the /etc/resolv.conf automatically based on the network which is |
Right now, I switch frequently between several VPNs, from different providers (Cisco, OpenVPN, Array Networks), each one with its own DNS servers. Disabling What I do is hack my required hosts list together and add it to /etc/hosts (actually (c:\windows\system32\drivers\etc\hosts). This is ugly and error-prone - whenever IPs change for a VPN some things start breaking out of the blue. From what I can tell, the DNS issue, which seems to be the root cause of this issue, is caused (at least for me) by the fact that the DNS servers provided by the VPNs are IPV6 only, and WSL 2 seems to have sketchy support for IPV6 (didn't dig too deep into it, though, but it seems no IPV6-only site is reachable from within WSL, except things running inside wsl on ::1). |
Had this issue on Windows 11, changing the nameserver to 1.1.1.1 as per https://superuser.com/questions/1533291/how-do-i-change-the-dns-settings-for-wsl2# fixed it for me. |
Had this issue when I updated to Windows 11, |
I have been using WSL2 on Windows 10 with Ubuntu 20.04 for months. After a recent system update (corporate-managed) I am experiencing this issue. No nameserver entry for resolv.conf seems to work. We must use Cisco AnyConnect. I cannot ping any of the nameservers by IP either. Anyone have any other advice? I am back to using my Virtualbox VM now. 😕 |
This link seemed to fix it for me. https://community.cisco.com/t5/vpn/anyconnect-wsl-2-windows-substem-for-linux/td-p/4179888. I created a powershell script to run the firewall commands on startup 🤮 |
worked for me |
Facing this issue on Windows 11 after a recent update. OS Build 22000.795. |
Got fixed after updating again to OS Build 22000.832 |
I just installed WSL2 on a Windows version: 21H2 - build: 19044.1889 The WSL could not solve domain names, thus the DNS IP was not configured by default. I just followed this guide https://gist.github.com/coltenkrauter/608cfe02319ce60facd76373249b8ca6 which solved the DNS. |
Same here, with wsl2 on windows 11 22h2. Ubuntu suddenly refuses to resolve hosts after few days. Softether VPN and SSTap. |
Running WSL2 and Docker I had this problem a couple of weeks ago immediately after updating to 22H2. I couldn't find a solution so I had to roll back the update. Just tried updating again and the same issue occured. Started searching again and found this thread. This solution from @rezarms worked for me. UPDATE - The
|
Not sure why it would be pertinent, but this has occurred intermittently to me - and it effectively was remedied when I disabled sharing my WiFi interface from Windows (was shared to hosts on ethernet during today...) Do any of you other happen to have network interfaces shared in Windows? |
There must be a DNS timeout setting somewhere. Both Wsl2 and WSA on my Windows 22h2 only resolve Urls after 2nd or 3rd try, each waist a click away. |
I just had this issue, this comes out of the blue, yesterday it was working fine, but suddenly I can't pull from github/bitbucket, tried the suggestion above, but nothing work in my case. Edit: I shutdown my PC and turn it on again, somehow the issue is resolved. (previously I restarted my pc and it doesn't work, but shutdown somehow fixed it) |
The most recent solution work for me from here coltenkrauter/fix-wsl2-dns-resolution |
from my side the root cause was macfee , #8382 , i m disabling the firewall until figuring out some rules |
Fixed it by reboot WSL in PowerShell, then DNS works again. |
It seems there are two seperate issues here. Some can just not resolve dns entries, for some no internet access at all. Like for me, even pinging 8.8.8.8 woudln't work. DId a "netsh winsock reset" as suggested above and it worked. Also it should be said that WSL1 works fine. |
This immediately resolved my issue. Thank you!!! |
Much thanks, works for me! For reference, my |
I had a similar problem with name resolution within wsl2. I solved the problem by just adding the local domain to my windows host file at
|
a very quick fix that worked on my machine is to set /etc/resolv.conf to just use Googles root DNS server. This won't work in environments where you need internal resolution, which may or may not work with @mariolucasdev 's solution. It is just really, really specific to the environment. nameserver 8.8.8.8 |
I dont know why my |
For anyone try to manually set the nameservers by editing
To me set this in windows side does not work, I can only make it work by setting this in wsl side. |
i fix this issue by setting file in /retc/resolv.conf like below
|
Environment
Steps to reproduce
sudo apt update
WSL logs:
Expected behavior
connect to linux archives and fetch the updates
Actual behavior
The text was updated successfully, but these errors were encountered: