vscode-remote-release icon indicating copy to clipboard operation
vscode-remote-release copied to clipboard

Configurable vscode server download path

Open lyquid617 opened this issue 1 year ago • 1 comments

Hello there, I tried connecting to a remote server, but got an out-of-space error. Check the log file, found that it tries to download the server to /tmp and / run out of space. After cleaning up the /, it works fine.

After searching I found there is remote.ssh:server install path which is default ~ to configure install path. I wonder if the download path can also be configured.

The related log snippet is as follows:

[12:14:10.122] [server] Downloading Visual Studio Code server -> /tmp/.tmpp40D4U/vscode-server-linux-legacy-x64.tar.gz
[12:14:10.122] [server] server download progress: 0/59538362 (0%)
[12:14:10.163] [server] server download progress: 2105344/59538362 (4%)
[12:14:10.183] [server] server download progress: 4210688/59538362 (7%)
[12:14:10.203] [server] server download progress: 6316032/59538362 (11%)
[12:14:10.220] [server] server download progress: 8421376/59538362 (14%)
[12:14:10.238] [server] server download progress: 10526720/59538362 (18%)
[12:14:10.259] [server] server download progress: 12632064/59538362 (21%)
[12:14:10.279] [server] server download progress: 14737408/59538362 (25%)
[12:14:10.345] [server] Error installing server: failed to download file: No space left on device (os error 28)

lyquid617 avatar Jun 19 '24 04:06 lyquid617

Hi, Was the issue solved?

prajzwal08 avatar Aug 14 '24 20:08 prajzwal08

The following worked for me (you will need root privileges).

  • sudo su
  • Delete the /tmp/ folder (rm -rf /tmp/)
  • create a new /tmp/ folder (mkdir /tmp/)
  • change the permission so that the folder is writeable by everyone (chmod 777 /tmp/)

ritwikmishra avatar Sep 06 '24 18:09 ritwikmishra

Hello there,

It also seems to download the extension at startup.

I need to specify the tmp folder, which is very helpful for hosts like NFS.

[10:23:45.370] [server] [10:23:45] Extension host agent started.
[10:23:45.377] [server] [10:23:45] Error occurred in server
[10:23:45.383] [server] [10:23:45] Error: listen ENOSPC: no space left on device /tmp/code-aed65e5c-e819-447e-8c50-d0fa9d3d26ed
[10:23:45.384] [server]     at Server.setupListenHandle [as _listen2] (node:net:1882:21)
[10:23:45.384] [server]     at listenInCluster (node:net:1961:12)
[10:23:45.384] [server]     at Server.listen (node:net:2080:5)
[10:23:45.385] [server]   errno: -28,

vzcrab avatar Nov 23 '24 02:11 vzcrab

Thank you for taking the time to open an issue. Could you please share your logs (> Remote-SSH: Show Log in the command palette) after reproducing the issue?

Does it help if you set the XDG_RUNTIME_DIR env variable on the remote? That's a standard variable used to indicate the temp directory.

joshspicer avatar Dec 13 '24 01:12 joshspicer

That said, to support unique configurations it seems logical to provide a setting. In this case the issue is not in the SSH extension, but in the VS Code Remote Server that is spawned

joshspicer avatar Dec 13 '24 01:12 joshspicer

This feature request is now a candidate for our backlog. The community has 60 days to upvote the issue. If it receives 10 upvotes we will move it to our backlog. If not, we will close it. To learn more about how we handle feature requests, please see our documentation.

Happy Coding!

We hope to configure the installation directory of vscode_server separately for each remote server, rather than using a user-wide configuration. This is because some servers have user home directories mounted via NFS3 to an HDFS directory, which causes errors when installing extensions and modifying the remote workspace configuration file settings.json (likely due to NFS3's lack of support for locking).

On the other hand, using NFS4 to mount a regular hard drive as the user home directory works without issues. Since the directory structures of different servers are inconsistent, we need to configure the server installation directory for each server to use a local directory on the server instead of an NFS-mounted path.

Of course, if the issues with NFS3 could be resolved, that would also be an acceptable solution.

lcoliny avatar Dec 13 '24 03:12 lcoliny

This feature request has not yet received the 10 community upvotes it takes to make to our backlog. 10 days to go. To learn more about how we handle feature requests, please see our documentation.

Happy Coding

:slightly_frowning_face: In the last 60 days, this feature request has received less than 10 community upvotes and we closed it. Still a big Thank You to you for taking the time to create this issue! To learn more about how we handle feature requests, please see our documentation.

Happy Coding!