microsoft / vscode-remote-release

Visual Studio Code Remote Development: Open any folder in WSL, in a Docker container, or on a remote machine using SSH and take advantage of VS Code's full feature set.
https://aka.ms/vscode-remote
Other
3.67k stars 292 forks source link

Could not establish connection to "host": The VS Code Server failed to start. #5602

Closed renyhp closed 2 years ago

renyhp commented 3 years ago
[09:48:27.061] Log Level: 2
[09:48:27.063] remote-ssh@0.65.8
[09:48:27.063] linux x64
[09:48:27.064] SSH Resolver called for "ssh-remote+machine.domain.tld", attempt 1
[09:48:27.064] "remote.SSH.useLocalServer": true
[09:48:27.064] "remote.SSH.path": undefined
[09:48:27.064] "remote.SSH.configFile": undefined
[09:48:27.064] "remote.SSH.useFlock": true
[09:48:27.064] "remote.SSH.lockfilesInTmp": true
[09:48:27.065] "remote.SSH.localServerDownload": auto
[09:48:27.065] "remote.SSH.remoteServerListenOnSocket": false
[09:48:27.065] "remote.SSH.showLoginTerminal": false
[09:48:27.065] "remote.SSH.defaultExtensions": []
[09:48:27.065] "remote.SSH.loglevel": 2
[09:48:27.065] SSH Resolver called for host: machine.domain.tld
[09:48:27.065] Setting up SSH remote "machine.domain.tld"
[09:48:27.067] Acquiring local install lock: /tmp/vscode-remote-ssh-47bf8c66-install.lock
[09:48:27.079] Looking for existing server data file at /home/user/.config/Code/User/globalStorage/ms-vscode-remote.remote-ssh/vscode-ssh-host-47bf8c66-83bd43bc519d15e50c4272c6cf5c1479df196a4d-0.65.8/data.json
[09:48:27.080] Using commit id "83bd43bc519d15e50c4272c6cf5c1479df196a4d" and quality "stable" for server
[09:48:27.085] Install and start server if needed
[09:48:27.090] PATH: /home/user/.local/bin:/home/user/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
[09:48:27.090] Checking ssh with "ssh -V"
[09:48:27.103] > OpenSSH_8.2p1 Ubuntu-4ubuntu0.3, OpenSSL 1.1.1f  31 Mar 2020

[09:48:27.117] askpass server listening on /run/user/1000/vscode-ssh-askpass-1e9d2ba4c8692664cddce72dbf4d854f9fd21a02.sock
[09:48:27.117] Spawning local server with {"serverId":1,"ipcHandlePath":"/run/user/1000/vscode-ssh-askpass-761899d81051263ec5520e154be2ef29f170be79.sock","sshCommand":"ssh","sshArgs":["-v","-T","-D","40375","-o","ConnectTimeout=90","machine.domain.tld","bash"],"dataFilePath":"/home/user/.config/Code/User/globalStorage/ms-vscode-remote.remote-ssh/vscode-ssh-host-47bf8c66-83bd43bc519d15e50c4272c6cf5c1479df196a4d-0.65.8/data.json"}
[09:48:27.117] Local server env: {"DISPLAY":":0","ELECTRON_RUN_AS_NODE":"1","SSH_ASKPASS":"/home/user/.vscode/extensions/ms-vscode-remote.remote-ssh-0.65.8/out/local-server/askpass.sh","VSCODE_SSH_ASKPASS_NODE":"/usr/share/code/code","VSCODE_SSH_ASKPASS_MAIN":"/home/user/.vscode/extensions/ms-vscode-remote.remote-ssh-0.65.8/out/askpass-main.js","VSCODE_SSH_ASKPASS_HANDLE":"/run/user/1000/vscode-ssh-askpass-1e9d2ba4c8692664cddce72dbf4d854f9fd21a02.sock"}
[09:48:27.120] Spawned 21992
[09:48:27.200] > local-server-1> Spawned ssh, pid=22000
[09:48:27.200] stderr> OpenSSH_8.2p1 Ubuntu-4ubuntu0.3, OpenSSL 1.1.1f  31 Mar 2020
[09:48:27.242] stderr> debug1: Server host key: ecdsa-sha2-nistp256 SHA256:q+xzK9deJ9K3kVSpV0a/w6vUnLErqGEYAUB1OkxR+uk
[09:48:27.660] stderr> Authenticated to machine.domain.tld ([two:numbers:d00:12::19f]:22).
[09:48:28.485] > ready: 7d6898de55f7
[09:48:28.492] > Linux 3.10.0-1160.41.1.el7.x86_64 #1 SMP Tue Aug 31 14:52:47 UTC 2021
[09:48:28.493] Platform: linux
[09:48:28.519] > 7d6898de55f7: running
[09:48:32.652] > Acquiring lock on /run/user/132469/vscode-remote-lock.remoteuser.83bd43bc519d15e50c4272c6cf5c1479df196a4d
[09:48:33.501] > Found existing installation at /afs/domain.tld/user/r/remoteuser/.vscode-server/bin/83bd43bc519d15e50c4272c6cf5c1479df196a4d...
> Checking /afs/domain.tld/user/r/remoteuser/.vscode-server/.83bd43bc519d15e50c4272c6cf5c1479df196a4d.log and /afs/domain.tld/user/r/remoteuser/.vscode-server/.83bd43bc519d15e50c4272c6cf5c1479df196a4d.pid for a running server
[09:48:34.114] > Looking for server with pid: 27348
> Starting server with command... /afs/domain.tld/user/r/remoteuser/.vscode-server/bin/83bd43bc519d15e50c4272c6cf5c1479df196a4d/server.sh --start-server --host=127.0.0.1 --enable-remote-auto-shutdown  --port=0  &> "/afs/domain.tld/user/r/remoteuser/.vscode-server/.83bd43bc519d15e50c4272c6cf5c1479df196a4d.log" < /dev/null
> printenv:
>     LC_PAPER=it_IT.UTF-8
>     MANPATH=:/opt/puppetlabs/puppet/share/man
>     XDG_SESSION_ID=c9087
>     LC_ADDRESS=it_IT.UTF-8
>     VIRTUALENVWRAPPER_SCRIPT=/usr/bin/virtualenvwrapper.sh
>     GUESTFISH_INIT=\e[1;34m
>     LC_MONETARY=it_IT.UTF-8
>     SELINUX_ROLE_REQUESTED=
>     SHELL=/bin/bash
>     STAGE_SVCCLASS=na62
>     TMPDIR=/tmp/remoteuser
>     SSH_CLIENT=two:numbers:204:1::102:396a 42066 22
>     CONDA_SHLVL=0
>     SELINUX_USE_CURRENT_RANGE=
>     LC_NUMERIC=it_IT.UTF-8
>     QTDIR=/usr/lib64/qt-3.3
>     QTINC=/usr/lib64/qt-3.3/include
>     QT_GRAPHICSSYSTEM_CHECKED=1
>     USER=remoteuser
>     LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.axa=00;36:*.oga=00;36:*.spx=00;36:*.xspf=00;36:
>     LC_TELEPHONE=it_IT.UTF-8
>     VSCODE_AGENT_FOLDER=/afs/domain.tld/user/r/remoteuser/.vscode-server
>     GUESTFISH_PS1=\[\e[1;32m\]><fs>\[\e[0;31m\]
>     MAIL=/var/mail/remoteuser
>     PATH=/usr/sue/bin:/usr/lib64/qt-3.3/bin:/usr/condabin:/usr/local/bin:/usr/bin:/opt/puppetlabs/bin
>     LC_IDENTIFICATION=it_IT.UTF-8
>     PWD=/afs/domain.tld/user/r/remoteuser
>     EDITOR=/bin/nano -w
>     LANG=it_IT.UTF-8
>     MODULEPATH=/usr/share/Modules/modulefiles:/etc/modulefiles
>     QT_GRAPHICSSYSTEM=native
>     LOADEDMODULES=
>     KDEDIRS=/usr
>     GUESTFISH_OUTPUT=\e[0m
>     LC_MEASUREMENT=it_IT.UTF-8
>     MYPROXY_SERVER=myproxy.domain.tld
>     SELINUX_LEVEL_REQUESTED=
>     SSH_ASKPASS=/usr/libexec/openssh/gnome-ssh-askpass
>     KRB5CCNAME=FILE:/tmp/krb5cc_132469_ie3RFkvVhd
>     SHLVL=3
>     HOME=/afs/domain.tld/user/r/remoteuser
>     _VIRTUALENVWRAPPER_API= mkvirtualenv rmvirtualenv lsvirtualenv showvirtualenv workon add2virtualenv cdsitepackages cdvirtualenv lssitepackages toggleglobalsitepackages cpvirtualenv setvirtualenvproject mkproject cdproject mktmpenv wipeenv allvirtualenv
>     LOGNAME=remoteuser
>     QTLIB=/usr/lib64/qt-3.3/lib
>     CVS_RSH=ssh
>     XDG_DATA_DIRS=/afs/domain.tld/user/r/remoteuser/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share:/usr/share
>     SSH_CONNECTION=two:numbers:204:1::102:396a 42066 two:numbers:d00:12::19f 22
>     MODULESHOME=/usr/share/Modules
>     LESSOPEN=||/usr/bin/lesspipe.sh %s
>     XDG_RUNTIME_DIR=/run/user/132469
>     DISPLAY=localhost:29.0
>     QT_PLUGIN_PATH=/usr/lib64/kde4/plugins:/usr/lib/kde4/plugins
>     GUESTFISH_RESTORE=\e[0m
>     LC_TIME=it_IT.UTF-8
>     LC_NAME=it_IT.UTF-8
>     BASH_FUNC_module()=() {  eval `/usr/bin/modulecmd bash $*`
>     }
>     _=/usr/bin/printenv
[09:48:37.697] > Spawned remote server: 13389
> Waiting for server log...
> Waiting for server log...
> Waiting for server log...
> Waiting for server log...
> Waiting for server log...
> Waiting for server log...
[09:48:37.727] > Waiting for server log...
[09:48:37.761] > Waiting for server log...
[09:48:37.796] > Waiting for server log...
[09:48:37.831] > Waiting for server log...
[09:48:38.416] > Waiting for server log...
> Waiting for server log...
> Waiting for server log...
> Waiting for server log...
[09:48:38.448] > Waiting for server log...
[09:48:38.484] > Waiting for server log...
[09:48:38.518] > Waiting for server log...
[09:48:38.552] > Waiting for server log...
[09:48:38.588] > Waiting for server log...
[09:48:38.623] > Waiting for server log...
[09:48:38.657] > Waiting for server log...
[09:48:38.691] > Waiting for server log...
[09:48:38.727] > Waiting for server log...
[09:48:38.767] > Waiting for server log...
[09:48:38.801] > Waiting for server log...
[09:48:38.837] > Waiting for server log...
[09:48:38.871] > Waiting for server log...
[09:48:38.905] > Waiting for server log...
[09:48:38.940] > Waiting for server log...
[09:48:38.976] > Waiting for server log...
[09:48:39.010] > Waiting for server log...
[09:48:39.045] > Waiting for server log...
[09:48:39.079] > Waiting for server log...
[09:48:39.114] > Waiting for server log...
[09:48:39.149] > Waiting for server log...
[09:48:39.183] > Waiting for server log...
[09:48:39.220] > Waiting for server log...
[09:48:39.254] > Waiting for server log...
[09:48:39.288] > Waiting for server log...
[09:48:39.323] > Waiting for server log...
[09:48:39.360] > Waiting for server log...
[09:48:39.394] > Waiting for server log...
[09:48:39.429] > Waiting for server log...
[09:48:39.463] > Waiting for server log...
[09:48:39.499] > Waiting for server log...
[09:48:39.533] > Waiting for server log...
[09:48:39.568] > Waiting for server log...
[09:48:39.602] > Waiting for server log...
[09:48:39.639] > Waiting for server log...
[09:48:39.674] > Waiting for server log...
[09:48:39.709] > Waiting for server log...
[09:48:39.743] > Waiting for server log...
[09:48:39.778] > Waiting for server log...
[09:48:39.812] > Waiting for server log...
[09:48:39.846] > Waiting for server log...
[09:48:39.880] > Waiting for server log...
[09:48:39.915] > Waiting for server log...
[09:48:39.951] > Waiting for server log...
[09:48:39.985] > Waiting for server log...
[09:48:40.019] > Waiting for server log...
[09:48:40.053] > Waiting for server log...
[09:48:40.088] > Waiting for server log...
[09:48:40.123] > Waiting for server log...
[09:48:40.157] > Waiting for server log...
[09:48:40.192] > Waiting for server log...
[09:48:40.226] > Waiting for server log...
[09:48:40.261] > Waiting for server log...
[09:48:40.295] > Waiting for server log...
[09:48:40.329] > Waiting for server log...
[09:48:40.364] > Waiting for server log...
[09:48:40.398] > Waiting for server log...
[09:48:40.432] > Waiting for server log...
[09:48:40.467] > Waiting for server log...
[09:48:40.502] > Waiting for server log...
[09:48:40.536] > Waiting for server log...
[09:48:40.574] > Waiting for server log...
[09:48:40.604] > Waiting for server log...
[09:48:40.639] > Waiting for server log...
[09:48:40.674] > Waiting for server log...
[09:48:40.709] > Waiting for server log...
[09:48:40.743] > Waiting for server log...
[09:48:40.778] > Waiting for server log...
[09:48:40.812] > Waiting for server log...
[09:48:40.846] > Waiting for server log...
[09:48:40.883] > Waiting for server log...
[09:48:40.919] > Waiting for server log...
[09:48:40.954] > Waiting for server log...
[09:48:40.989] > Waiting for server log...
[09:48:41.025] > Waiting for server log...
[09:48:41.060] > Waiting for server log...
[09:48:41.095] > Waiting for server log...
[09:48:41.129] > Waiting for server log...
[09:48:41.165] > Waiting for server log...
[09:48:41.200] > Waiting for server log...
[09:48:41.236] > Waiting for server log...
[09:48:41.272] > Waiting for server log...
[09:48:41.308] > Waiting for server log...
[09:48:41.342] > Waiting for server log...
[09:48:41.376] > Waiting for server log...
[09:48:41.410] > Waiting for server log...
[09:48:41.446] > Waiting for server log...
[09:48:41.481] > Waiting for server log...
[09:48:41.563] > Waiting for server log...
> Waiting for server log...
[09:48:41.586] > Waiting for server log...
[09:48:41.620] > Waiting for server log...
[09:48:41.654] > Waiting for server log...
[09:48:41.689] > Waiting for server log...
[09:48:41.725] > Waiting for server log...
[09:48:41.760] > Waiting for server log...
[09:48:41.794] > Waiting for server log...
[09:48:41.829] > Waiting for server log...
[09:48:41.865] > Waiting for server log...
[09:48:41.900] > Waiting for server log...
[09:48:41.934] > Waiting for server log...
[09:48:41.969] > Waiting for server log...
[09:48:42.005] > Waiting for server log...
[09:48:42.040] > Waiting for server log...
[09:48:42.075] > Waiting for server log...
[09:48:42.111] > Waiting for server log...
[09:48:42.145] > Waiting for server log...
[09:48:42.181] > Waiting for server log...
[09:48:42.215] > Waiting for server log...
[09:48:42.250] > Waiting for server log...
[09:48:42.285] > Waiting for server log...
[09:48:42.321] > Waiting for server log...
[09:48:42.354] > Waiting for server log...
[09:48:42.389] > Waiting for server log...
[09:48:42.425] > Waiting for server log...
[09:48:42.459] > Waiting for server log...
[09:48:42.497] > Waiting for server log...
[09:48:42.529] > Waiting for server log...
[09:48:42.568] > Waiting for server log...
[09:48:42.603] > Waiting for server log...
[09:48:42.638] > Waiting for server log...
[09:48:42.674] > Waiting for server log...
[09:48:42.710] > Waiting for server log...
[09:48:42.745] > Waiting for server log...
[09:48:42.794] > Waiting for server log...
[09:48:42.829] > Waiting for server log...
[09:48:42.864] > Waiting for server log...
[09:48:42.899] > Waiting for server log...
[09:48:42.935] > Waiting for server log...
[09:48:42.971] > Waiting for server log...
[09:48:43.005] > Waiting for server log...
[09:48:43.039] > Waiting for server log...
[09:48:43.074] > Waiting for server log...
[09:48:43.109] > Waiting for server log...
[09:48:43.144] > Waiting for server log...
[09:48:43.178] > Waiting for server log...
[09:48:43.215] > Waiting for server log...
[09:48:43.249] > Waiting for server log...
[09:48:43.285] > Waiting for server log...
[09:48:43.321] > Waiting for server log...
[09:48:43.355] > Waiting for server log...
[09:48:43.391] > Waiting for server log...
[09:48:43.426] > Waiting for server log...
[09:48:43.461] > Waiting for server log...
[09:48:43.495] > Waiting for server log...
[09:48:43.529] > Waiting for server log...
[09:48:43.564] > Waiting for server log...
[09:48:43.599] > Waiting for server log...
[09:48:43.633] > Waiting for server log...
[09:48:43.669] > Waiting for server log...
[09:48:43.704] > Waiting for server log...
[09:48:43.739] > Waiting for server log...
[09:48:43.773] > Waiting for server log...
[09:48:43.810] > Waiting for server log...
[09:48:43.845] > Waiting for server log...
[09:48:43.881] > Waiting for server log...
[09:48:43.916] > Waiting for server log...
[09:48:43.952] > Waiting for server log...
[09:48:43.985] > Waiting for server log...
[09:48:44.020] > Waiting for server log...
[09:48:44.065] > Waiting for server log...
[09:48:44.091] > Waiting for server log...
[09:48:44.134] > Waiting for server log...
[09:48:44.161] > Waiting for server log...
[09:48:44.195] > Waiting for server log...
[09:48:44.229] > Waiting for server log...
[09:48:44.263] > Waiting for server log...
[09:48:44.299] > Waiting for server log...
[09:48:44.333] > Waiting for server log...
[09:48:44.368] > Waiting for server log...
[09:48:44.403] > Waiting for server log...
[09:48:44.438] > Waiting for server log...
[09:48:44.473] > Waiting for server log...
[09:48:44.507] > Waiting for server log...
[09:48:44.542] > Waiting for server log...
[09:48:44.577] > Waiting for server log...
[09:48:44.611] > Waiting for server log...
[09:48:44.645] > Waiting for server log...
[09:48:44.681] > Waiting for server log...
[09:48:44.715] > Waiting for server log...
[09:48:44.750] > Waiting for server log...
[09:48:44.786] > Waiting for server log...
[09:48:44.822] > Waiting for server log...
[09:48:44.856] > Waiting for server log...
[09:48:44.892] > Waiting for server log...
[09:48:44.926] > Waiting for server log...
[09:48:44.960] > Waiting for server log...
[09:48:44.995] > Waiting for server log...
[09:48:45.032] >  
> *
> * Reminder: You may only use this software with Visual Studio family products,
> * as described in the license (https://go.microsoft.com/fwlink/?linkid=2077057)
> *
>  
[09:48:45.039] > Server did not start successfully. Full server log at /afs/domain.tld/user/r/remoteuser/.vscode-server/.83bd43bc519d15e50c4272c6cf5c1479df196a4d.log >>>
[09:48:45.040] > <<< End of server log
> 7d6898de55f7: start
> exitCode==32==
> listeningOn====
> osReleaseId==centos==
> arch==x86_64==
> tmpDir==/run/user/132469==
> platform==linux==
> unpackResult====
> didLocalDownload==0==
> downloadTime====
> installTime====
> extInstallTime====
> serverStartTime==10981==
> 7d6898de55f7: end
[09:48:45.041] Received install output: 
exitCode==32==
listeningOn====
osReleaseId==centos==
arch==x86_64==
tmpDir==/run/user/132469==
platform==linux==
unpackResult====
didLocalDownload==0==
downloadTime====
installTime====
extInstallTime====
serverStartTime==10981==

[09:48:45.044] Terminating local server
[09:48:45.048] Resolver error: Error: The VS Code Server failed to start
    at Function.ServerInstallError (/home/user/.vscode/extensions/ms-vscode-remote.remote-ssh-0.65.8/out/extension.js:1:396975)
    at u (/home/user/.vscode/extensions/ms-vscode-remote.remote-ssh-0.65.8/out/extension.js:1:391298)
    at Object.t.handleInstallOutput (/home/user/.vscode/extensions/ms-vscode-remote.remote-ssh-0.65.8/out/extension.js:1:395717)
    at Object.e [as tryInstallWithLocalServer] (/home/user/.vscode/extensions/ms-vscode-remote.remote-ssh-0.65.8/out/extension.js:1:435292)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at async /home/user/.vscode/extensions/ms-vscode-remote.remote-ssh-0.65.8/out/extension.js:1:452665
    at async Object.t.withShowDetailsEvent (/home/user/.vscode/extensions/ms-vscode-remote.remote-ssh-0.65.8/out/extension.js:1:456460)
    at async /home/user/.vscode/extensions/ms-vscode-remote.remote-ssh-0.65.8/out/extension.js:1:433816
    at async C (/home/user/.vscode/extensions/ms-vscode-remote.remote-ssh-0.65.8/out/extension.js:1:430392)
    at async Object.t.resolveWithLocalServer (/home/user/.vscode/extensions/ms-vscode-remote.remote-ssh-0.65.8/out/extension.js:1:433431)
    at async Object.t.resolve (/home/user/.vscode/extensions/ms-vscode-remote.remote-ssh-0.65.8/out/extension.js:1:454065)
    at async /home/user/.vscode/extensions/ms-vscode-remote.remote-ssh-0.65.8/out/extension.js:1:526942
[09:48:45.063] ------

[09:48:45.064] Local server exit: 15

Steps to Reproduce:

  1. Connect to machine.domain.tld
  2. Get a window saying Could not establish connection to "machine.domain.tld": The VS Code Server failed to start.

Does this issue occur when you try this locally?: No Does this issue occur when you try this locally and all extensions are disabled?: --

This is annoying because it will happen totally randomly. Sometimes this will happen, sometimes it won't. I can click Retry or try to kill the VSCode server, but then it's random whether that will work or not. Sometimes it will need lots of attempts to get the connection working. The only thing that is guaranteed to work is to remove ~/.vscode-server, which is very annoying to do because it will take ages to reinstall.

Also, maybe worth mentioning, this are the logs when I try to kill the remote server:

[10:06:55.122] Picking SSH host
[10:06:56.414] Selected machine.domain.tld
[10:06:56.419] askpass server listening on /run/user/1000/vscode-ssh-askpass-e5b19763af1967a0b33aa1ad1341613bceb8c5dc.sock
[10:06:56.419] Spawning local server with {"serverId":2,"ipcHandlePath":"/run/user/1000/vscode-ssh-askpass-99f6b72bca8eb25b3323886b9f8218eabe3c6e72.sock","sshCommand":"ssh","sshArgs":["-v","-T","-o","ConnectTimeout=90","machine.domain.tld"],"dataFilePath":"/home/user/.config/Code/User/globalStorage/ms-vscode-remote.remote-ssh/vscode-ssh-host-47bf8c66-83bd43bc519d15e50c4272c6cf5c1479df196a4d-0.65.8/data.json"}
[10:06:56.420] Local server env: {"DISPLAY":":0","ELECTRON_RUN_AS_NODE":"1","SSH_ASKPASS":"/home/user/.vscode/extensions/ms-vscode-remote.remote-ssh-0.65.8/out/local-server/askpass.sh","VSCODE_SSH_ASKPASS_NODE":"/usr/share/code/code","VSCODE_SSH_ASKPASS_MAIN":"/home/user/.vscode/extensions/ms-vscode-remote.remote-ssh-0.65.8/out/askpass-main.js","VSCODE_SSH_ASKPASS_HANDLE":"/run/user/1000/vscode-ssh-askpass-e5b19763af1967a0b33aa1ad1341613bceb8c5dc.sock"}
[10:06:56.425] Spawned 76718
[10:06:56.502] > local-server-2> Spawned ssh, pid=76726
[10:06:56.503] stderr> OpenSSH_8.2p1 Ubuntu-4ubuntu0.3, OpenSSL 1.1.1f  31 Mar 2020
[10:06:56.543] stderr> debug1: Server host key: ecdsa-sha2-nistp256 SHA256:q+xzK9deJ9K3kVSpV0a/w6vUnLErqGEYAUB1OkxR+uk
[10:06:56.669] stderr> Authenticated to machine.domain.tld ([2001:1458:d00:12::4a5]:22).
[10:06:57.496] > ready: 3f98f282a372
[10:06:57.501] > Linux 3.10.0-1160.36.2.el7.x86_64 #1 SMP Wed Jul 21 11:57:15 UTC 2021
[10:06:57.502] Platform: linux
[10:06:57.510] > 3f98f282a372: running
[10:06:57.535] stderr> kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec]

Are they suggesting the kill command does not go through?

roblourens commented 3 years ago

You could try running this command manually to see whether it is always able to actually start, or produces some extra useful output.

> Starting server with command... /afs/domain.tld/user/r/remoteuser/.vscode-server/bin/83bd43bc519d15e50c4272c6cf5c1479df196a4d/server.sh --start-server --host=127.0.0.1 --enable-remote-auto-shutdown --port=0 &> "/afs/domain.tld/user/r/remoteuser/.vscode-server/.83bd43bc519d15e50c4272c6cf5c1479df196a4d.log" < /dev/null

renyhp commented 3 years ago

The command is extremely slow. After about 5 minutes, it gave this output:

*
* Visual Studio Code Server
*
* Reminder: You may only use this software with Visual Studio family products,
* as described in the license https://aka.ms/vscode-remote/license
*

Extension host agent listening on 35010

[10:36:27] Extension host agent started.

And that's when I started my client and it actually got connected.

Now, to be fair, this machine + filesystem has I/O speed that varies a lot (sometimes, even a command like ls can require several seconds to execute).

I will make now a wild guess and say that vscode is using a timeout to tell whether the server started successfully, and this does require some I/O operations. If that's the case, is it possible to disable the timeout?

munael commented 3 years ago

@roblourens

You could try running this command manually to see whether it is always able to actually start, or produces some extra useful output.

> Starting server with command... /afs/domain.tld/user/r/remoteuser/.vscode-server/bin/83bd43bc519d15e50c4272c6cf5c1479df196a4d/server.sh --start-server --host=127.0.0.1 --enable-remote-auto-shutdown --port=0 &> "/afs/domain.tld/user/r/remoteuser/.vscode-server/.83bd43bc519d15e50c4272c6cf5c1479df196a4d.log" < /dev/null

The equivalent of this from my logs keeps spinning endlessly when I try running it manually on the remote. The remote is not slow in any way I know of.

roblourens commented 3 years ago

Now, to be fair, this machine + filesystem has I/O speed that varies a lot (sometimes, even a command like ls can require several seconds to execute).

Wow, I can imagine that causing serious issues in starting the server.

@munael that command will write output to a logfile, not produce stdout. Are you looking at the log file? Or what do you see if you start without the redirection to the file?

renyhp commented 3 years ago

Now, to be fair, this machine + filesystem has I/O speed that varies a lot (sometimes, even a command like ls can require several seconds to execute).

Wow, I can imagine that causing serious issues in starting the server.

Is there anything that can be done to make it work? Even if it works slowly, I would be happy to just make it start and use VSCode as a remote text editor and terminal, rather than getting this error message.

renyhp commented 2 years ago

Any news about this? It looks like it's flagged as needs-more-info, is there any more info I can provide?

roblourens commented 2 years ago

@renyhp so when you are able to connect, it works well and is stable? Honestly I would assume that with what you said above, the connection would not be stable.

But if it works fine, maybe we can make the timeout configurable.

renyhp commented 2 years ago

No, in fact it is not always very stable. But at least I have something to work with.

roblourens commented 2 years ago

Given this

Now, to be fair, this machine + filesystem has I/O speed that varies a lot (sometimes, even a command like ls can require several seconds to execute).

and the server taking 5 minutes to start, I don't think there is much I can do to improve this situation, sorry.