Code Monkey home page Code Monkey logo

Comments (9)

kterhorst avatar kterhorst commented on July 20, 2024 5

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.

bitcrazed avatar bitcrazed commented on July 20, 2024 1

Thanks for all your reports. We have two key issues with networking at the moment:

  1. We don't yet support ICMP (affecting Ping)
  2. 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.

jwwisgerhof avatar jwwisgerhof commented on July 20, 2024

Beautiful that works. Thanks @kterhorst. Should probably still be logged as an issue though.

from wsl.

chaosjester avatar chaosjester commented on July 20, 2024

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.

throx avatar throx commented on July 20, 2024

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.

cowens avatar cowens commented on July 20, 2024

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.

yuanfangtardis avatar yuanfangtardis commented on July 20, 2024
  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.

ophiry avatar ophiry commented on July 20, 2024

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.

bitcrazed avatar bitcrazed commented on July 20, 2024

Thanks for reporting this issue - it was fixed back in Anniversary Update.

from wsl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.