sagemaker-ssh-helper icon indicating copy to clipboard operation
sagemaker-ssh-helper copied to clipboard

vscode connect fails

Open alon1samuel opened this issue 1 year ago • 3 comments

Trying to connect using vscode has failed since about a week ago, I'm managing to connect with SSH fine, but vscode itself fails.

Looks like a permissions error?

Getting a tar error which not sure how to fix:

[11:38:35.267] stderr> tar: code: Cannot change ownership to uid 1000, gid 1000: Operation not permitted
[11:38:35.267] stderr> tar: Exiting with failure status due to previous errors
[11:38:35.268] > ERROR: tar exited with non-0 exit code: 0

alon1samuel avatar Apr 15 '24 10:04 alon1samuel

Update: Checked and I've downgraded to Remote - SSH version to v0.109.0 Now it works!

Was previously on v0.110.1

alon1samuel avatar Apr 17 '24 09:04 alon1samuel

Hi, @alon1samuel , thanks for raising this issue with the upstream repository! I will try to understand if it's a bug or a feature.

ivan-khvostishkov avatar Apr 23 '24 16:04 ivan-khvostishkov

One of the users also reported that the following command might help when downgrading:

rm -rf ~/.vscode-server

ivan-khvostishkov avatar May 14 '24 19:05 ivan-khvostishkov

As it turns out, the problem occurs because SageMaker Studio has the home directory mounted on EFS and tar cannot change permissions:

root@sagemaker-data-science-ml-m5-large-c6af45d22b9c5a94bb29700daf4d:~/.vscode-server# tar xzvf vscode-cli-f1e16e1e6214d7c44d078b1f0607b2388f29d729.tar.gz 
code
tar: code: Cannot change ownership to uid 1000, gid 1000: Operation not permitted
tar: Exiting with failure status due to previous errors
root@sagemaker-data-science-ml-m5-large-c6af45d22b9c5a94bb29700daf4d:~/.vscode-server# df -h .
Filesystem         Size  Used Avail Use% Mounted on
127.0.0.1:/200060  8.0E   42G  8.0E   1% /root

@alon1samuel Thank you for testing to the solution:

https://github.com/microsoft/vscode-remote-release/issues/9792#issuecomment-2177312105

I also tried setting "Remote.SSH: Use Exec server" to false and it works. I think we can close this issue for now, since I'm adding this recommendation to the documentation.

ivan-khvostishkov avatar Jul 24 '24 15:07 ivan-khvostishkov