Home > Blockchain >  Unable to connect to vscode server, scp: No such file or directory
Unable to connect to vscode server, scp: No such file or directory

Time:04-07

Problem

I have a server (a shared HPC) I used to be able to connect to which I am not longer able to connect to.

Based on logs I suspect SCP may be an issue, but I am not sure as it works on my machine for other files (scp'd to the same server)

Steps taken to try to resolve the issue

  • Downgrade the Remote SSH extension to v0.70.0
  • Completely uninstall and re-install vscode on my local machine

Additional Relevant details

  • Personal Machine: MacOS Monterey Version 12.2.1

  • Logs from SSH:

[20:22:32.630] Log Level: 2
[20:22:32.632] [email protected]
[20:22:32.632] darwin x64
[20:22:32.633] SSH Resolver called for "ssh-remote txe1-login.mit.edu", attempt 1
[20:22:32.633] "remote.SSH.useLocalServer": true
[20:22:32.633] "remote.SSH.path": undefined
[20:22:32.633] "remote.SSH.configFile": undefined
[20:22:32.633] "remote.SSH.useFlock": false
[20:22:32.634] "remote.SSH.lockfilesInTmp": true
[20:22:32.634] "remote.SSH.localServerDownload": always
[20:22:32.634] "remote.SSH.remoteServerListenOnSocket": false
[20:22:32.634] "remote.SSH.showLoginTerminal": false
[20:22:32.634] "remote.SSH.defaultExtensions": []
[20:22:32.634] "remote.SSH.loglevel": 2
[20:22:32.634] "remote.SSH.serverPickPortsFromRange": {}
[20:22:32.634] "remote.SSH.enableDynamicForwarding": true
[20:22:32.634] "remote.SSH.serverInstallPath": {}
[20:22:32.635] SSH Resolver called for host: txe1-login.mit.edu
[20:22:32.635] Setting up SSH remote "txe1-login.mit.edu"
[20:22:32.637] Acquiring local install lock: /var/folders/bg/wpb6hx715v1dqhv8nbpkxnqr0000gn/T/vscode-remote-ssh-48102e81-install.lock
[20:22:32.644] Looking for existing server data file at /Users/[myusername]/Library/Application Support/Code/User/globalStorage/ms-vscode-remote.remote-ssh/vscode-ssh-host-48102e81-e18005f0f1b33c29e81d732535d8c0e47cafb0b5-0.70.0/data.json
[20:22:32.644] Using commit id "e18005f0f1b33c29e81d732535d8c0e47cafb0b5" and quality "stable" for server
[20:22:32.647] Install and start server if needed
[20:22:32.650] PATH: /Users/[myusername]/google-cloud-sdk/bin:/Users/[myusername]/opt/anaconda3/bin:/Users/[myusername]/opt/anaconda3/condabin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin
[20:22:32.650] Checking ssh with "ssh -V"
[20:22:32.654] > OpenSSH_8.6p1, LibreSSL 2.8.3

[20:22:32.657] askpass server listening on /var/folders/bg/wpb6hx715v1dqhv8nbpkxnqr0000gn/T/vscode-ssh-askpass-143aa801cfb87a7ae46b6931d862427a71ee5bf4.sock
[20:22:32.658] Spawning local server with {"serverId":1,"ipcHandlePath":"/var/folders/bg/wpb6hx715v1dqhv8nbpkxnqr0000gn/T/vscode-ssh-askpass-42dcd813b15541eba041d85f50bcec4b9ebc23e8.sock","sshCommand":"ssh","sshArgs":["-v","-T","-D","52336","-o","ConnectTimeout=15","txe1-login.mit.edu"],"dataFilePath":"/Users/[myusername]/Library/Application Support/Code/User/globalStorage/ms-vscode-remote.remote-ssh/vscode-ssh-host-48102e81-e18005f0f1b33c29e81d732535d8c0e47cafb0b5-0.70.0/data.json"}
[20:22:32.658] Local server env: {"DISPLAY":"1","ELECTRON_RUN_AS_NODE":"1","SSH_ASKPASS":"/Users/[myusername]/.vscode/extensions/ms-vscode-remote.remote-ssh-0.70.0/out/local-server/askpass.sh","VSCODE_SSH_ASKPASS_NODE":"/private/var/folders/bg/wpb6hx715v1dqhv8nbpkxnqr0000gn/T/AppTranslocation/1F539C8F-4725-4DB9-9CBB-33B66762EAAB/d/Visual Studio Code.app/Contents/MacOS/Electron","VSCODE_SSH_ASKPASS_EXTRA_ARGS":"--ms-enable-electron-run-as-node","VSCODE_SSH_ASKPASS_MAIN":"/Users/[myusername]/.vscode/extensions/ms-vscode-remote.remote-ssh-0.70.0/out/askpass-main.js","VSCODE_SSH_ASKPASS_HANDLE":"/var/folders/bg/wpb6hx715v1dqhv8nbpkxnqr0000gn/T/vscode-ssh-askpass-143aa801cfb87a7ae46b6931d862427a71ee5bf4.sock"}
[20:22:32.659] Spawned 78124
[20:22:32.773] > local-server-1> Spawned ssh, pid=78129
[20:22:32.776] stderr> OpenSSH_8.6p1, LibreSSL 2.8.3
[20:22:32.948] stderr> Authenticated to txe1-login.mit.edu ([18.13.47.12]:22).
[20:22:33.492] > ready: 6cd5e7129adc
[20:22:33.507] > Linux 4.14.269-llgrid-10ms #1 SMP Tue Mar 8 05:03:58 EST 2022
[20:22:33.507] Platform: linux
[20:22:33.539] > 6cd5e7129adc: running
[20:22:33.573] > Acquiring lock on /run/user/60910/vscode-remote-lock.[myusername].e18005f0f1b33c29e81d732535d8c0e47cafb0b5
[20:22:33.575] > \ln /run/user/60910/vscode-remote-lock.[myusername].e18005f0f1b33c29e81d732535d8c0e47cafb0b5.target /run/user/60910/vscode-remote-lock.[myusername].e18005f0f1b33c29e81d732535d8c0e47cafb0b5
[20:22:33.577] > Installing to /home/gridsan/[myusername]/.vscode-server/bin/e18005f0f1b33c29e81d732535d8c0e47cafb0b5...
[20:22:33.578] > Trigger local server download
> 6cd5e7129adc:trigger_server_download
> platform==linux==
> vscodeArch==x64==
> destFolder==/home/gridsan/[myusername]/.vscode-server/bin/==
> destFolder2==e18005f0f1b33c29e81d732535d8c0e47cafb0b5==
> 6cd5e7129adc:trigger_server_download_end
> Waiting for client to transfer server archive...
> Waiting for /home/gridsan/[myusername]/.vscode-server/bin/e18005f0f1b33c29e81d732535d8c0e47cafb0b5/vscode-scp-done.flag and vscode-server.tar.gz to exist
[20:22:33.578] Got request to download on client for {"platform":"linux","arch":"x64","destFolder":"/home/gridsan/[myusername]/.vscode-server/bin/e18005f0f1b33c29e81d732535d8c0e47cafb0b5"}
[20:22:33.578] Downloading VS Code server locally...
[20:22:40.974] Downloaded VS Code server to /var/folders/bg/wpb6hx715v1dqhv8nbpkxnqr0000gn/T/9bc721a7-c59f-4e47-8b6b-1ab7a6b5924b
[20:22:40.975] Renamed VS Code server to /var/folders/bg/wpb6hx715v1dqhv8nbpkxnqr0000gn/T/vscode_server_1649031760974/vscode-server.tar.gz
[20:22:40.978] PATH: /Users/[myusername]/google-cloud-sdk/bin:/Users/[myusername]/opt/anaconda3/bin:/Users/[myusername]/opt/anaconda3/condabin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin
[20:22:40.979] Checking ssh with "ssh -V"
[20:22:40.984] > OpenSSH_8.6p1, LibreSSL 2.8.3

[20:22:40.985] Testing scp with "scp"
[20:22:40.994] scp exited with code: 1
[20:22:40.994] Got stderr from scp: usage: scp [-346ABCpqrTv] [-c cipher] [-F ssh_config] [-i identity_file]
            [-J destination] [-l limit] [-o ssh_option] [-P port]
            [-S program] source ... target
[20:22:40.995] Copying file to remote with scp -o ConnectTimeout=15 'vscode-server.tar.gz' 'vscode-scp-done.flag' 'txe1-login.mit.edu':'/home/gridsan/[myusername]/.vscode-server/bin/e18005f0f1b33c29e81d732535d8c0e47cafb0b5'
[20:22:40.995] Using cwd: file:///var/folders/bg/wpb6hx715v1dqhv8nbpkxnqr0000gn/T/vscode_server_1649031760974
[20:22:41.380] > /bin/sh: scp: No such file or directory
[20:22:41.628] "Copy server to host" terminal command done
  • Relevant settings in vs-code
"remote.SSH.useFlock": false,
"remote.SSH.localServerDownload": "always",
"remote.SSH.lockfilesInTmp": true,

CodePudding user response:

Resolved:

  • Manually copied vs-code server file to server using command details from
scp -o ConnectTimeout=15 'vscode-server.tar.gz' 'vscode-scp-done.flag' 'txe1-login.mit.edu':'/home/gridsan/[myusername]/.vscode-server/bin/e18005f0f1b33c29e81d732535d8c0e47cafb0b5'
[20:22:40.995] Using cwd: file:///var/folders/bg/wpb6hx715v1dqhv8nbpkxnqr0000gn/T/vscode_server_1649031760974
  • Upgraded Remote-SSH extension back to most current version

Took two attempts to work. If anyone knows what the issue was I would be grateful for your help so i can be sure it does not happen again!

  • Related