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

Lossing internet connection when some commands are run. #5843

Closed
fprin opened this issue Sep 1, 2020 · 8 comments
Closed

Lossing internet connection when some commands are run. #5843

fprin opened this issue Sep 1, 2020 · 8 comments
Labels

Comments

@fprin
Copy link

fprin commented Sep 1, 2020

Environment

Windows build number: Microsoft Windows [Version 10.0.20201.1000]
Your Distribution version: Release:        18.04
Whether the issue is on WSL 2: Linux version 4.19.104-microsoft-standard (oe-user@oe-host) (gcc version 8.2.0 (GCC)) #1 SMP Wed Feb 19 06:37:35 UTC 2020

Steps to reproduce

So, as usual, I lost internet connection from inside of WSL terminal. I follow this: #3438 (comment)

netsh winsock reset
netsh int ip reset all
netsh winhttp reset proxy
ipconfig /flushdns

After reboot, I am able to get access to internet again.

Then, I try to push a new branch to github and I lost internet conneciton again.

ping github.com # it will work without problem after the reboot
git push -u origin your_branch_name
ping github.com # it stopped to work.

image

WSL logs:
ping: github.com: Temporary failure in name resolution

Expected behavior

Never lost internet connection when I execute some commands.

Actual behavior

I am always losing internet connection when I execute some commands.

@therealkenc
Copy link
Collaborator

Please collect WSL logs and post the backlink to the feedback item here. Also list list your third-party networking software installed on Windows, if any.

It isn't clear from your post whether you're networking was taken down entirely, or whether names can't be resolved. If you can still ping (say) 140.82.114.3 but can't resolve github.com, you can try forcing the nameserver to 8.8.8.8 in /etc/resolv.conf, ref #4285 and friends.

@isgallagher
Copy link

I am also having this issue. Unable to ping anything including the host IP.

Ethernet adapter vEthernet (WSL):

Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :

~$ ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 172.18.255.112 netmask 255.255.240.0 broadcast 172.18.255.255

:~$ route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
172.18.240.0 0.0.0.0 255.255.240.0 U 0 0 0 eth0

The only thing that has fixed it was resetting my network settings (Windows Settings ->Network & Internet -> Network reset) and reinstalling WSL and Hyper-V. Probably pretty overkill, but it quit working shortly afterwards. I also have Docker Desktop installed and it is not having any issues.

@fprin
Copy link
Author

fprin commented Sep 3, 2020

@therealkenc right now I don't have too much time to collect the WSL logs, but the solution that you gave here #4285 doesn't work. I had already implemented that:

image

@isgallagher try to roll back to WSL 1, that fixed my problems with network. WSL 2 doesn't work.

# in your cmd windows shell, run it as admin.
wsl --set-version Ubuntu 1

@fprin
Copy link
Author

fprin commented Sep 5, 2020

@therealkenc it seems to be a duplicate of this one: #5821

I am having the same issue:
image

@danvy
Copy link

danvy commented Sep 5, 2020

Could you please test this https://gist.github.com/danvy/9486bf730371436131cb888ff4c2ceb6 ?

@isgallagher
Copy link

@danvy that fixed it for me. I've tried restarting hns and lxssmanager before but didn't know about restarting the vEthernet adapter.

@alexon1234
Copy link

+1 I lose the internet connection when running multiple requests.
The script didn't work for me

Copy link
Contributor

This issue has been automatically closed since it has not had any activity for the past year. If you're still experiencing this issue please re-file this as a new issue or feature request.

Thank you!

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

No branches or pull requests

5 participants