Open sbhatti534602210 opened 3 years ago
The solution worked for me is(I do not use Hyper-V, Maybe you could do other way around if you use Hyper-V):
Turning on Hyper-V does some magic :P I had to do the same after installing updates too.
Note: I wasn't experiencing name resolution issue
@keith-horton This has just occurred for me after months of this being not happening:
Temporary failure in name resolution
, ping of goolge by IP still worksnslookup
crashes in a bad wayStarting program: /usr/bin/nslookup
warning: opening /proc/PID/mem file for lwp 2496.2496 failed: No such file or directory (2)
Failed to read a valid object file image from memory.
[New LWP 2499]
> google.com
;; UDP setup with fec0:0:0:ffff::1#53(fec0:0:0:ffff::1) for google.com failed: invalid file.
;; UDP setup with fec0:0:0:ffff::1#53(fec0:0:0:ffff::1) for google.com failed: invalid file.
;; UDP setup with fec0:0:0:ffff::1#53(fec0:0:0:ffff::1) for google.com failed: invalid file.
;; UDP setup with fec0:0:0:ffff::2#53(fec0:0:0:ffff::2) for google.com failed: invalid file.
;; UDP setup with fec0:0:0:ffff::3#53(fec0:0:0:ffff::3) for google.com failed: invalid file.
task.c:805: INSIST((task->events).head != (event)) failed, back trace
/lib/x86_64-linux-gnu/libisc-9.18.12-0ubuntu0.22.04.3-Ubuntu.so(+0x32b13)[0x7fffff212b13]
/lib/x86_64-linux-gnu/libisc-9.18.12-0ubuntu0.22.04.3-Ubuntu.so(isc_assertion_failed+0x10)[0x7fffff212780]
/lib/x86_64-linux-gnu/libisc-9.18.12-0ubuntu0.22.04.3-Ubuntu.so(isc_task_run+0x422)[0x7fffff239fd2]
/lib/x86_64-linux-gnu/libisc-9.18.12-0ubuntu0.22.04.3-Ubuntu.so(+0x2653e)[0x7fffff20653e]
/lib/x86_64-linux-gnu/libisc-9.18.12-0ubuntu0.22.04.3-Ubuntu.so(+0x26cb7)[0x7fffff206cb7]
/lib/x86_64-linux-gnu/libisc-9.18.12-0ubuntu0.22.04.3-Ubuntu.so(+0x26ed6)[0x7fffff206ed6]
/lib/x86_64-linux-gnu/libuv.so.1(+0x91ed)[0x7ffffec891ed]
/lib/x86_64-linux-gnu/libuv.so.1(+0x2511e)[0x7ffffeca511e]
/lib/x86_64-linux-gnu/libuv.so.1(uv_run+0x678)[0x7ffffec8ec88]
/lib/x86_64-linux-gnu/libisc-9.18.12-0ubuntu0.22.04.3-Ubuntu.so(+0x2734a)[0x7fffff20734a]
/lib/x86_64-linux-gnu/libisc-9.18.12-0ubuntu0.22.04.3-Ubuntu.so(isc__trampoline_run+0x1a)[0x7fffff23dd4a]
/lib/x86_64-linux-gnu/libc.so.6(+0x94ac3)[0x7ffffed54ac3]
/lib/x86_64-linux-gnu/libc.so.6(clone+0x44)[0x7ffffede5bf4]
Thread 2 "isc-net-0000" received signal SIGABRT, Aborted.
[Switching to LWP 2499]
0x00007ffffed569fc in ?? ()
(gdb) thread apply all bt
Thread 2 (LWP 2499 "isc-net-0000"):
#0 0x00007ffffed569fc in ?? ()
Backtrace stopped: Cannot access memory at address 0x7ffffbd4c3e0
Thread 1 (LWP 2496 "nslookup"):
#0 0x00007ffffed0321a in ?? ()
Backtrace stopped: Cannot access memory at address 0x7ffffffedf80
(gdb) bt
#0 0x00007ffffed569fc in ?? ()
Backtrace stopped: Cannot access memory at address 0x7ffffbd4c3e0
this is on
Description: Ubuntu 22.04.3 LTS
Release: 22.04
Codename: jammy
@vadimkantorov It's DNS issue. You need to explore about "fixing DNS issue on WSL".
I checked https://github.com/MicrosoftDocs/WSL/blob/main/WSL/troubleshooting.md#troubleshooting-dns-in-wsl. I don't think my situation is described there, but I don't have time/skills for a deeper investigation.
I just thought that the nslookup
crash and stack trace is interesting, I don't think I saw it in this discussion, so I hope it's helpful for further people reporting. Might be it's a different flavor of DNS problems issues
@vadimkantorov try this: https://github.com/microsoft/WSL/issues/7141#issuecomment-1092965552
>>
to append instead of rewriting >
chattr: Operation not supported while reading flags on /etc/resolv.conf
, despite sudo;; communications error to ::1#53: timed out
<- this is before wsl --shtudown
nameservers 8.8.8.8
instead of nameserver 8.8.8.8
wsl --shutdown
nameserver fec0:0:0:ffff::1
nameserver fec0:0:0:ffff::2
nameserver fec0:0:0:ffff::3
yeah, maybe the problems is that resolv.conf sometimes doesn't get regenerated after hibernate recovery on a new Wi-Fi network
I highly recommend doing this step #4 if you are using NAT and having DNS issues:
Stop WSL wsl.exe –shutdown Delete the old HNS Firewall rule. This Powershell command should work in most cases: 1.Get-NetFirewallRule -Name "HNS*" | Get-NetFirewallPortFilter | where Protocol -eq UDP | where LocalPort -eq 53 | Remove-NetFirewallRule Remove all HNS endpoints Note: if HNS is used to manage other containers, such as MDAG or Windows Sandbox, those should also be stopped. hnsdiag.exe delete all Reboot or restart the HNS service When WSL is restarted, HNS will create new Firewall rules, correctly targeting the WSL interface.
EDIT: by #4, I mean #4 from the above link for troubleshooting DNS in WSL.
I got it working by not using ethernet adapter and using wifi adapter. It was mentioned in one of these billion Issues logged on the subject, but I couldn't get it working the first time I tried. I uninstalled all the virtualization features & wsl. I then installed only Hyper-V. Created my wifi v switch and made sure it was working. (Here, I also tried creating an ethernet v switch, but it would not connect: Unidentified network. I wish I had a different ethernet card to plug in and test. I think the problem is tied to the ethernet card in use or it's driver.) Then I installed Sandbox & WSL + Ubuntu. Now it is all working. Not correctly. It's a stupid workaround that I don't won't to use. I don't want to use wifi for this, and prefer to have my wifi disabled on the computer. The ethernet adapter on the other computer sitting next to me works just fine, out of the box. Why not this one?
I know this thread is a few years old. Was there a fix determined for this issue? I am having the exact same issue with the same board series, ROG Strix Z690-E Gaming motherboard on Windows 11. The z690 onboard LAN will not connect to my cisco catalyst ws-c3550. But I have four other intel chipset motherboards (z670 prime, z170, h81 & z68) that have no problem connecting.
I faced same issue in my Work Desktop (connected to corporate network). Setting the DNS nameserver to 8.8.8.8
doesn't make sense as it would make internal sites unresolvable.
I came up the following solution as a workaround - Fix for WSL2 No Internet
1) Find DNS Server used by Windows
# 10.9.8.169 is the DNS Server in my system (Corporate Device / Network)
ipconfig /all | findstr /R "DNS\ Servers"
2) Set DNS Nameserver in WSL
sudo bash -c "echo 'nameserver <dns_server_from_prev_cmd>' > /etc/resolv.conf"
# For personal devices without DNS Server configured, use 8.8.8.8 or any other preferred resolver
Microsoft Windows [Version 10.0.19043.1081] Ubuntu 20.04.2 LTS
I worked through the instructions for installing wsl for windows 10, from: https://docs.microsoft.com/en-us/windows/wsl/install-win10
However, I cannot connect to the internet from Ubuntu. I switched off the firewall as suggested here: https://docs.microsoft.com/en-us/windows/wsl/faq#why-do-i-not-have-internet-access-from-wsl-
But still could not connect.
There are a few things I have tried already but they did not resolve the problem (see below). As in the FAQ page: https://docs.microsoft.com/en-us/windows/wsl/faq#where-can-i-provide-feedback- I raised this through the issues tracker but did not get any response. Can someone help with this, please? I don't know why my previous request was closed without any response.
Thanks!
From Ubuntu terminal I tried to install:
curl https://get.volta.sh | bash (6) Could not resolve host: get.volta.sh
so I tried: ping 8.8.8.8 ping: connect: Network is unreachable
Some of the troubleshooting steps I have tried (which did not work)
Disabled the firewall.
Re-installed ubuntu.
BT (my internet provider), port forwarding: https://www.bt.com/help/broadband/learn-about-broadband/how-do-i-set-up-port-forwarding-on-my-bt-hub-
Checked Network Connection settings Ethernet Properties vEthernet Properties (WSL) Hyper-V Virtual Ethernet Adapter Internet Protocol Version 4 (TCP/IPv4) -checked Internet Protocol Version 6 (TCP/IPv6) -checked Hyper-V Extensible Virtual Switch -unchecked
Checked Device Manager (View Hidden) Network adapters > Hyper-V Virtual Ethernet Adapter Properties Device status - This device is working properly.
Turn Windows features on and off Uncheck Windows Subsystem for Linux Windows needs to reboot your PC to finish the requested changes Recheck Windows Subsystem for Linux Windows needs to reboot
Change the nameserver sudo nano /etc/resolv.conf '# This file was automatically generated by WSL. To stop automatic generation of this file, add the following entry to /etc/resolv.conf '# [network] '# generateResolvConf = false nameserver xxx.xx.xx Change the name server to 8.8.8.8 and save the file. You should now be able to connect to the internet. -even restarted ubuntu, same error after restarting and the nameserver seems to be reset to default
https://github.com/microsoft/WSL/issues/5336#issuecomment-653881695 Open Powershell or Cmd as Administrator and run each of these commands: wsl --shutdown netsh winsock reset netsh int ip reset all netsh winhttp reset proxy ipconfig /flushdns Hit the Windows Key, type Network Reset, hit enter. You should see this window. Click "Reset now". Restart Windows