skydum

個人的な作業記録とか備忘録代わりのメモ

VSCodeのRemote Developmentで接続できなくなった

VSCodeのRemote Developmentで接続できなくなった

開発したコードの動作検証にUbuntu18.04を使っているハードウェアを使ってる。
時々上記のハードにVSCodeのRemote Developmentを使って接続していたが気付いたら接続できなくなっていたので、調査した。

同様の問題がAmazon Linux2でもVSCode1.86以上に上げるとRemote Developmentで接続できない問題が発生している。
解決策を先に書いておくとVSCode1.85.2にダウングレードすると解決する。

VSCode1.85.2のZIP形式のダウンロードリンク
https://update.code.visualstudio.com/1.85.2/win32-x64-archive/stable

他の形式はこっち
https://code.visualstudio.com/updates/v1_85
VSCodeのinsider preview版を入れても解決できるので、何らかの対応はされそう?

表示されるエラー

以下のエラーが怪しい。

Exec server process not found
[2024-02-08 12:56:20] error This machine does not meet Visual Studio Code Server's prerequisites, expected either...:   - find GLIBC >= v2.28.0 (but found v2.27.0 instead) for GNU environments
  - find /lib/ld-musl-aarch64.so.1, which is required to run the Visual Studio Code Server in musl environments

再度接続

もう一度接続するとVSCodeで以下のエラーが表示されるので、詳細をクリック。

Remote Development with Linux

Remote Developmentの利用要件がたくさん書かれている。
VSCode18.6からRemote Developmentの必要要件が変更されたらしい。
https://code.visualstudio.com/docs/remote/linux#_remote-host-container-wsl-linux-prerequisites

GitHub issue: Workaround for machines that do not have glibc >= 2.28 #203375

もう少し調べてみたらGitHubでissueを見つけた。
https://github.com/microsoft/vscode/issues/203375

問題を回避する

一旦VSCode 18.5にすれば解決するらしいので、ダウングレードする。

旧バージョンのダウンロード

以下のページの赤線の所をクリックすると旧バージョンのインストーラーがダウンロードできる。
https://code.visualstudio.com/updates/v1_85

他の形式のファイルをダウンロードしたい時

以下のURLにいくと他の形式でダウンロードする方法が記載されているので、自身で欲しいバージョン情報を埋めると良い。
以下の画像にはWindowsしか表示されていないがLinuxなども表の下の方に存在する。
https://code.visualstudio.com/docs/supporting/faq#_previous-release-versions

VSCode1.85.2のZIP形式のリンクは以下の様になる。
https://update.code.visualstudio.com/1.85.2/win32-x64-archive/stable

6bc53a02b7a8: running
Found existing installation at /home/ubuntu/.vscode-server...
Starting VS Code CLI... "/home/ubuntu/.vscode-server/code-05047486b6df5eb8d44b2ecd70ea3bdf775fd937" command-shell --cli-data-dir "/home/ubuntu/.vscode-server/cli" --on-port --parent-process-id 9733 &> "/home/ubuntu/.vscode-server/.cli.05047486b6df5eb8d44b2ecd70ea3bdf775fd937.log" < /dev/null
printenv:
    SSH_CONNECTION=115.163.87.133 51661 172.31.22.20 22
    LANG=C.UTF-8
    XDG_SESSION_ID=8
    USER=ubuntu
    PWD=/home/ubuntu
    HOME=/home/ubuntu
    SSH_CLIENT=115.163.87.133 51661 22
    MAIL=/var/mail/ubuntu
    SHELL=/bin/bash
    SHLVL=2
    VSCODE_AGENT_FOLDER=/home/ubuntu/.vscode-server
    LOGNAME=ubuntu
    DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
    XDG_RUNTIME_DIR=/run/user/1000
    PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
    _=/usr/bin/printenv
Removing old logfile at /home/ubuntu/.vscode-server/.cli.05047486b6df5eb8d44b2ecd70ea3bdf775fd937.log
Spawned remote CLI: 9753
Waiting for server log...
Waiting for server log...
Exec server process not found
[2024-02-08 12:56:20] error This machine does not meet Visual Studio Code Server's prerequisites, expected either...:   - find GLIBC >= v2.28.0 (but found v2.27.0 instead) for GNU environments
  - find /lib/ld-musl-aarch64.so.1, which is required to run the Visual Studio Code Server in musl environments
6bc53a02b7a8: start
SSH_AUTH_SOCK====
DISPLAY====
listeningOn====
osReleaseId==ubuntu==
arch==aarch64==
vscodeArch==arm64==
bitness==64==
tmpDir==/run/user/1000==
platform==linux==
unpackResult====
didLocalDownload==0==
downloadTime====
installTime====
serverStartTime==91==
execServerToken==0d226e97-da0f-45f9-b389-6c88a83e261e==
6bc53a02b7a8: end