I have two Linux servers (raspberry pi bullseye fully up to date) on my LAN, one is a backup server, the other is for development. Their setup is broadly similar.
I’m running VS Code (Version: 1.77.0) on Windows 10 and accessing those servers via SSH. I am not using a proxy or Docker.
Four days ago, both servers were working fine with VS Code. When I closed down, I saw that an update to VS Code would be installed next time I started.
The next day, I found that VS Code works as usual on the backup server, but fails as follows when trying to access the development server.
After many repetitions of ‘> Waiting for server log…’ it gives the following stack trace:
[00:20:27.191] Resolver error: Error: The VS Code Server failed to start
at m.ServerInstallError (c:UsersRoy.vscodeextensionsms-vscode-remote.remote-ssh-0.98.0outextension.js:1:584322)
at f (c:UsersRoy.vscodeextensionsms-vscode-remote.remote-ssh-0.98.0outextension.js:1:578379)
at t.handleInstallOutput (c:UsersRoy.vscodeextensionsms-vscode-remote.remote-ssh-0.98.0outextension.js:1:581404)
at t.tryInstall (c:UsersRoy.vscodeextensionsms-vscode-remote.remote-ssh-0.98.0outextension.js:1:681793)
at async c:UsersRoy.vscodeextensionsms-vscode-remote.remote-ssh-0.98.0outextension.js:1:644041
at async t.withShowDetailsEvent (c:UsersRoy.vscodeextensionsms-vscode-remote.remote-ssh-0.98.0outextension.js:1:647359)
at async t.resolve (c:UsersRoy.vscodeextensionsms-vscode-remote.remote-ssh-0.98.0outextension.js:1:645091)
at async c:UsersRoy.vscodeextensionsms-vscode-remote.remote-ssh-0.98.0outextension.js:1:720839
[00:20:27.194] ------
[00:20:27.419] >
[00:20:28.481] "install" terminal command done
[00:20:28.481] Install terminal quit with output:
There is no output after that last line.
I can access both servers from Windows with PuTTY and WinSCP.
After searching I tried the following suggestions that I’ve found online (mostly here), but none worked:
-
Deleted .vscode-server directory in my Linux /home/me directory.
retried, it regenerated .vscode-server directory and contents but failed as above -
In VSC opened command palette
Selected "Remote-SSH: kill VS Code Server on Host…"
Selected the host that VS Code can’t connect to.
Restarted VS Code and tried to reconnect.
Failed as above -
Checked disk space. There is plenty available
-
Checked VS Code extensions – none are flagged as needing update. Anyway as I can access one of the servers with the same Windows installation of VS Code, I don’t think this can be the problem. Nevertheless I uninstalled Remote – SSH and Remote – SSH: Editing and re-installed them.
Failed as above -
Deleted the line for the ip address of problem server in C:UsersRoy.sshknown_hosts
Then repeated the steps in 2. above. Failed as above.
Checked that the entry in C:UsersRoy.sshknown_hosts had been regenerated – it had. -
Added another ip address for the server, tried to access through that. I wasn’t optimistic, and it failed as above.
-
Uninstalled and re-installed ssh:
sudo service ssh stop
sudo apt-get --purge remove openssh-client openssh-server
sudo apt autoremove
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install openssh-server
sudo service ssh status
Failed as above.
I’m stuck on this. Four days ago everything was running as normal, then a VS Code update (apparently) caused this problem, but only on one of the servers.
Any help greatly appreciated.
2
Answers
I think you’re having the same issue as me, but it’s actually caused by an update to the pi. VS Code is reading the
uname -m
value, the machine hardware name, which is returningaarch64
, and so it is trying to run the 64 bit version of the remote server. In reality, your pi is likely using anarmv7l
(32 bit) user space. Remove the VS Code remote server currently on the pi, then addarm_64bit=0
to /boot/config.txt and restart. Ifuname -m
returnsarmv7l
, then VS Code should work again.After that arm_64bit=0 change in /boot/config.txt and restart, you may need to run the command "Kill VS Code Server on Host" in VS Code for the Raspi. These steps fixed the same issue for me.