skip to Main Content

I’m using Visual Studio Code Insiders version 1.65.0-insider. Until 3 days ago, I was not having any problem connecting to the remote server at work from my work laptop through a VPN. I have my ssh config file and when I opened vscode (when connected to the VPN), I was asked for my password and it connected without problems.

However, from yesterday I have started getting an error stating Could not establish connection to idk4v: The VS Code Server failed to start. idk4v is the remote machine’s name that I gave in my ssh config file. I also get Waiting for server log… in the output continuously. I am pasting the output here from trying out just now. I have removed the non-essential parts for brevity:

[08:27:13.110] Log Level: 2
[08:27:13.113] [email protected]
[08:27:13.113] win32 x64
[08:27:13.114] SSH Resolver called for "ssh-remote+idk4v", attempt 1
[08:27:13.114] "remote.SSH.useLocalServer": false
[08:27:13.114] "remote.SSH.showLoginTerminal": false
[08:27:13.114] "remote.SSH.remotePlatform": {"idk4l":"linux","idk4v":"linux"}
[08:27:13.114] "remote.SSH.path": undefined
[08:27:13.115] "remote.SSH.configFile": undefined
[08:27:13.115] "remote.SSH.useFlock": true
[08:27:13.115] "remote.SSH.lockfilesInTmp": false
[08:27:13.115] "remote.SSH.localServerDownload": auto
[08:27:13.115] "remote.SSH.remoteServerListenOnSocket": false
[08:27:13.115] "remote.SSH.showLoginTerminal": false
[08:27:13.115] "remote.SSH.defaultExtensions": []
[08:27:13.115] "remote.SSH.loglevel": 2
[08:27:13.115] "remote.SSH.serverPickPortsFromRange": {}
[08:27:13.115] "remote.SSH.enableDynamicForwarding": true
[08:27:13.115] "remote.SSH.serverInstallPath": {}
[08:27:13.116] SSH Resolver called for host: idk4v
[08:27:13.116] Setting up SSH remote "idk4v"
[08:27:13.128] Using commit id "50089c3f92c17584a4aca179f51f220b56c22020" and quality "insider" for server
[08:27:13.130] Install and start server if needed
[08:27:13.132] Checking ssh with "ssh -V"
[08:27:13.159] > OpenSSH_for_Windo
[08:27:13.159] > ws_8.1p1, LibreSSL 3.0.2

[08:27:13.162] Running script with connection command: ssh -T -D 51608 idk4v bash
[08:27:13.163] Terminal shell path: C:windowsSystem32cmd.exe
[08:27:13.361] > ]0;C:windowsSystem32cmd.exe
[08:27:13.362] Got some output, clearing connection timeout
[08:27:17.073] >
> 
[08:27:24.396] Showing password prompt
[08:27:27.658] Got password response
[08:27:27.658] "install" wrote data to terminal: "********"
[08:27:27.677] > 
[08:27:28.215] > 796e33571197: running
[08:27:28.272] > Acquiring lock on /home/su0/.vscode-server-insiders/bin/50089c3f92c17584a4aca179f51f220b56c22020/vscode-remote-lock.su0.50089c3f92c17584a4aca179f51f220b56c22020
[08:27:28.296] > Found existing installation at /home/su0/.vscode-server-insiders/bin/50089c3f92c17584a4aca179f51f220b56c22020...
> Checking /home/su0/.vscode-server-insiders/.50089c3f92c17584a4aca179f51f220b56c22020.log and /home/su0/.vscode-server-insiders/.50089c3f92c17584a4aca179f51f220b56c22020.pid for a running server
[08:27:28.306] > Looking for server with pid: 294423
[08:27:28.413] > Starting server with command... /home/su0/.vscode-server-insiders/bin/50089c3f92c17584a4aca179f51f220b56c22020/server.sh --start-server --host=127.0.0.1 --enable-remote-auto-shutdown --port=0    &> "/home/su0/.vscode-server-insiders/.50089c3f92c17584a4aca179
> f51f220b56c22020.log" < /dev/null
> printenv:
[08:27:28.431] >     XDG_SESSION_ID=219
>     SELINUX_ROLE_REQUESTED=
>     SHELL=/bin/zsh
>     SSH_CLIENT=10.159.165.35 51610 22
>     SELINUX_USE_CURRENT_RANGE=
>     USER=su0
>     VSCODE_AGENT_FOLDER=/home/su0/.vscode-server-insiders
>     MAIL=/var/mail/su0
>     PATH=/usr/local/bin:/usr/bin
>     PWD=/home/su0
>     SELINUX_LEVEL_REQUESTED=
>     SHLVL=1
>     HOME=/home/su0
>     LOGNAME=su0
>     SSH_CONNECTION=10.159.165.35 51610 10.1.164.50 22    
>     XDG_RUNTIME_DIR=/run/user/46546
>     _=/usr/bin/printenv
> Spawned remote server: 6344
> Waiting for server log...
Waiting for server log...
[08:27:36.044] >  
> *
> * Reminder: You may only use this software with Visual Studio family products,
> * as described in the license (https://go.microsoft.com/fwlink/?linkid=2077057)
> *
> 
[08:27:36.055] > 
> Server did not start successfully. Full server log at /home/su0/.vscode-server-insiders/.50089c3f92c17584a4aca179f51f220b56c22020.log >>>
> server.sh is being replaced by 'bin/code-server-insiders'. Please migrate to the new command and adopt the following new default behaviors:
> * connection token is mandatory unless --without-connection-token is used
> * host defaults to `localhost`
> *
> * Visual Studio Code Server
> *
> * By using the software, you agree to
> * the Visual Studio Code Server License Terms (https://aka.ms/vscode-server-license) and
> * the Microsoft Privacy Statement (https://privacy.microsoft.com/en-US/privacystatement).
> *
> Do you accept the terms in the License Agreement?<<< End of server log
> 796e33571197: start
> exitCode==32==
> listeningOn====
> osReleaseId==centos==
> arch==x86_64==
> tmpDir==/run/user/46546==
> platform==linux==
> unpackResult====
> didLocalDownload==0==
> downloadTime====
> installTime====
> extInstallTime====
> serverStartTime==7623==
> 796e33571197: end
[08:27:36.055] Received install output: 
exitCode==32==
listeningOn====
osReleaseId==centos==
arch==x86_64==
tmpDir==/run/user/46546==
platform==linux==
unpackResult====
didLocalDownload==0==
downloadTime====
installTime====
extInstallTime====
serverStartTime==7623==

[08:27:36.056] Resolver error: Error: The VS Code Server failed to start
    at Function.ServerInstallError (c:Userssu0.vscode-insidersextensionsms-vscode-remote.remote-ssh-0.70.0outextension.js:1:430359)
    at u (c:Userssu0.vscode-insidersextensionsms-vscode-remote.remote-ssh-0.70.0outextension.js:1:424682)
    at Object.t.handleInstallOutput (c:Userssu0.vscode-insidersextensionsms-vscode-remote.remote-ssh-0.70.0outextension.js:1:429101)
    at Object.t.tryInstall (c:Userssu0.vscode-insidersextensionsms-vscode-remote.remote-ssh-0.70.0outextension.js:1:524212)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async c:Userssu0.vscode-insidersextensionsms-vscode-remote.remote-ssh-0.70.0outextension.js:1:487216
    at async Object.t.withShowDetailsEvent (c:Userssu0.vscode-insidersextensionsms-vscode-remote.remote-ssh-0.70.0outextension.js:1:490561)
    at async Object.t.resolve (c:Userssu0.vscode-insidersextensionsms-vscode-remote.remote-ssh-0.70.0outextension.js:1:488295)
    at async c:Userssu0.vscode-insidersextensionsms-vscode-remote.remote-ssh-0.70.0outextension.js:1:564197
[08:27:36.060] ------

[08:27:36.285] > 
[08:27:37.355] "install" terminal command done
[08:27:37.355] Install terminal quit with output: 

I tried this solution, where I both killed and uninstalled the VS Code Server on the host, deleted the ~/.vscode-server-insiders directory on the remote server, restarted VS Code, and tried to reconnect to the server. But I got the same error. I couldn’t find any other solution. Any help is appreciated.

2

Answers


  1. This is very much a hack and absolutely not a long term solution but as a quick work around.

    Find the server.sh path in the log you posted, open it in an editor, and add --accept-server-license-terms to the last line so it looks something like "$ROOT/node" ${INSPECT:-} "$ROOT/out/server-main.js" --compatibility=1.63 --accept-server-license-terms "$@". This will accept the terms automatically until this gets patched by MS.

    Login or Signup to reply.
  2. You could try installing this package on the server!

    sudo apt-get install libstdc++6:amd64
    

    or adding the path of the library
    If the libstdc++.so.6 library is in the location /usr/lib/i386-linux-gnu/libstdc++.so.6, you can add the following line to the end of the .bashrc file in your home directory

    export LD_LIBRARY_PATH=/usr/lib/i386-linux gnu:$LD_LIBRARY_PATH
    

    To edit the .bashrc file, you can run the following command in the terminal:

    nano ~/.bashrc
    

    Then, to apply the changes, you can run the following command:

    source ~/.bashrc
    

    Then,

    I resolved it in the following steps.

    **

    1. Access remote server.
    2. Remove or rename /home/{username}/.vscode-server/bin.
    3. Update Remote-SSH Extensión ( v0.101.2023032915 ) and reload
      Visual Studio Code
    4. Try SSH-Remote
      **

    .

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search