-
Notifications
You must be signed in to change notification settings - Fork 821
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 connectivity from Bash to internet? #5
Comments
Thank you for reporting. This is probably your /etc/resolv.conf file not being generated correctly. Any chance you can take a look at it's contents and compare the DNS servers with ipconfig /all at the cmd prompt? Also, a couple of questions:
If you're on wifi, can you try and switch to a different network and back? If not, try uninstalling through "lxrun /uninstall" and reinstall in Bash. Let me know if any of the above work. I will also be writing a bug on our side for this. |
I'm on a Wired Connection, without VPN. I do have an IPv6 enabled router/modem, and am using NAT.
Running the following didn't result in any changes:
One more "fun" thing to report, here's the output from
|
Thanks. Sending this off to the dev team to take a look. |
@robertsmieja. one more question. Any chance you can send me the rest of your ipconfig /all? If you don't want to post feel free to DM it to @richturn_ms. Just tell him it's for me. |
Here's the rest. I think the only identifiable info in it is my MAC address which I already shared. Whoops.
|
Out-of-the-box I had |
Well if I had to take a guess, there's an error creating a socket so I have 0 network connectivity. It could be a "driver" issue where the Ubuntu distro doesn't have the driver for my network card, or something to that effect. What's suspicious is that it's complaining about "invalid argument" for the setsockopt function call in socket.c, where the call "setsockopt(20, SO_TIMEOUT)" appears to be missing one argument, according to documentation: http://man7.org/linux/man-pages/man7/socket.7.html Here's the
|
I have the same problem if I leave the ipv6 nameserver first in /etc/resolv.conf. Removing (or moving it to the last line) makes resolving work for me. |
@jernejs good call. My working scenario is IPv4-only, without any IPv6 internet connectivity. |
Same problem here, no internet connectivity. root@localhost:/# ifconfig
Warning: cannot open /proc/net/dev (No such file or directory). Limited output. Here I'm pinging my gateway: root@localhost:/# ping 192.168.2.254
ping: icmp open socket: Socket type not supported I'm on a wired internet connection and disabled the Hyper-V bridge just in case. No VPN. Here I'm trying to reset the network: root@localhost:/# service networking restart
initctl: Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart: No such file or directory
* Running /etc/init.d/networking restart is deprecated because it may not re-enable some interfaces
* Reconfiguring network interfaces...
ifdown: failed to open lockfile /run/network/.ifstate.lock: No such file or directory
ifup: failed to open lockfile /run/network/ifstate.lo: No such file or directory And for the record, I run Ubuntu as well on this machine (dual boot) and it never has problems recognizing my network interface card. Any suggestions? I'm so happy with this feature. :) |
I have same symptoms as @jacqinthebox but I am able to install packages with apt and access internet with links |
I got networking working on mine by disabling my AV's firewall. That won't fix all networking applications, but it'll get |
I can also confirm that disabling firewall in Bitdefender solved this for me. I tried also with allowing bash.exe through but didn't work so i'm assuming some other services need to be allowed through firewall. So for now have it disabled and using windows firewall and everything ok. |
Images from BfW seem to be completely separate from normal Windows processes. They do exist, and they don't show up in the task manager, but you can see them in the resource monitor. For example, in the below screenshot, you can see an image named Even more curious:
|
I am running Win10 build 14316 inside VMWare on Ubuntu 15.10 host OS. VMWare networking is configured as Bridged for Win10 guest OS. LAN situation on this PC is ethernet-based. MS Bash did not correctly generate /etc/resolv.conf, it was totally empty. I had to add a simple |
Oh, right, I should point out that I'm running bare metal here. |
Thanks @thanosk, I can confirm apt-get update is working now as well now after adding the nameserver to /etc/resolv.conf. The regular Linux network troubleshooting commands I tried result in rather cryptic output in this enviroment, so I was on the wrong track thinking it was a hardware problem. |
Same problem here, running on native hardware (thanks thanosk for the vmware users but that did not work here). Nice to see that project btw, will be glad to participate more. |
@jolibert Does |
My bad, it works with update. Thank you, |
@jolibert It seems that only certain types of sockets are working at the moment, that's why I asked. No |
@gdude2002 Linux reflex, if no icmp (or ping) then all is wrong. Thank you. |
Same here, no connection to archive.ubuntu.com. Had to remove fritz.box and some 10.xxx.xxx.xxx entries from resolv.conf to make it work. |
@poddr Did you try the suggestions in the rest of this issue? |
Yes, and worked for me. |
So I spent ages investigating this by looking in what turned out to be the wrong direction. DNS lookups using the default BIND tools don't work regardless of the DNS server used. For example:
Forcing TCP gives a slightly different error:
So at first this seemed like DNS connections simply wouldn't work at all, even when specifying a known-good DNS server. But! I eventually noticed that adding the address of my local DNS server to /etc/resolv.conf did work - in the sense that DNS lookups in applications (presumably using the glibc stub resover) would succeed, but BIND tools like host and dig still don't. It took me a while to realise this given that my usual diagnostic tools for DNS issues are the things that are in fact broken. I did try to investigate a little further, but I didn't get very far. I doubt this is illuminating, but just in case:
The thing that's confusing me is that AFAICT socket.c:1915 is only reachable as a result of "sendmsg(sock->fd, &msghdr, 0);", if it returns an error - but the strace doesn't show sendmsg being called at all, so I'm not sure what's going on. Anyway, I'm moving on now, because it turns out there are alternatives: |
Last night I tried editing the /etc/resolv.conf but all of my changes were reverted, didn't take effect, or had no impact. Today I was able to run the following without any error or Windows updates :
I'm confident that this issue is now fixed and can be closed. EDIT: Nevermind, it just broke. I have no idea why it worked temporarily. More interesting output:
|
I'm also running into the same issue on build 14316, bash is unable to do any commands that use the internet: curl, git clone, apt-get, etc. I allowed bash through my Bitdefender firewall but that hasn't solved it yet either. |
@Gingernaut Allowing bash through the firewall is not good enough, you need to disable it entirely. The bash launcher is not the process that deals with networking, but nobody knows what exactly to allow at the moment. |
I resolved this by shutting down my VPN. |
This worked for me on March 2020 |
Running
apt-get update
returns the following:Running
curl
also doesn't seem to work:I'm running Bash as an Admin.
My Windows 10 Pro Insider Preview Build Number:
Build 14316.rs1_release.160402-2217
The text was updated successfully, but these errors were encountered: