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

Wsl/InstallDistro/WININET_E_CANNOT_CONNECT when installing Ubuntu #11587

Closed
1 of 2 tasks
viblo-majority opened this issue May 15, 2024 · 8 comments
Closed
1 of 2 tasks

Comments

@viblo-majority
Copy link

Windows Version

Microsoft Windows [Version 10.0.22631.3447]

WSL Version

2.1.5.0

Are you using WSL 1 or WSL 2?

  • WSL 2
  • WSL 1

Kernel Version

No response

Distro Version

No response

Other Software

I have Rancher Desktop installed.
I should also add that I have tried to change my DNS settings to Google DNS, and that I have tried on two different networks (at home and at the office)

Repro Steps

> wsl --install -d Ubuntu-24.04
OR
Installing Ubuntu from the Windows store

Expected Behavior

Ubuntu installed

Actual Behavior

PS C:\code> wsl --install -d Ubuntu-24.04
A connection with the server could not be established
Error code: Wsl/InstallDistro/WININET_E_CANNOT_CONNECT

Diagnostic Logs

WslLogs-2024-05-15_08-41-27.zip

Copy link

View similar issues

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it!

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

Diagnostic information
.wslconfig found
Detected appx version: 2.1.5.0
Detected user visible error: Wsl/InstallDistro/WININET_E_CANNOT_CONNECT

@OneBlue
Copy link
Collaborator

OneBlue commented May 15, 2024

@viblo-majority: This looks like a connectivity issue, but maybe it's within the store.

Does:

wsl --install -d Ubuntu-24.04 --web-download

Help resolve the issue ?

@viblo-majority
Copy link
Author

I tried from two different (wifi) networks with the same result, and I don't have other network issues on any of them. But is there any specific address I can try with for example ping, curl or similar to check outside the wsl tool?

I did try the web-download option. I think it downloaded it, and maybe installed it. However, it can't be started, and now it will not try to install it again.

PS C:\> wsl -l --all
Windows Subsystem for Linux Distributions:
rancher-desktop-data (Default)
rancher-desktop
PS C:\> wsl -d ubuntu-24.04
There is no distribution with the supplied name.
Error code: Wsl/Service/WSL_E_DISTRO_NOT_FOUND
PS C:\> wsl --install -d Ubuntu-24.04
Ubuntu 24.04 LTS is already installed.
Launching Ubuntu 24.04 LTS...
The operation completed successfully.
PS C:\> wsl --install -d Ubuntu-24.04 --web-download
Ubuntu 24.04 LTS is already installed.
Launching Ubuntu 24.04 LTS...
The operation completed successfully.

@OneBlue
Copy link
Collaborator

OneBlue commented May 16, 2024

Does the distribution start if you start it via wsl.exe -d Ubuntu-24.04 ?

@viblo-majority
Copy link
Author

viblo-majority commented May 17, 2024

No. I had a list of all commands I tried in my previous comment, let me format them again for clarity:
(It doesn't matter the order of these commands, I've tried all of them several times)

  • wsl -l --all
PS C:\> wsl -l --all
Windows Subsystem for Linux Distributions:
rancher-desktop-data (Default)
rancher-desktop
  • wsl -d ubuntu-24.04
PS C:\> wsl -d ubuntu-24.04
There is no distribution with the supplied name.
Error code: Wsl/Service/WSL_E_DISTRO_NOT_FOUND
  • wsl --install -d Ubuntu-24.04
PS C:\> wsl --install -d Ubuntu-24.04
Ubuntu 24.04 LTS is already installed.
Launching Ubuntu 24.04 LTS...
The operation completed successfully.
  • wsl --install -d Ubuntu-24.04 --web-download
PS C:\> wsl --install -d Ubuntu-24.04 --web-download
Ubuntu 24.04 LTS is already installed.
Launching Ubuntu 24.04 LTS...
The operation completed successfully.

@OneBlue
Copy link
Collaborator

OneBlue commented May 28, 2024

Interesting. Do you have the Ubuntu-24.04 app installed now ? What if you start it manually ?

@viblo-majority
Copy link
Author

Oh, now it worked. I actually gave up and focused on other things, but seems like something happened that fixed it. (I did restart the computer both now and a 2 weeks ago when tried to troubleshoot this issue from the beginning).
However, some traces of the broken state could still be visible today when I ran the install command (you can see that it printed out that Ubuntu was already installed, but still proceeded to actually install it):

PS C:\code\dump> wsl --install -d Ubuntu-24.04
Ubuntu 24.04 LTS is already installed.
Launching Ubuntu 24.04 LTS...
Installing, this may take a few minutes..

@OneBlue
Copy link
Collaborator

OneBlue commented May 28, 2024

Hmm I wonder if the MSIX package for the ubuntu app was in a weird state, and rebooting maybe fixed the issue.
The Ubuntu 24.04 LTS is already installed logline is expected if the MSIX package for the distribution is already installed.

Closing since the issue is fixed, but please reopen if this reproduces again.

@OneBlue OneBlue closed this as completed May 28, 2024
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

2 participants