今日正常启动vscode ssh准备编辑写写代码,结果无法连接到远端服务器,我用Xterm试了一下,发现远端服务器可以照常连接,故排除了服务器本身的连接问题; 具体报错信息如下:
[08:47:41.235] Log Level: 1
[08:47:41.244] remote-ssh@0.62.0
[08:47:41.244] win32 x64
[08:47:41.246] SSH Resolver called for "ssh-remote+mrevowgp1.westus2.cloudapp.azure.com", attempt 1
[08:47:41.246] "remote.SSH.useLocalServer": false
[08:47:41.247] "remote.SSH.showLoginTerminal": false
[08:47:41.247] "remote.SSH.remotePlatform": {"mrevowcpu2.centralus.cloudapp.azure.com":"linux"}
[08:47:41.247] "remote.SSH.sshPath": undefined
[08:47:41.247] "remote.SSH.sshConfigurationFile": undefined
[08:47:41.247] "remote.SSH.useFlock": true
[08:47:41.248] "remote.SSH.lockfilesInTmp": false
[08:47:41.248] "remote.SSH.localServerDownload": auto
[08:47:41.248] "remote.SSH.remoteServerListenOnSocket": false
[08:47:41.248] "remote.SSH.showLoginTerminal": false
[08:47:41.248] "remote.SSH.maxReconnectionAttempts": 9007199254740991
[08:47:41.248] SSH Resolver called for host: mrevowgp1.westus2.cloudapp.azure.com
[08:47:41.249] Setting up SSH remote "mrevowgp1.westus2.cloudapp.azure.com"
[08:47:41.279] Using commit id "ea3859d4ba2f3e577a159bc91e3074c5d85c0523" and quality "stable" for server
[08:47:41.285] Install and start server if needed
[08:47:45.967] Checking ssh with "ssh -V"
[08:47:46.028] > OpenSSH_for_Windows_7.7p1, LibreSSL 2.6.5
[08:47:46.034] Running script with connection command: ssh -T -D 57263 "mrevowgp1.westus2.cloudapp.azure.com" bash
[08:47:46.037] Terminal shell path: C:\WINDOWS\System32\cmd.exe
[08:47:47.021] "install" terminal received data: "�[2J�[m�[H93ea2fea3716: running
�]0;C:\WINDOWS\System32\cmd.exe��[?25h"
[08:47:47.022] Got some output, clearing connection timeout
[08:47:47.061] "install" terminal received data: "Acquiring lock on /home/mrevow/.vscode-server/bin/ea3859d4ba2f3e577a159bc91e3074
c5d85c0523/vscode-remote-lock.mrevow.ea3859d4ba2f3e577a159bc91e3074c5d85c0523
Found existing installation at /home/mrevow/.vscode-server/bin/ea3859d4ba2f3e577
a159bc91e3074c5d85c0523...�[K
Checking /home/mrevow/.vscode-server/.ea3859d4ba2f3e577a159bc91e3074c5d85c0523.l
og and /home/mrevow/.vscode-server/.ea3859d4ba2f3e577a159bc91e3074c5d85c0523.pid
for a running server�[K
Looking for server with pid: 4605�[K"
[08:47:47.076] "install" terminal received data: "Found running server...�[K
�[K
*�[K
* Reminder: You may only use this software with Visual Studio family products,
* as described in the license (https://go.microsoft.com/fwlink/?linkid=2077057)
*�[K
�[K
Server did not start successfully. Full server log at /home/mrevow/.vscode-serve
r/.ea3859d4ba2f3e577a159bc91e3074c5d85c0523.log >>>�[K
<<< End of server log�[K
93ea2fea3716: start�[K
exitCode==32==�[K
listeningOn====�[K
osReleaseId==ubuntu==�[K
arch==x86_64==�[K
tmpDir==/run/user/1000==
platform==linux==
unpackResult====
didLocalDownload==0==
downloadTime====
installTime====
extInstallTime====
serverStartTime====
93ea2fea3716: end"
[08:47:47.076] Received install output:
exitCode==32==
listeningOn====
osReleaseId==ubuntu==
arch==x86_64==
tmpDir==/run/user/1000==
platform==linux==
unpackResult====
didLocalDownload==0==
downloadTime====
installTime====
extInstallTime====
serverStartTime====
[08:47:47.084] Resolver error: Error: The VS Code Server failed to start
at Function.ServerInstallError (c:\Users\mrevow\.vscode\extensions\ms-vscode-remote.remote-ssh-0.62.0\out\extension.js:1:64207)
at c:\Users\mrevow\.vscode\extensions\ms-vscode-remote.remote-ssh-0.62.0\out\extension.js:1:62459
at Object.t.handleInstallOutput (c:\Users\mrevow\.vscode\extensions\ms-vscode-remote.remote-ssh-0.62.0\out\extension.js:1:63061)
at I (c:\Users\mrevow\.vscode\extensions\ms-vscode-remote.remote-ssh-0.62.0\out\extension.js:1:311112)
at processTicksAndRejections (internal/process/task_queues.js:94:5)
at async c:\Users\mrevow\.vscode\extensions\ms-vscode-remote.remote-ssh-0.62.0\out\extension.js:1:309029
at async Object.t.withShowDetailsEvent (c:\Users\mrevow\.vscode\extensions\ms-vscode-remote.remote-ssh-0.62.0\out\extension.js:1:403706)
at async Object.t.resolve (c:\Users\mrevow\.vscode\extensions\ms-vscode-remote.remote-ssh-0.62.0\out\extension.js:1:312426)
at async c:\Users\mrevow\.vscode\extensions\ms-vscode-remote.remote-ssh-0.62.0\out\extension.js:127:110280
[08:47:47.087] TELEMETRY: {"eventName":"resolver","properties":{"outcome":"failure","reason":"ExitCode","exitCodeLabel":"ServerFailedToStart","osReleaseId":"ubuntu","arch":"x86_64","askedPw":"0","askedPassphrase":"0","asked2fa":"0","askedHostKey":"0","remoteInConfigFile":"1","gotUnrecognizedPrompt":"0","dynamicForwarding":"1","localServer":"0"},"measures":{"resolveAttempts":1,"exitCode":32,"retries":1,"timing.totalResolveTime":5832,"timing.preSshTime":4790,"timing.establishSshTime":986,"timing.scriptTime":1040}}
[08:47:47.089] ------
[08:47:47.799] "install" terminal command done
[08:47:47.799] Install terminal quit with output:
可以看到报错信息: Resolver error: Error: The VS Code Server failed to start 那么问题就肯定来源于VSCODE啦,故首先排除本地vscode上有问题(我用的挺正常的,连接其他服务器也都无问题),那么就是远端服务器问题啦。
故尝试以下步骤来解决:
ctrl-shift-p 后选择Remote-SSH:kill VS Code Server on Host... - 重新打开对应的远端服务器即可
|