I connect to the remote server with vs code command invoked by CTRL+SHIFT+P Remote-SSH: Connect to Host.... Everything works fine. After some time when I try to open a new file from the vs-code terminal with the code command, I will get this error message:
/some/path/on/remote$ code some_existing_file.py
Unable to connect to VS Code server: Error in request.
Error: connect ENOENT /run/user/1006/vscode-ipc-789269cc-6026-4d15-8ca6-<i_changed_this>.sock
at PipeConnectWrap.afterConnect [as oncomplete] (node:net:1161:16) {
errno: -2,
code: 'ENOENT',
syscall: 'connect',
address: '/run/user/1001/vscode-ipc-789269cc-6026-4d15-8ca6-<i_changed_this>.sock'
}
Killing all running vs-code processes manually "solves" the problem. The occurence of this problem seems to be random. Sometimes it happens 3 times within an hour, sometimes just once per day.
vs-code version: 1.66.0
Any suggestion on how to solve this issue?
I was having similar issue and error message when running code .
The solution worked for me was to remove everything under the HOME's .vscode-server directory
rm -rf ~/.vscode-server
Now do the code xxx command again should re-install the VS Code Server under the .vscode-server folder.
It's caused by the client connecting to an outdated socket. To simply solve this, just SSH into the server, and kill all processes for VS code:
ps -fu $USER | grep vscode | grep -v grep | awk '{print $2}' | xargs kill
Then you can restart VS code (with remote SSH) and try again.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With