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

Could not establish connection to [id]: Failed to download VS Code Server(Failed to fetch) #10711

Open
6 tasks done
explorationRoad opened this issue Feb 17, 2025 · 3 comments
Assignees
Labels
ssh Issue in vscode-remote SSH

Comments

@explorationRoad
Copy link

Is there an existing issue for this bug?

  • I have searched the existing open issues and found none that apply.
  • If I find any issue of interest that is related or closed, I will included a link to it in this issue.

Required Troubleshooting Steps

  • I have read and performed the troubleshooting steps
  • I have tried both values of the remote.SSH.useLocalServer setting
  • My issue was not covered in the Tips and Tricks linked from the Troubleshooting Wiki.
  • I will include a complete copy of my Remote - SSH logs by running Remote-SSH: Show Log in the command palette or from View > Output in the menu bar

[Optional] Diagnose with Copilot

I did not ask the @remote-ssh participant for help

In step 2 of the troubleshooting wiki, what was the result of running the generated SSH command verbatim outside of VS Code?

I did not try step 2 of the troubleshooting steps

Remote-SSH Log

[21:15:59.787] Log Level: 2
[21:15:59.804] SSH Resolver called for "ssh-remote+10.103.30.12", attempt 1
[21:15:59.808] remote.SSH.useLocalServer = false
[21:15:59.808] remote.SSH.useExecServer = false
[21:15:59.809] remote.SSH.bindHost = {}
[21:15:59.809] remote.SSH.showLoginTerminal = false
[21:15:59.809] remote.SSH.remotePlatform = {"10.103.30.11":"linux"}
[21:15:59.809] remote.SSH.path =
[21:15:59.809] remote.SSH.configFile =
[21:15:59.810] remote.SSH.useFlock = true
[21:15:59.810] remote.SSH.lockfilesInTmp = false
[21:15:59.810] remote.SSH.localServerDownload = auto
[21:15:59.810] remote.SSH.remoteServerListenOnSocket = false
[21:15:59.810] remote.SSH.defaultExtensions = []
[21:15:59.811] remote.SSH.defaultExtensionsIfInstalledLocally = []
[21:15:59.811] remote.SSH.loglevel = 2
[21:15:59.811] remote.SSH.enableDynamicForwarding = true
[21:15:59.811] remote.SSH.enableRemoteCommand = false
[21:15:59.811] remote.SSH.serverPickPortsFromRange = {}
[21:15:59.811] remote.SSH.serverInstallPath = {}
[21:15:59.812] remote.SSH.permitPtyAllocation = false
[21:15:59.812] remote.SSH.preferredLocalPortRange = undefined
[21:15:59.812] remote.SSH.useCurlAndWgetConfigurationFiles = false
[21:15:59.812] remote.SSH.experimental.chat = true
[21:15:59.812] remote.SSH.experimental.enhancedSessionLogs = true
[21:15:59.824] VS Code version: 1.97.2
[21:15:59.824] Remote-SSH version: [email protected]
[21:15:59.824] win32 x64
[21:15:59.828] SSH Resolver called for host: 10.103.30.12
[21:15:59.828] Setting up SSH remote "10.103.30.12"
[21:15:59.836] Using commit id "e54c774e0add60467559eb0d1e229c6452cf8447" and quality "stable" for server
[21:15:59.836] Extensions to install:
[21:15:59.841] Install and start server if needed
[21:16:00.986] Checking ssh with "C:\Program Files\Google\Chrome\Application\ssh.exe -V"
[21:16:00.988] Got error from ssh: spawn C:\Program Files\Google\Chrome\Application\ssh.exe ENOENT
[21:16:00.988] Checking ssh with "C:\Program Files\Common Files\Oracle\Java\javapath\ssh.exe -V"
[21:16:00.989] Got error from ssh: spawn C:\Program Files\Common Files\Oracle\Java\javapath\ssh.exe ENOENT
[21:16:00.989] Checking ssh with "C:\Program Files (x86)\Common Files\Oracle\Java\java8path\ssh.exe -V"
[21:16:00.990] Got error from ssh: spawn C:\Program Files (x86)\Common Files\Oracle\Java\java8path\ssh.exe ENOENT
[21:16:00.990] Checking ssh with "C:\Program Files (x86)\Common Files\Oracle\Java\javapath\ssh.exe -V"
[21:16:00.991] Got error from ssh: spawn C:\Program Files (x86)\Common Files\Oracle\Java\javapath\ssh.exe ENOENT
[21:16:00.991] Checking ssh with "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.1\bin\ssh.exe -V"
[21:16:00.993] Got error from ssh: spawn C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.1\bin\ssh.exe ENOENT
[21:16:00.993] Checking ssh with "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.1\libnvvp\ssh.exe -V"
[21:16:00.994] Got error from ssh: spawn C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.1\libnvvp\ssh.exe ENOENT
[21:16:00.994] Checking ssh with "C:\WINDOWS\system32\ssh.exe -V"
[21:16:00.995] Got error from ssh: spawn C:\WINDOWS\system32\ssh.exe ENOENT
[21:16:00.995] Checking ssh with "C:\WINDOWS\ssh.exe -V"
[21:16:00.996] Got error from ssh: spawn C:\WINDOWS\ssh.exe ENOENT
[21:16:00.996] Checking ssh with "C:\WINDOWS\System32\Wbem\ssh.exe -V"
[21:16:00.997] Got error from ssh: spawn C:\WINDOWS\System32\Wbem\ssh.exe ENOENT
[21:16:00.997] Checking ssh with "C:\WINDOWS\System32\WindowsPowerShell\v1.0\ssh.exe -V"
[21:16:00.998] Got error from ssh: spawn C:\WINDOWS\System32\WindowsPowerShell\v1.0\ssh.exe ENOENT
[21:16:00.998] Checking ssh with "C:\WINDOWS\System32\OpenSSH\ssh.exe -V"
[21:16:01.024] > OpenSSH_for_Windows_9.5p1, LibreSSL 3.8.2

[21:16:01.029] Running script with connection command: "C:\WINDOWS\System32\OpenSSH\ssh.exe" -T -D 63951 "10.103.30.12" bash
[21:16:01.030] Generated SSH command: 'type "C:\Users\SPJ\AppData\Local\Temp\vscode-linux-multi-line-command-10.103.30.12-422705181.sh" | "C:\WINDOWS\System32\OpenSSH\ssh.exe" -T -D 63951 "10.103.30.12" bash'
[21:16:01.030] Using connect timeout of 17 seconds
[21:16:01.031] Terminal shell path: C:\WINDOWS\System32\cmd.exe
[21:16:01.265] >
[21:16:01.265] Got some output, clearing connection timeout
[21:16:01.399] > [email protected]'s password:
[21:16:01.400] Showing password prompt
[21:16:04.469] Got password response
[21:16:04.470] "install" wrote data to terminal: "********"
[21:16:04.498] >
[21:16:05.734] > 1ccfd4680661: running
[21:16:05.757] > Acquiring lock on /public/home/shenpj/.vscode-server/bin/e54c774e0add60467559eb0d1e229c6452cf8447/vscode-remote-lock.shenpj.e54c774e0add60467559eb0d1e229c6452cf8447
[21:16:05.776] > Installing to /public/home/shenpj/.vscode-server/bin/e54c774e0add60467559eb0d1e229c6452cf8447...
[21:16:05.801] > 1ccfd4680661%%1%%

Downloading with wget
wget download failed
wget: unrecognized option '--no-config' Usage: wget [OPTION]... [URL]... Try `wget --help' for more options.
Trigger local server download
1ccfd4680661:trigger_server_download
artifact==server-linux-x64==
destFolder==/public/home/shenpj/.vscode-server/bin/==
destFolder2==e54c774e0add60467559eb0d1e229c6452cf8447/vscode-server.tar.gz==
1ccfd4680661:trigger_server_download_end
Waiting for client to transfer server archive...
Waiting for /public/home/shenpj/.vscode-server/bin/e54c774e0add60467559eb0d1e229c6452cf8447/vscode-server.tar.gz.done and vscode-server.tar.gz to exist

[21:16:05.802] Got request to download on client for {"artifact":"server-linux-x64","destPath":"/public/home/shenpj/.vscode-server/bin/e54c774e0add60467559eb0d1e229c6452cf8447/vscode-server.tar.gz"}
[21:16:05.803] server download URL: https://update.code.visualstudio.com/commit:e54c774e0add60467559eb0d1e229c6452cf8447/server-linux-x64/stable
[21:16:05.803] Downloading VS Code server locally...
[21:16:15.695] Downloaded VS Code server to c:\Users\SPJ\AppData\Local\Temp\a99ef054-7239-4806-b23d-fbad84e97026
[21:16:15.698] Renamed VS Code server to c:\Users\SPJ\AppData\Local\Temp\vscode_server_1739798175695\vscode-server.tar.gz
[21:16:15.698] Preparing to scp to host 10.103.30.12
[21:16:15.702] Checking ssh with "C:\Program Files\Google\Chrome\Application\ssh.exe -V"
[21:16:15.703] Got error from ssh: spawn C:\Program Files\Google\Chrome\Application\ssh.exe ENOENT
[21:16:15.704] Checking ssh with "C:\Program Files\Common Files\Oracle\Java\javapath\ssh.exe -V"
[21:16:15.705] Got error from ssh: spawn C:\Program Files\Common Files\Oracle\Java\javapath\ssh.exe ENOENT
[21:16:15.705] Checking ssh with "C:\Program Files (x86)\Common Files\Oracle\Java\java8path\ssh.exe -V"
[21:16:15.706] Got error from ssh: spawn C:\Program Files (x86)\Common Files\Oracle\Java\java8path\ssh.exe ENOENT
[21:16:15.706] Checking ssh with "C:\Program Files (x86)\Common Files\Oracle\Java\javapath\ssh.exe -V"
[21:16:15.707] Got error from ssh: spawn C:\Program Files (x86)\Common Files\Oracle\Java\javapath\ssh.exe ENOENT
[21:16:15.707] Checking ssh with "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.1\bin\ssh.exe -V"
[21:16:15.707] Got error from ssh: spawn C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.1\bin\ssh.exe ENOENT
[21:16:15.707] Checking ssh with "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.1\libnvvp\ssh.exe -V"
[21:16:15.708] Got error from ssh: spawn C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.1\libnvvp\ssh.exe ENOENT
[21:16:15.708] Checking ssh with "C:\WINDOWS\system32\ssh.exe -V"
[21:16:15.709] Got error from ssh: spawn C:\WINDOWS\system32\ssh.exe ENOENT
[21:16:15.709] Checking ssh with "C:\WINDOWS\ssh.exe -V"
[21:16:15.709] Got error from ssh: spawn C:\WINDOWS\ssh.exe ENOENT
[21:16:15.710] Checking ssh with "C:\WINDOWS\System32\Wbem\ssh.exe -V"
[21:16:15.710] Got error from ssh: spawn C:\WINDOWS\System32\Wbem\ssh.exe ENOENT
[21:16:15.710] Checking ssh with "C:\WINDOWS\System32\WindowsPowerShell\v1.0\ssh.exe -V"
[21:16:15.711] Got error from ssh: spawn C:\WINDOWS\System32\WindowsPowerShell\v1.0\ssh.exe ENOENT
[21:16:15.711] Checking ssh with "C:\WINDOWS\System32\OpenSSH\ssh.exe -V"
[21:16:15.740] > OpenSSH_for_Windows_9.5p1, LibreSSL 3.8.2

[21:16:15.742] Expecting scp to be next to ssh at C:\WINDOWS\System32\OpenSSH\scp.exe
[21:16:15.743] Testing scp with "C:\WINDOWS\System32\OpenSSH\scp.exe"
[21:16:15.766] scp exited with code: 1
[21:16:15.766] Got stderr from scp: usage: scp [-346ABCOpqRrsTv] [-c cipher] [-D sftp_server_path] [-F ssh_config]
[-i identity_file] [-J destination] [-l limit] [-o ssh_option]
[-P port] [-S program] [-X sftp_option] source ... target
[21:16:15.766] Copying file to remote with "C:\WINDOWS\System32\OpenSSH\scp.exe" "vscode-server.tar.gz" "vscode-server.tar.gz.done" "10.103.30.12":"/public/home/shenpj/.vscode-server/bin/e54c774e0add60467559eb0d1e229c6452cf8447"
[21:16:15.766] Using cwd: file:///c%3A/Users/SPJ/AppData/Local/Temp/vscode_server_1739798175695
[21:16:15.766] Terminal shell path: C:\WINDOWS\System32\cmd.exe
[21:16:15.996] >
[21:16:16.132] > [email protected]'s password:
[21:16:16.132] Showing password prompt
[21:17:02.871] Got password response
[21:17:02.872] "Copy server to host" wrote data to terminal: "********"
[21:17:02.903] >
[21:17:04.070] > vscode-server.tar.gz 0% 0 0.0KB/s --:-- ETA
[21:17:05.065] > vscode-server.tar.gz 42% 25MB 24.5MB/s 00:01 ETA
[21:17:06.068] > vscode-server.tar.gz 82% 49MB 24.5MB/s 00:00 ETA
[21:17:06.454] > vscode-server.tar.gz 100% 59MB 24.5MB/s 00:02
[21:17:06.464] >

vscode-server.tar.gz.done 100% 9 8.8KB/s 00:00
[21:17:07.745] "Copy server to host" terminal command done
[21:17:08.846] > Found flag and server on host
[21:17:08.864] > 1ccfd4680661%%2%%
tar --version:
tar (GNU tar) 1.26
Copyright (C) 2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by John Gilmore and Jay Fenlason.
[21:17:08.872] >
[21:17:13.827] > Warning: Missing GLIBCXX >= 3.4.25! from /usr/lib64/libstdc++.so.6.0.19
[21:17:16.301] > Warning: Missing GLIBC >= 2.28! from /usr/lib64/libc-2.17.so
Warning: Missing required dependencies. Please refer to our FAQ https://aka.ms/v
vscode-remote/faq/old-linux for additional information.
[21:17:19.542] > rm: cannot remove ‘/public/home/shenpj/.vscode-server/bin/e54c774e0add60467559eb
b0d1e229c6452cf8447’: Directory not empty
1ccfd4680661%%1%%
[21:17:19.555] >
Downloading with wget
wget download failed
wget: unrecognized option '--no-config' Usage: wget [OPTION]... [URL]... Try `wg
get --help' for more options.
Already attempted local download, failing
1ccfd4680661: start
exitCode==193==
listeningOn====
osReleaseId==centos==
arch==x86_64==
vscodeArch==x64==
bitness==64==
tmpDir==/run/user/1012==
platform==linux==
unpackResult==success==
didLocalDownload==1==
downloadTime====
installTime==4866==
extInstallTime====
serverStartTime====
1ccfd4680661: end
[21:17:19.555] Received install output:
exitCode==193==
listeningOn====
osReleaseId==centos==
arch==x86_64==
vscodeArch==x64==
bitness==64==
tmpDir==/run/user/1012==
platform==linux==
unpackResult==success==
didLocalDownload==1==
downloadTime====
installTime==4866==
extInstallTime====
serverStartTime====

[21:17:19.555] Server download failed
[21:17:19.557] Resolver error: Error: Downloading VS Code Server failed. Please try again later.
at y.ServerInstallError (c:\Users\SPJ.vscode\extensions\ms-vscode-remote.remote-ssh-0.117.1\out\extension.js:2:738993)
at p (c:\Users\SPJ.vscode\extensions\ms-vscode-remote.remote-ssh-0.117.1\out\extension.js:2:730746)
at t.handleInstallOutput (c:\Users\SPJ.vscode\extensions\ms-vscode-remote.remote-ssh-0.117.1\out\extension.js:2:734888)
at t.tryInstall (c:\Users\SPJ.vscode\extensions\ms-vscode-remote.remote-ssh-0.117.1\out\extension.js:2:854138)
at async c:\Users\SPJ.vscode\extensions\ms-vscode-remote.remote-ssh-0.117.1\out\extension.js:2:812962
at async t.withShowDetailsEvent (c:\Users\SPJ.vscode\extensions\ms-vscode-remote.remote-ssh-0.117.1\out\extension.js:2:816213)
at async R (c:\Users\SPJ.vscode\extensions\ms-vscode-remote.remote-ssh-0.117.1\out\extension.js:2:809499)
at async t.resolve (c:\Users\SPJ.vscode\extensions\ms-vscode-remote.remote-ssh-0.117.1\out\extension.js:2:813614)
at async c:\Users\SPJ.vscode\extensions\ms-vscode-remote.remote-ssh-0.117.1\out\extension.js:2:1099250
[21:17:19.563] ------

[21:17:19.564] ---------- [Session Summary] -----------
[21:17:19.564] [ServerDownloadFailed]: Error: ServerDownloadFailed (Downloading VS Code Server failed. Please try again later.)
[21:17:19.564] ----------------------------------------
[21:17:19.880] >
[21:17:20.834] "install" terminal command done
[21:17:20.834] Install terminal quit with output:

Expected Behavior

I set the Remote.SSH: Use Exec Server and Remote.SSH: Use Local Server false

Actual Behavior

But after i input the password secondly the error happen like the picture.

Image

Steps To Reproduce

  1. I open the vscode and input the password firstly. The vscode start Setting up SSH Host 10.103.30.12: Downloading VS Code Server locally
  2. after i input the password secondly.the error happen

Anything else?

No response

@explorationRoad explorationRoad added the ssh Issue in vscode-remote SSH label Feb 17, 2025
@Developermayank
Copy link

I am also facing the same issue.
Actually what is happening here is as while using VPN.

  1. remote.SSH.localServerDownload = "always"
  2. I connect to my VPN
  3. Attempt to connect to my remote in vscode is successfull.
  4. localserverdownload failed.

required behaviour

  1. remote.SSH.localServerDownload = "always"
  2. Attempte to connect to my remote
  3. localserverdownload should succeed
  4. I connect to to VPN
  5. vscodeserver already downloaded at point 3 should transfer to remote.

@joshspicer
Copy link
Member

I'm seeing this in your log, which may be causing the extension to behave incorrectly from that point forward 🤔 @deepak1556

[21:17:13.827] > Warning: Missing GLIBCXX >= 3.4.25! from /usr/lib64/libstdc++.so.6.0.19
[21:17:16.301] > Warning: Missing GLIBC >= 2.28! from /usr/lib64/libc-2.17.so
Warning: Missing required dependencies. Please refer to our FAQ https://aka.ms/vscode-remote/faq/old-linux for additional information.
[21:17:19.542] > rm: cannot remove ‘/public/home/shenpj/.vscode-server/bin/e54c774e0add60467559eb
b0d1e229c6452cf8447’: Directory not empty
1ccfd4680661%%1%%
[21:17:19.555] >
Downloading with wget

Are you able to update your remote host according to https://code.visualstudio.com/docs/remote/faq#_can-i-run-vs-code-server-on-older-linux-distributions. Regardless of whether that's the root cause or not, the remote host being unsupported will need to be addressed

@joshspicer
Copy link
Member

@Developermayank Please also include your logs.

Actually what is happening here is as while using VPN.

If the issue only repros when your VPN is enabled, that sounds like an issue with firewall or similar configuration of that VPN. Here are some domains that need to be accessible: https://code.visualstudio.com/docs/remote/faq#_what-are-the-connectivity-requirements-for-vs-code-server

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ssh Issue in vscode-remote SSH
Projects
None yet
Development

No branches or pull requests

3 participants