Comments (9)
I solved this problem by specifying a DNS server in /etc/resolv.conf:
root@localhost:/mnt# cat /etc/resolv.conf
nameserver 8.8.8.8
Then try something like apt-get update (ping/nslookup don't seem to work properly).
from wsl.
Thanks for all your reports. We have two key issues with networking at the moment:
- We don't yet support ICMP (affecting Ping)
- We have an IPv6 related issue affecting our configuration of resolv.conf and thus DNS issues.
Bear with us while we work on fixes for future builds.
from wsl.
Beautiful that works. Thanks @kterhorst. Should probably still be logged as an issue though.
from wsl.
I have that issue and adding the nameserver to /etc/resolv.conf did not resolve it
EDIT: actually apt-get works now but as kterhorst said, ping and nslookup is not working.
from wsl.
Yep - nslookup failing:
root@localhost:~# nslookup microsoft.com
socket.c:2447: setsockopt(20, SO_TIMESTAMP) failed: Invalid argument
socket.c:1915: internal_send: 192.168.0.1#53: Invalid argument
socket.c:2447: setsockopt(21, SO_TIMESTAMP) failed: Invalid argument
socket.c:2476: setsockopt(21, IPV6_RECVPKTINFO) failed: Invalid argument
socket.c:1915: internal_send: fec0:0:0:ffff::1#53: Invalid argument
socket.c:2447: setsockopt(22, SO_TIMESTAMP) failed: Invalid argument
socket.c:2476: setsockopt(22, IPV6_RECVPKTINFO) failed: Invalid argument
socket.c:1915: internal_send: fec0:0:0:ffff::2#53: Invalid argument
socket.c:1915: internal_send: 192.168.0.1#53: Invalid argument
socket.c:1915: internal_send: fec0:0:0:ffff::1#53: Invalid argument
socket.c:1915: internal_send: fec0:0:0:ffff::2#53: Invalid argument
^C
from wsl.
The syscalls that are failing (for ping(8)) are:
capget({_LINUX_CAPABILITY_VERSION_3, 0}, NULL) = -1 EFAULT (Bad address)
and
socket(PF_INET, SOCK_RAW, IPPROTO_ICMP) = -1 ESOCKTNOSUPPORT (Socket type not supported)
The first should not be happening (ie it is a bug in WSL). The docs say:
EFAULT Bad memory address. hdrp must not be NULL. datap may be NULL only when the user is trying to determine the preferred capability version format supported by the kernel.
HDRP is not null (it is {_LINUX_CAPABILITY_VERSION_3, 0}
) and the call is trying to determine the preferred capability version format, so it should be (and is) NULL.
The second may be related to the earlier failure or Windows doesn't support raw sockets for ICMP, I am not sure.
from wsl.
my bash did not network either . It seems my wireless adapter is not detected . 'ifconfig" command shws messages like this: Warning: "cannot open /proc/net/dev (No Such file or directory). Limited output " .
How can I fix it?
from wsl.
I had similar problem - it appears the issue is that IP6 addresses have precedence over IP4
a solution is described in: http://askubuntu.com/questions/32298/prefer-a-ipv4-dns-lookups-before-aaaaipv6-lookups/38468#38468
from wsl.
Thanks for reporting this issue - it was fixed back in Anniversary Update.
from wsl.
Related Issues (20)
- Read-only file system unable to fix. HOT 1
- Need clarification on filesystems supported by WSL HOT 2
- WSL1/WSL2 comparison table not correct - WSL1 does support IPv6
- Remove the "Debugger for Chrome" resource. It's deprecated HOT 1
- Old usbipd syntax HOT 1
- Update usbipd command HOT 1
- Connect USB devices commands are wrong HOT 1
- WSL and usbipd-win documentation out of date for latest usbipd-win version HOT 1
- Indicate required Linux kernel version for USBIPD HOT 1
- Post a documentation issue
- Bad APOSTROPHE use
- Config option "mirrored" networking mode need adequate documentation (23H2) HOT 1
- Bug Files Explorer
- thiago HOT 1
- “Microsoft 内置内核提供的收件箱” 翻译是否不妥? HOT 1
- Translation issue
- WSD doesn't work HOT 2
- Mounting an unpartitioned disk: wording/explaining the situation HOT 1
- delete awsl
- WSL中pytorch不能识别电脑上全部4张GPU HOT 1
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.