Skip to content
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

No internet connection in linux subsystem #241

Closed
AsukaLangleyfag opened this issue Apr 21, 2016 · 6 comments
Closed

No internet connection in linux subsystem #241

AsukaLangleyfag opened this issue Apr 21, 2016 · 6 comments

Comments

@AsukaLangleyfag
Copy link

AsukaLangleyfag commented Apr 21, 2016

Okay, so I used bash on windows before and it worked. But after one update and some trobleshooting my internet connection (DHCP settings was wrong) I got this:

root@localhost:/# ip
Cannot open netlink socket: Invalid argument
root@localhost:/# ifconfig
Warning: cannot open /proc/net/dev (No such file or directory). Limited output.
root@localhost:/# lspci -v
pcilib: Cannot open /proc/bus/pci
lspci: Cannot find any working access method.
root@localhost:/# ping
Usage: ping [-aAbBdDfhLnOqrRUvV] [-c count] [-i interval] [-I interface]
[-m mark] [-M pmtudisc_option] [-l preload] [-p pattern] [-Q tos]
[-s packetsize] [-S sndbuf] [-t ttl] [-T timestamp_option]
[-w deadline] [-W timeout] [hop1 ...] destination
root@localhost:/# ping localhost
ping: icmp open socket: Socket type not supported

And I cannot fix it. I tried completely reinstall with lxrun /uninstall /full and it didn't fixed it. I tried to turn off and on linux subsystem and it didn't fixed it. Any ideas why? Also, it obviously means I don't have internet connection inside linux subsystem.

@AsukaLangleyfag AsukaLangleyfag changed the title Unfixable errors Unfixable error Apr 21, 2016
@sennpy
Copy link

sennpy commented Apr 21, 2016

It's not unfixable. ICMP is not implemented in Bash On Windows. Refer to #18

I think they're looking into implementing it because of the popularity.

The solution right now is to use curl to check network connectivity

@AsukaLangleyfag
Copy link
Author

AsukaLangleyfag commented Apr 21, 2016

Apt and curl is saying i don't have the internet.

@AsukaLangleyfag AsukaLangleyfag changed the title Unfixable error No internet connection in linux subsystem Apr 21, 2016
@sennpy
Copy link

sennpy commented Apr 21, 2016

Sounds like #5

Open up /etc/resolv.conf and see if there is a ipv6 address before the ipv4 address. Remove it or move it below the ipv4 address can sometimes fix it.

The other option people have found success with is disabling ipv6 on their network device.

@AsukaLangleyfag
Copy link
Author

AsukaLangleyfag commented Apr 21, 2016

For some reason resolv.conf was empty. Silly me, I didn't checked it! Thanks, curl and apt now works.

@renatocassino
Copy link

I added this in /etc/resolv.conf

nameserver 8.8.8.8

And works for me.

@AsukaLangleyfag
Copy link
Author

AsukaLangleyfag commented Apr 24, 2016

@tacnoman well, I have my own DNS server. Anyway, it was my mistake, not thiers. Or... Maybe it's feature request, to copy DNS settings from Windows?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants