-
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
[WSL2/Ubuntu/Debian/Kali] Network not configured #5286
Comments
Hello Fellow Devs 😊 I had an error using WSL2 and Ubuntu 20.04 I've tried to disable the auto-generation of this nameserver adjusting the /etc/wsl.conf [network]
generateResolvConf = false this creates a linked file with .../run/resolvconf/resolv.conf that don't allows me to create a fixed one. please let me know if you have any patch or remedy to this error. Best regards. |
@betancour I set my DNS to the one being used on the host but that didn't help. I've tried solutions on the other issues and none of it has worked so far. |
Hi skippednote |
@betancour By default it points to 172.20.32.1 which is Ethernet (WSL). |
Hi Again @skippednote I've tried using Google DNS unsuccessfully. The way that works is when I use my router ip as nameserver betancour Inspiron-5570 mnt d Dev $ sudo apt-get update
[sudo] password for betancour:
Err:1 https://deb.nodesource.com/node_12.x focal InRelease
Temporary failure resolving 'deb.nodesource.com'
Err:2 https://archive.ubuntu.com/ubuntu focal InRelease
Temporary failure resolving 'archive.ubuntu.com'
Err:3 https://security.ubuntu.com/ubuntu focal-security InRelease
Temporary failure resolving 'security.ubuntu.com'
Err:4 https://dl.yarnpkg.com/debian stable InRelease
Temporary failure resolving 'dl.yarnpkg.com'
Get:5 https://archive.ubuntu.com/ubuntu focal-updates InRelease [107 kB]
Get:6 https://archive.ubuntu.com/ubuntu focal-backports InRelease [98.3 kB]
Fetched 205 kB in 39s (5261 B/s)
Reading package lists... Done
W: Failed to fetch https://archive.ubuntu.com/ubuntu/dists/focal/InRelease Temporary failure resolving 'archive.ubuntu.com'
W: Failed to fetch https://security.ubuntu.com/ubuntu/dists/focal-security/InRelease Temporary failure resolving 'security.ubuntu.com'
W: Failed to fetch https://deb.nodesource.com/node_12.x/dists/focal/InRelease Temporary failure resolving 'deb.nodesource.com'
W: Failed to fetch https://dl.yarnpkg.com/debian/dists/stable/InRelease Temporary failure resolving 'dl.yarnpkg.com'
W: Some index files failed to download. They have been ignored, or old ones used instead.
betancour Inspiron-5570 mnt d Dev $ echo 'nameserver 192.168.1.1' >> /etc/resolv.conf
betancour Inspiron-5570 mnt d Dev $ sudo apt-get update
Get:1 https://security.ubuntu.com/ubuntu focal-security InRelease [107 kB]
Hit:2 https://archive.ubuntu.com/ubuntu focal InRelease
Get:3 https://archive.ubuntu.com/ubuntu focal-updates InRelease [107 kB]
Hit:4 https://dl.yarnpkg.com/debian stable InRelease
Hit:5 https://deb.nodesource.com/node_12.x focal InRelease
Get:6 https://archive.ubuntu.com/ubuntu focal-backports InRelease [98.3 kB]
Fetched 312 kB in 18s (17.8 kB/s)
Reading package lists... Done |
@betancour I'm seeing a similar output. What DNS address is working for you? |
Hi @skippednote as you can see I am using the 192.168.1.1 |
@betancour This doesn't work for me. Only thing that work is reverting to WSL1 |
There are two different things here:
Default is to rely on the host machine for name resolution. But, there may also be a third problem with the firewall on the host, blocking communication for WSL2. At the end, |
@ericct I don't have a VPN or Antivirus installed. I have tried with Windows Defender Firewall disabld. |
@betancour @ericct For me it was an issue with the ISP who had disabled post routing. After enabling it internet is working fine in WSL2. |
same here eth0 is down every after reboot |
Yes, this is the same case. I'm not alone! It's really that the network is not fully configured, the other cases are other issues. So, does anyone have a solution for this uncomplete network configuration (inside WSL2)? |
clean install windows works for me. |
Anotherway is deleting the account and log again with your account to set default parameters. thanks so much. |
I can't access the HTTPS network, but HTTP is OK |
Is it closed because it's fixed? There are different problems reported in this thread, but the initial one seems to impact multiple people and while it seems to have work-arounds (more or less convenient), there's no clear status. Is it just rejected as bug? |
This one got caught in the clicks, apologies. There is no repro here though. That's not on you, but without someone guessing the externality (the variable) it will be tough to turn into an actionable. |
To repro
|
That is obviously not a repro. That it is a repro for you and confirmed by others, for reasons as yet unidentified, is not in question. But imagine, just for a moment, if that was actually a way to reproduce the issue. I am not sure it is even constructive to point this out. You cannot possibly imagine that posting those four steps contributes toward a better understanding of the nature of this issue. (deep breath) WAG try fiddling "ipv6 things". That's a usual suspect ref #4486. |
I am not blaming the REPO, while the REPO is WSL the connection works without any issue, the problem start when the REPO is converted. You are able to test this procedure and check if this happens or not. Regards, |
You are conflating the sequence of events that you experienced with causality. That is a standard "does not follow" logic fail. You have proposed no technical basis for the premise that upgrading a WSL 1 distro would be any different than installing a distro with the default set to WSL 2. You would have to conclude every WSL 2 user manually configures their network (and everyone kept that to themselves until 6 days ago) if that were plausible.
No one sane would pursue that test procedure, given the known data-point of tens of thousands of WSL 2 users doing that very scenario all day every day. But allowing for the negative antecedent.... |
@ericct This problem occurs if the %temp% directory is compressed. To fix: wsl --shutdown
compact /u %temp% /i /Q I guess the temporarily created swap file was compressed, which caused this problem. To repro: wsl --shutdown
compact /C %temp% /i /Q When using wsl2 again, there will be problems. |
OK, I'll try to reproduce on another machine |
This issue is not about DNS/nameserver but network stack not configured. Again, there may be multiple reasons for not being able to update, the issue reported here is not "apt update fails" or "no Internet access". Good hint anyway! |
That appears to be a repro. @ericct can you confirm whether (or not) your |
Hello, No, my temp folder is not compressed. So it may trigger the problem but seems not to be the only reason. |
No clear repro so far, but another case it seems: #5336 |
That was my suspicion, thanks. @czheji if you want to open a new issue with your |
in my case, it was moved without symlink made pointing to a new location. |
@giannadakis fix above worked for me too, but also only until I reboot.
After that Is it related to some change Windows has made to permissions/firewall on that internal ip addr? The |
Yes, I confirm the root cause, as explained in #5437 Better to close this one then, since it's misleading to other network issues (nameserver issues mainly). |
Hey can you show the steps? |
/dupe #5437 |
Hi! We've identified this issue as a duplicate of another one that already exists in this repository. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report! |
Internet worked once, then never again. After several days of trying things: Finally: Suddenly its like the day I first installed wsl 2 and everything works. |
This was driving me nuts, thank you! (To be clear, it applied to multiple distros) |
Windows noob here. When you use % in the file or directory names is that actually part of the name? |
Thank you @KylePiira . I disabled bitlocker but the folder %temp% was still compressed. After turning off compression, the interface started working automatically. |
Windows build number: version 2004 Build 19041.264
I've removed all WSL/WSL2 components and Docker before installing only WSL/WSL2. I have the same behaviour on 4 distributions (Ubuntu 18.04/20.04, Debian 10, Kali Linux 2020.1).
All coming lines are from Ubuntu 20.04.
When started, I cannot get any connection.
eth0
interface is down and not configured:Using
ipconfig
from Windows gives me information about needed network configuration:I then manually configure
eth0
and add a default route:Now the interface:
and the route:
are correct (network connections are working).
What's not working: network is not fully configured
Expected behaviour: have inet fully configured without manual intervention. Also, the network settings change at each reboot, raising the need for this operation after each reboot.
The text was updated successfully, but these errors were encountered: