Ubuntu 上VS Code更新后 Remote-SSH 无法连接服务器:failed to install the vs code server!

问题描述:

正常使用VS code SSH,退出VS code重新启动后,出现错误提示:Can't connect to the server, failed to install the vs code server. 

解决方案:

在ubuntu terminal 窗口用命令行,连接远程服务器,将当前用户目录下的隐藏文件夹.vscode-server夹删除(rm -r /~/.vscoder-server),之后在vscode上,重新连接ssh server,即可正常连接。

Reference1: Could not establish connection to ...

无效方案如下

[20:43:02.961] Log Level: 2 [20:43:02.986] SSH Resolver called for "ssh-remote+root", attempt 1 [20:43:02.992] remote.SSH.useLocalServer = false [20:43:02.993] remote.SSH.useExecServer = true [20:43:02.993] remote.SSH.bindHost = {} [20:43:02.993] remote.SSH.showLoginTerminal = false [20:43:02.993] remote.SSH.remotePlatform = {} [20:43:02.993] remote.SSH.path = [20:43:02.994] remote.SSH.configFile = [20:43:02.994] remote.SSH.useFlock = true [20:43:02.994] remote.SSH.lockfilesInTmp = false [20:43:02.997] remote.SSH.localServerDownload = auto [20:43:02.997] remote.SSH.remoteServerListenOnSocket = false [20:43:02.998] remote.SSH.defaultExtensions = [] [20:43:02.998] remote.SSH.defaultExtensionsIfInstalledLocally = [] [20:43:02.998] remote.SSH.loglevel = 2 [20:43:02.998] remote.SSH.enableDynamicForwarding = true [20:43:02.998] remote.SSH.enableRemoteCommand = false [20:43:02.998] remote.SSH.serverPickPortsFromRange = {} [20:43:02.998] remote.SSH.serverInstallPath = {} [20:43:02.998] remote.SSH.permitPtyAllocation = false [20:43:02.998] remote.SSH.preferredLocalPortRange = undefined [20:43:02.999] remote.SSH.useCurlAndWgetConfigurationFiles = false [20:43:02.999] remote.SSH.experimental.chat = true [20:43:02.999] remote.SSH.experimental.enhancedSessionLogs = true [20:43:02.999] remote.SSH.httpProxy = {"*":""} [20:43:02.999] remote.SSH.httpsProxy = {"*":""} [20:43:03.009] VS Code version: 1.101.1 [20:43:03.010] Remote-SSH version: remote-ssh@0.120.0 [20:43:03.010] win32 x64 [20:43:03.015] SSH Resolver called for host: root [20:43:03.015] Setting up SSH remote "root" [20:43:03.025] Using commit id "18e3a1ec544e6907be1e944a94c496e302073435" and quality "stable" for server [20:43:03.025] Extensions to install: [20:43:03.032] Install and start server if needed [20:43:06.034] Checking ssh with "C:\Program Files (x86)\Common Files\Oracle\Java\java8path\ssh.exe -V" [20:43:06.037] Got error from ssh: spawn C:\Program Files (x86)\Common Files\Oracle\Java\java8path\ssh.exe ENOENT [20:43:06.037] Checking ssh with "C:\Program Files (x86)\Common Files\Oracle\Java\javapath\ssh.exe -V" [20:43:06.039] Got error from ssh: spawn C:\Program Files (x86)\Common Files\Oracle\Java\javapath\ssh.exe ENOENT [20:43:06.039] Checking ssh with "C:\Windows\system32\ssh.exe -V" [20:43:06.040] Got error from ssh: spawn C:\Windows\system32\ssh.exe ENOENT [20:43:06.040] Checking ssh with "C:\Windows\ssh.exe -V" [20:43:06.041] Got error from ssh: spawn C:\Windows\ssh.exe ENOENT [20:43:06.042] Checking ssh with "C:\Windows\System32\Wbem\ssh.exe -V" [20:43:06.042] Got error from ssh: spawn C:\Windows\System32\Wbem\ssh.exe ENOENT [20:43:06.043] Checking ssh with "C:\Windows\System32\WindowsPowerShell\v1.0\ssh.exe -V" [20:43:06.043] Got error from ssh: spawn C:\Windows\System32\WindowsPowerShell\v1.0\ssh.exe ENOENT [20:43:06.043] Checking ssh with "C:\Windows\System32\OpenSSH\ssh.exe -V" [20:43:06.071] > OpenSSH_for_Windows_9.5p1, LibreSSL 3.8.2 [20:43:06.076] Running script with connection command: "C:\Windows\System32\OpenSSH\ssh.exe" -T -D 51109 root sh [20:43:06.078] Generated SSH command: 'type "C:\Users\chen\AppData\Local\Temp\vscode-linux-multi-line-command-root-258649359.sh" | "C:\Windows\System32\OpenSSH\ssh.exe" -T -D 51109 root sh' [20:43:06.078] Using connect timeout of 17 seconds [20:43:06.079] Terminal shell path: C:\Windows\System32\cmd.exe [20:43:09.884] > root@192.168.124.6's password: [20:43:09.884] Got some output, clearing connection timeout [20:43:09.885] Showing password prompt [20:43:17.794] Got password response [20:43:17.794] "install" wrote data to terminal: "******" [20:43:17.847] > [20:43:18.372] > d55f9866d272: running > Script executing under PID: 18331 [20:43:18.448] > Found existing installation at /root/.vscode-server... > Starting VS Code CLI... > Removing old logfile at /root/.vscode-server/.cli.18e3a1ec544e6907be1e944a94c496e302073435.log > Spawned remote CLI: 18357 > Waiting for server log... [20:43:18.583] > Waiting for server log... > Waiting for server log... > Waiting for server log... [20:43:18.624] > Exec server process not found > sh: 418: kill: No such process [20:43:18.631] > [2023-03-02 21:21:50] error This machine does not meet Visual Studio Code Server's prerequisites, expected either... > - find GLIBC >= v2.28.0 (but found v2.27.0 instead) for GNU environments > - find /lib/ld-musl-aarch64.so.1, which is required to run the Visual Studio Code Server in musl environments > d55f9866d272: start > exitCode==207== > listeningOn==== > osReleaseId==ubuntu== > arch==aarch64== > vscodeArch==arm64== > bitness==64== > tmpDir==/run/user/0== > platform==linux== > unpackResult==== [20:43:18.640] > > didLocalDownload==0== > downloadTime==== > installTime==== > serverStartTime==== > execServerToken==a11aaa11-1a1a-1a11-111a-11aa111111a1== > platformDownloadPath==cli-alpine-arm64== > SSH_AUTH_SOCK==== > DISPLAY==== > d55f9866d272: end [20:43:18.640] Received install output: exitCode==207== listeningOn==== osReleaseId==ubuntu== arch==aarch64== vscodeArch==arm64== bitness==64== tmpDir==/run/user/0== platform==linux== unpackResult==== didLocalDownload==0== downloadTime==== installTime==== serverStartTime==== execServerToken==a11aaa11-1a1a-1a11-111a-11aa111111a1== platformDownloadPath==cli-alpine-arm64== SSH_AUTH_SOCK==== DISPLAY==== [20:43:18.641] Resolver error: Error: 远程主机不满足运行VS Code服务器的先决条件 at y.ServerInstallError (c:\Users\chen\.vscode\extensions\ms-vscode-remote.remote-ssh-0.120.0\out\extension.js:2:744694) at p (c:\Users\chen\.vscode\extensions\ms-vscode-remote.remote-ssh-0.120.0\out\extension.js:2:739113) at t.handleInstallOutput (c:\Users\chen\.vscode\extensions\ms-vscode-remote.remote-ssh-0.120.0\out\extension.js:2:740589) at t.tryInstall (c:\Users\chen\.vscode\extensions\ms-vscode-remote.remote-ssh-0.120.0\out\extension.js:2:865534) at async c:\Users\chen\.vscode\extensions\ms-vscode-remote.remote-ssh-0.120.0\out\extension.js:2:824246 at async t.withShowDetailsEvent (c:\Users\chen\.vscode\extensions\ms-vscode-remote.remote-ssh-0.120.0\out\extension.js:2:827501) at async A (c:\Users\chen\.vscode\extensions\ms-vscode-remote.remote-ssh-0.120.0\out\extension.js:2:820760) at async t.resolve (c:\Users\chen\.vscode\extensions\ms-vscode-remote.remote-ssh-0.120.0\out\extension.js:2:824898) at async c:\Users\chen\.vscode\extensions\ms-vscode-remote.remote-ssh-0.120.0\out\extension.js:2:1113660 [20:43:18.648] ------ [20:43:18.649] ---------- [Session Summary] ----------- [20:43:18.649] [LinuxPrereqs]: 远程主机可能不符合 glibc 和 libstdc++ VS Code 服务器的先决条件 (远程主机不满足运行VS Code服务器的先决条件) [20:43:18.649] ---------------------------------------- [20:43:18.858] > [20:43:19.386] Opening exec server for ssh-remote+root [20:43:19.439] Initizing new exec server for ssh-remote+root [20:43:19.439] Using commit id "18e3a1ec544e6907be1e944a94c496e302073435" and quality "stable" for server [20:43:19.439] Extensions to install: [20:43:19.462] Opening exec server for ssh-remote+root [20:43:19.464] Install and start server if needed [20:43:19.904] "install" terminal command done [20:43:19.905] Install terminal quit with output: [20:43:21.556] getPlatformForHost was canceled [20:43:21.556] Exec server for ssh-remote+root failed: Error: 已取消连接 [20:43:21.556] Existing exec server for ssh-remote+root errored (Error: 已取消连接) [20:43:21.556] Initizing new exec server for ssh-remote+root [20:43:21.557] Error opening exec server for ssh-remote+root: Error: 已取消连接 [20:43:21.557] ---------- [Session Summary] ----------- [20:43:21.557] [LinuxPrereqs]: 远程主机可能不符合 glibc 和 libstdc++ VS Code 服务器的先决条件 (远程主机不满足运行VS Code服务器的先决条件) [20:43:21.557] ---------------------------------------- [20:43:21.557] Using commit id "18e3a1ec544e6907be1e944a94c496e302073435" and quality "stable" for server [20:43:21.557] Extensions to install: [20:43:21.562] Install and start server if needed
06-21
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

xiangyong58

喝杯茶还能肝到天亮,共同进步

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值