Reputation: 135
I looked at the similar questions to mine, and none of them seemed to fix my problem.
It returns a prompt that says Could not establish connection to "hostname": The VS Code Server failed to start.
When I use the command ssh pi@raspberrypi
and type in my password everything seems to work.
My Computer: Windows 11
Remote Computer: Raspbian OS
The server.sh
file seems to be broken, but I don't know what the file should look like:
#!/usr/bin/env sh
#
# Copyright (c) Microsoft Corporation. All rights reserved.
#
case "$1" in
--inspect*) INSPECT="$1"; shift;;
esac
ROOT="$(dirname "$0")"
"$ROOT/node" ${INSPECT:-} "$ROOT/out/server-main.js" --compatibility=1.63 "$@"
and this is the log file on the remote computer:
/home/pi/.vscode-server/bin/c3511e6c69bb39013c4a4b7b9566ec1ca73fc4d5/bin/code-server: 12: /home/pi/.vscode-server/bin/c3511e6c69bb39013c4a4b7b9566ec1ca73fc4d5/bin/code-server: /home/pi/.vscode-server/bin/c3511e6c69bb39013c4a4b7b9566ec1ca73fc4d5/node: not found
Upvotes: 1
Views: 20469
Reputation: 65
If you are trying to access a node in a cluster, for example, another issue, despite what have said, it's important to verify the space left in the disk. Verify with the command in bash df -h
. If the availability of the space is 0%, i.e., 100% of the disk if full, you could consider this possibility. In this case, any larger files could be deleted from the disk. For example:
Let's say you are logged with something like user_id@node01:~/some_folder
, and you type df -h
, and get something like:
Filesystem Size Used Avail Use% Mounted on
tmpfs 26G 5,1M 26G 1% /run
/dev/nxbe0n0p1 645G 573G 39G 94% /
Here, the /dev/nxbe0n0p1
is almost full. If in the column Use%
has 100%, you could face with the problem of Could not establish connection to "<host>"
.
So, just consider this possibility, if all the above do not solve your problem.
Some of the situations that can cause this type of issue are: no left space on the disk available for the user, misconfiguration of the ssh key, or misconfiguration of the .config
file.
Good luck!
🐍🔥
Upvotes: 0
Reputation: 1
If you tried above solutions, you can try this...
Possible Rootcause:
Conditions:
Solution:
Upvotes: 0
Reputation: 1
Has same issues, after upgrading to latest v1_86, tried everything I could find in stackoverflow, nothing worked.
I am using latest macOS (Sonoma) on an Intel-based macbook pro 16 (2019) and remote the server is ubuntu 22.04.
Looking at the log it seems that the connection is established successfully but then something fails.
Had to downgrade to previous version (1_85), as also @chrischma suggested. This worked!
Upvotes: 0
Reputation: 163
If none of the suggested ways work, try downgrading to this version of vsc: https://code.visualstudio.com/updates/v1_85
this was the only way i could make it work again.
good luck!
Upvotes: 0
Reputation: 136
You can find Remote-SSH: Uninstall VS Code Server from Host...
via the command palette (ctrl/cmd + shift + p).
And if you select or enter the host IP, the vscode installed on that server will be uninstalled.
Then, if you connect to the server again through vscode-ssh, vscode will work well. After several attempts, I also succeeded in connecting this way.
Upvotes: 2
Reputation: 176
Upvotes: 14