【问题标题】:Visual Studio Code Remote SSH no longer working "Waiting for server log"Visual Studio Code 远程 SSH 不再工作“等待服务器日志”
【发布时间】:2021-05-03 19:08:14
【问题描述】:

在我升级 VSCode 后,今天才开始发生这种情况。它可以很好地连接到我的一台 AWS 机器,但不能连接到已经正常工作一段时间的机器。它与我的 ssh 密钥无关,因为即使我删除它,它仍然会得到相同的结果。

这是我在尝试远程 ssh 时在输出日志中得到的内容:

[15:00:18.550] Running script with connection command: ssh -T -D 57103 "DEV" bash
[15:00:18.552] Terminal shell path: C:\WINDOWS\System32\cmd.exe
[15:00:18.744] > key_load_public: invalid format
> ]0;C:\WINDOWS\System32\cmd.exe
[15:00:18.745] Got some output, clearing connection timeout
[15:00:19.441] > warning: agent returned different signature type ssh-rsa (expected rsa-sha2-512)
[15:00:20.673] > 1b2d18264e08: running
[15:00:20.707] > Acquiring lock on /home/ubuntu/.vscode-server/bin/3c4e3df9e89829dce27b7b5c245083
> 06b151f30d/vscode-remote-lock.ubuntu.3c4e3df9e89829dce27b7b5c24508306b151f30d   
[15:00:20.723] > Found existing installation at /home/ubuntu/.vscode-server/bin/3c4e3df9e89829dce
> 27b7b5c24508306b151f30d...
> Checking /home/ubuntu/.vscode-server/.3c4e3df9e89829dce27b7b5c24508306b151f30d.l
> og and /home/ubuntu/.vscode-server/.3c4e3df9e89829dce27b7b5c24508306b151f30d.pid
>  for a running server
[15:00:20.745] > Looking for server with pid: 1494
> Starting server with command... /home/ubuntu/.vscode-server/bin/3c4e3df9e89829dc
> e27b7b5c24508306b151f30d/server.sh --start-server --host=127.0.0.1 --enable-remo
> te-auto-shutdown  --port=0  &> "/home/ubuntu/.vscode-server/.3c4e3df9e89829dce27
> b7b5c24508306b151f30d.log" < /dev/null
> printenv:
>     SSH_CONNECTION=68.132.254.210 57105 172.31.46.222 22
>     LANG=C.UTF-8
>     XDG_SESSION_ID=6
>     USER=ubuntu
>     PWD=/home/ubuntu
>     HOME=/home/ubuntu
>     SSH_CLIENT=68.132.254.210 57105 22
>     MAIL=/var/mail/ubuntu
>     SHELL=/bin/bash
>     SHLVL=2
>     VSCODE_AGENT_FOLDER=/home/ubuntu/.vscode-server
>     LOGNAME=ubuntu
>     XDG_RUNTIME_DIR=/run/user/1000
>     PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
[15:00:20.745] > 
> :/usr/local/games:/snap/bin
>     _=/usr/bin/printenv
> Spawned remote server: 2989
[15:00:20.753] > 
> Waiting for server log...
.......
[15:00:28.621] > Waiting for server log...
[15:00:28.655] > Waiting for server log...
[15:00:28.689] > Waiting for server log...
[15:00:28.723] >  
> *
> * Reminder: You may only use this software with Visual Studio family products,  
> * as described in the license (https://go.microsoft.com/fwlink/?linkid=2077057) 
> *
> 
[15:00:28.733] > 
> Server did not start successfully. Full server log at /home/ubuntu/.vscode-serve
> r/.3c4e3df9e89829dce27b7b5c24508306b151f30d.log >>>
> <<< End of server log
> 1b2d18264e08: start
> exitCode==32==
> listeningOn====
> osReleaseId==ubuntu==
> arch==x86_64==
> tmpDir==/run/user/1000==
> platform==linux==
[15:00:28.736] > 
> unpackResult====
> didLocalDownload==0==
> downloadTime====
> installTime====
> extInstallTime====
> serverStartTime==7980==
> 1b2d18264e08: end
[15:00:28.736] Received install output: 
exitCode==32==
listeningOn====
osReleaseId==ubuntu==
arch==x86_64==
tmpDir==/run/user/1000==
platform==linux==
unpackResult====
didLocalDownload==0==
downloadTime====
installTime====
extInstallTime====
serverStartTime==7980==
[15:00:28.742] Resolver error: Error: The VS Code Server failed to start
    at Function.ServerInstallError (c:\Users\Marc Zeitouni\.vscode\extensions\ms-vscode-remote.remote-ssh-0.65.4\out\extension.js:1:64575)
    at c (c:\Users\Marc Zeitouni\.vscode\extensions\ms-vscode-remote.remote-ssh-0.65.4\out\extension.js:1:58900)
    at Object.t.handleInstallOutput (c:\Users\Marc Zeitouni\.vscode\extensions\ms-vscode-remote.remote-ssh-0.65.4\out\extension.js:1:63317)
    at Object.t.tryInstall (c:\Users\Marc Zeitouni\.vscode\extensions\ms-vscode-remote.remote-ssh-0.65.4\out\extension.js:1:413984)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at async c:\Users\Marc Zeitouni\.vscode\extensions\ms-vscode-remote.remote-ssh-0.65.4\out\extension.js:1:294518
    at async Object.t.withShowDetailsEvent (c:\Users\Marc Zeitouni\.vscode\extensions\ms-vscode-remote.remote-ssh-0.65.4\out\extension.js:1:405329)
    at async Object.t.resolve (c:\Users\Marc Zeitouni\.vscode\extensions\ms-vscode-remote.remote-ssh-0.65.4\out\extension.js:1:295639)
    at async c:\Users\Marc Zeitouni\.vscode\extensions\ms-vscode-remote.remote-ssh-0.65.4\out\extension.js:127:110530
[15:00:28.748] ------
[15:00:29.311] "install" terminal command done
[15:00:29.311] Install terminal quit with output: 

【问题讨论】:

  • 我也想知道这个问题的答案。我会尝试重现
  • 我在新更新的 Insiders 版本中遇到了这个问题。回到 Stable 是唯一为我解决问题的方法。

标签: visual-studio-code vscode-extensions


【解决方案1】:

我遇到了同样的问题。对我有用的是更新 vscode 扩展: -远程容器 -远程-SSH -远程-WSL

【讨论】:

    【解决方案2】:

    我有同样的问题。为我解决的问题是杀死主机上的 vscode 服务器:

    1. ctrl+shift+p 打开命令面板。
    2. 选择“Remote-SSH: kill VS Code Server on Host...”
    3. 选择您无法连接的主机。

    然后,重启 VS Code 并重新连接。

    【讨论】:

      【解决方案3】:

      我遇到了同样的问题。在远程系统上,我删除了 /.vscode-server 文件夹,这会强制再次下载 vscode-server.tar.gz,解压缩该文件夹并通过 scp 传输扩展。

      rm -fr ~/.vscode-server/
      

      如果您的远程设备无法访问互联网,您可以使用以下方法: Install VSCODE server offline

      【讨论】:

        【解决方案4】:

        我遇到了同样的问题。对我有用的解决方案是其他两个答案的组合。

        所有操作都在本地 vscode 命令面板中完成:

        1. 打开命令面板。
        2. 选择“远程-SSH:从主机卸载 vscode 服务器”
        3. 选择您无法连接的主机。

        然后,重新启动 VS Code 并重新连接。 VScode 服务器将重新安装在您的远程主机中,您可以成功连接到它。

        【讨论】:

          猜你喜欢
          • 1970-01-01
          • 2020-02-09
          • 2015-08-26
          • 2020-05-12
          • 2019-03-30
          • 2017-03-10
          • 2022-10-13
          • 2021-04-17
          • 2018-07-31
          相关资源
          最近更新 更多