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

ping works in wsl2 ubuntu, but wget, apt doesn't. DNS does work. #9550

Closed
1 of 2 tasks
AnQueth opened this issue Jan 27, 2023 · 8 comments
Closed
1 of 2 tasks

ping works in wsl2 ubuntu, but wget, apt doesn't. DNS does work. #9550

AnQueth opened this issue Jan 27, 2023 · 8 comments
Labels

Comments

@AnQueth
Copy link

AnQueth commented Jan 27, 2023

Version

10.0.22621.1194

WSL Version

  • WSL 2
  • WSL 1

Kernel Version

5.15.79.1

Distro Version

Ubunto 22.04

Other Software

No response

Repro Steps

wget https://www.microsoft.com
no response, but does translate to ip address

Expected Behavior

a result

Actual Behavior

hang

Diagnostic Logs

No response

@AnQueth
Copy link
Author

AnQueth commented Feb 11, 2023

traceroute msn.com works , wget http://msn.com just hangs. so what can effect web access but not traceroute ?

@kamorrissey
Copy link

I have a problem that seems similar to this. Connectivity starts out fine but after a while things like apt, curl, get stop working, just hang. Problem is cleared for a while by shutting down WSL, logging out and back into Windows, then relaunching WSL. I do not know what triggers the internet connectivity to stop working. Like OP, I see name resolution and pings working.

@daueee
Copy link

daueee commented May 29, 2023

Iam facing the same problem.Connectivity starts out fine but after a while things like apt, curl, get stop working.

@RustTurakulov
Copy link

Same here. Pings works but all conections to any repo were dead.

@abdullah-bin-hasan
Copy link

Same here as well. ping, traceroute work just fine but wget, curl, apt don't.

@chanpreetdhanjal
Copy link

Could you please follow the steps below and attach the diagnostic logs? https://github.com/microsoft/WSL/blob/master/CONTRIBUTING.md#collect-wsl-logs-for-networking-issues

@abdullah-bin-hasan
Copy link

Doing these solved my problem:
Open Hyper-V Manager as administrator

Select your pc, open Virtual Switch Manager

Select WSL

Set to external network

Select the network card the traffic runs through

Then login to wsl2 terminal and configure an IP address. E.g.

sudo ip addr flush dev eth0
sudo dhclient eth0

This is where i found it: https://stackoverflow.com/a/62438375/10853017

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

7 participants