microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
164.2k stars 29.29k forks source link

vscode server won't start: "Waiting for server log..." #203967

Closed juxeii closed 9 months ago

juxeii commented 9 months ago

Does this issue occur when all extensions are disabled?: Yes/No

Steps to Reproduce:

  1. Start vscode
  2. Observe log of remote SSH

I just restarted vscode after notification of a new version availability. This usually installs a remote server version. But this time, the server installation fails. Here is the log output of remote SSH:


[13:30:17.671] Using SSH config file "C:\Users\reiss\.ssh\config"
[13:30:17.672] Copying file to remote with "C:\Program Files\Git\usr\bin\scp.exe" -F "C:\Users\reiss\.ssh\config" "vscode-cli-05047486b6df5eb8d44b2ecd70ea3bdf775fd937.tar.gz" "vscode-cli-05047486b6df5eb8d44b2ecd70ea3bdf775fd937.tar.gz.done" "cplane_docker":"/var/fpwork/reiss/vscdata/server/cplane/.vscode-server"
[13:30:17.672] Using cwd: file:///c%3A/Users/reiss/AppData/Local/Temp/vscode_server_1706790617477
[13:30:17.672] Terminal shell path: C:\WINDOWS\System32\cmd.exe
[13:30:18.167] > vscode-cli-05047486b6df5eb8d44b2ecd70ea3bdf77   0%    0     0.0KB/s   --:-- ETA]0;C:\WINDOWS\System32\cmd.exe
[13:30:18.914] > vscode-cli-05047486b6df5eb8d44b2ecd70ea3bdf77 100% 8379KB  11.0MB/s   00:00    
[13:30:18.937] > 
> vscode-cli-05047486b6df5eb8d44b2ecd70ea3bdf77 100%    9     8.5KB/s   00:00    
[13:30:20.223] "Copy server to host" terminal command done
[13:30:20.295] > Found flag and server on host
[13:30:20.298] > af274c7fbd66%%2%%
> tar --version:
[13:30:20.299] > tar (GNU tar) 1.34
> Copyright (C) 2021 Free Software Foundation, Inc.
> License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
> This is free software: you are free to change and redistribute it.
> There is NO WARRANTY, to the extent permitted by law.
> 
> Written by John Gilmore and Jay Fenlason.
[13:30:20.720] > code 1.86.0 (commit 05047486b6df5eb8d44b2ecd70ea3bdf775fd937)
[13:30:20.724] > Running ssh connection command... /var/fpwork/reiss/vscdata/server/cplane/.vscode-server/code-05047486b6df5eb8d44b2ecd70ea3bdf775fd937 command-shell --cli-data-dir /var/fpwork/reiss/vscdata/server/cplane/.vscode-server/cli --on-port --require-token a53956730956 --parent-process-id 52357 &> "/var/fpwork/reiss/vscdata/server/cplane/.vscode-server/.cli.05047486b6df5eb8d44b2ecd70ea3bdf775fd937.log" < /dev/null
> printenv:
....

[13:30:20.743] > Spawned remote CLI: 52461
[13:30:20.753] > Waiting for server log...
[13:30:20.803] > Waiting for server log...
[13:30:20.845] > Waiting for server log...
[13:30:20.884] > Waiting for server log...
[13:30:20.924] > Waiting for server log...
[13:30:20.963] > Waiting for server log...
....

[13:30:34.931] > Waiting for server log...
[13:30:34.968] > Waiting for server log...
[13:30:35.010] > Waiting for server log...
[13:30:35.050] > Waiting for server log...
[13:30:35.085] > af274c7fbd66: start
> SSH_AUTH_SOCK====
> DISPLAY====
> listeningOn====
> osReleaseId==rhel==
> arch==x86_64==
> vscodeArch==x64==
> bitness==64==
> tmpDir==/tmp==
> platform==linux==
> unpackResult==success==
> didLocalDownload==1==
> downloadTime====
> installTime==404==
> serverStartTime==14348==
> execServerToken==a53956730956==
> af274c7fbd66: end
[13:30:35.085] Received install output: 
SSH_AUTH_SOCK====
DISPLAY====
listeningOn====
osReleaseId==rhel==
arch==x86_64==
vscodeArch==x64==
bitness==64==
tmpDir==/tmp==
platform==linux==
unpackResult==success==
didLocalDownload==1==
downloadTime====
installTime==404==
serverStartTime==14348==
execServerToken==a53956730956==

[13:30:35.086] Failed to parse remote port from server output
[13:30:35.086] Terminating local server
[13:30:35.087] Exec server for ssh-remote+cplane_docker failed: Error
[13:30:35.088] Error opening exec server for ssh-remote+cplane_docker: Error
[13:30:35.096] Local server exit: null

There are hundreds of Waiting for server log... traces, so it seems like the server is not answering in time. The vscode startup fails with

image

I never had problems with updating vscode. Anyone else has this issue?

EDIT: I already tried to completely remove the old server installation. It makes no difference. It downloads the latest server and fails with same error.

antony-frolov commented 9 months ago

same here

orgads commented 9 months ago

Looks like old distros are no longer supported. I have the same issue on Centos 7.

The log shows:

error This machine does not meet Visual Studio Code Server's prerequisites, expected either...:
  - find GLIBC >= v2.28.0 (but found v2.17.0 instead) for GNU environments
  - find /lib/ld-musl-x86_64.so.1, which is required to run the Visual Studio Code Server in musl environments
antony-frolov commented 9 months ago

i've got ubuntu 18.04

orgads commented 9 months ago

Ubuntu 18.04 has glibc 2.27.

Pixelao commented 9 months ago

On VS Code Version: 1.86.0

Have the same problems connecting on servers with Debian 9 and 8.

Warning: Missing GLIBCXX >= 3.4.25! from /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.22
Warning: Missing GLIBC >= 2.28! from /lib/x86_64-linux-gnu/libc-2.24.so
Error: Missing required dependencies. Please refer to our FAQ https://aka.ms/vscode-remote/faq/old-linux for additional$
pWoLiAn commented 9 months ago

switching to the pre-release version of the remote-ssh extension gives me this popup before failing image I'm using Ubuntu 18.04 EDIT: I'm able to bypass the issue by downgrading to 1.85.2

orgads commented 9 months ago

Apparently it is documented in the release notes: https://code.visualstudio.com/updates/v1_86#_linux-minimum-requirements-update

In this milestone, we have updated the toolchains to build our desktop client. From this release onwards, VS Code desktop is only compatible with Linux distributions based on glibc 2.28 or later, and glibcxx 3.4.25 or later, such as Debian 10, RHEL 8, or Ubuntu 20.04. If you are unable to upgrade your Linux distribution, the recommended alternative is to use our web client. If you would like to use the desktop version, then you can download the VS Code release 1.85. Depending on your platform, make sure to disable updates to stay on that version. A good recommendation is to set up the installation with Portable Mode.

But it looks like it refers to desktop, not remote development. @deepak1556?

pftbest commented 9 months ago

I have the same issue but on AARCH64 with Debian 11. My glibc is 2.36 which is new. The log file on remote machine is completely empty. I only get "Waiting for server log..." on the desktop.

Boddlnagg commented 9 months ago

I have the same issue connecting to SUSE Linux Enterprise Server 15 SP2 (which is still in extended support).

deepak1556 commented 9 months ago

We have updated the minimum requirements for remote server as well, it is documented in https://aka.ms/vscode-remote/faq/old-linux. It should also show up in link from the notification or the server failure logs. Affected users please follow the workaround mentioned in the faq.

@orgads I will update the release notes.

@pftbest can you provide a minimal devcontainer configuration to repro your issue.

giovannipollo commented 9 months ago

Having the same issue on Ubuntu 18.04. The only solution I found is not to updgrade, or if you upgraded just go back to an older version.

EDIT: thanks @deepak1556 for the information and the updated documentation

juxeii commented 9 months ago

As a side node: an update like this, which is "major" IMHO, should have a security mechanism involved. It could have checked the libc versions and refused the update. Now, many people are screwed in the middle of their work. A lot of room for improvement here...

thekendog commented 9 months ago

Yeah this has completely screwed me. I have a number of older servers and I can't get into any of them now. The only way is for me to downgrade and never update VS Code. Doesn't seem like a good solution.

joaomoreno commented 9 months ago

As a mitigation step, please go ahead and disable updates after installing 1.85.2:

Also, please provide as many details as possible, especially error messages or notifications or terminal output.

ms2008 commented 9 months ago

I think so many others still use old distros. And they may be physically unable to upgrade GLIBC >= v2.28 due to their provider's limitations. So, a version of statically linked binaries that runs on 2.28 or lower would be nice.

BenKesselring commented 9 months ago

Welp, just gonna add my name to the list. Can't remote into many of my work servers now, and the page linked above is down, so I guess it's back to vim for awhile.

A change this breaking really should've been a major version iteration with a confirmation required before upgrading, in my opinion.

GammaGames commented 9 months ago

Breaking an entire workflow on an os that's still supported with security updates for the next 4 years was definitely a choice

Edit: to downgrade with apt, you can run sudo apt-get install code=1.85.2*
Edit2: and then hold the version with sudo apt-mark hold code

mSALDANHAf commented 9 months ago

image image Seriously?

WinCPP commented 9 months ago

@deepak1556 are there any steps to revert back to previous version of remote ssh? I am unable to use any of my machines and there is no plan soon to move to higher versions required by vscode.

BenKesselring commented 9 months ago

@deepak1556 are there any steps to revert back to previous version of remote ssh? I am unable to use any of my machines and there is no plan soon to move to higher versions required by vscode.

  1. Downgrade local VS Code to 1.85.2
  2. Disable updates
  3. ssh into the remote server and delete ~/.vscode-server
  4. Remote into server from VS Code as usual
mdefende commented 9 months ago

I am trying to downgrade the CLI specifically on a remote machine running RHEL 7. I have tried downloading the CLI tool from the following address:

https://update.code.visualstudio.com/1.85.2/cli-linux-x64/stable

When I run code after unpacking it, it is still looking for the updated GLIBC versions:

[mdefende@c0202 Downloads]$ ./code
./code: /lib64/libc.so.6: version `GLIBC_2.29' not found (required by ./code)
./code: /lib64/libc.so.6: version `GLIBC_2.28' not found (required by ./code)
./code: /lib64/libc.so.6: version `GLIBC_2.25' not found (required by ./code)
./code: /lib64/libc.so.6: version `GLIBC_2.18' not found (required by ./code)
./code: /lib64/libc.so.6: version `GLIBC_2.27' not found (required by ./code)

I do notice whenever I change the version number, the downloaded file is always named vscode_cli_linux_x64_cli.tar.gz whereas distinct versions of the full VSCode have some distinct tag on their tarballs. For instance, Code 1.85.2 available at https://update.code.visualstudio.com/1.85.2/linux-x64/stable is named code-stable-x64-1705560028.tar.gz whereas 1.85.1 is named code-stable-x64-1702460840.tar.gz. Are all of the CLI links accessing the same 1.86.0 file? I can't check the version or the help of the CLI binary because of the GLIBC errors

EDIT: I tested on an updated Linux distribution and the CLI download links are pointing to the correct versions. However, CLI version 1.85.2 and below (to what I've tested) are still erroring out when they don't find the new GLIBC versions. I don't know what else to try at this point.

mayorhao commented 9 months ago

I don't understand, why this update so aggresive, totally break up my working pipeline.

pftbest commented 9 months ago

@deepak1556 I don't have any docker or container, just normal Debian 11 arm install.

here is the log from vscode waiting_log.txt it says full log is at /home/user/.vscode-server/.05047486b6df5eb8d44b2ecd70ea3bdf775fd937.log but this file is 0 bytes long

user@debian:~$ ls -al /home/user/.vscode-server/.05047486b6df5eb8d44b2ecd70ea3bdf775fd937.log
-rw-r--r-- 1 user user 0 Feb  2 00:05 /home/user/.vscode-server/.05047486b6df5eb8d44b2ecd70ea3bdf775fd937.log

I also tried running the bundled "node" binary manually and it works fine

user@debian:~$ .vscode-server/bin/05047486b6df5eb8d44b2ecd70ea3bdf775fd937/node --version
v18.17.1
user@debian:~$
pftbest commented 9 months ago

@deepak1556 I think I found the reason, script check-requirements.sh is failing because I have both versions of libc.6 in my system and it gets confused about it. It tries to grep for AArch64, but both versions are marked as AArch64

+ /sbin/ldconfig -p
+ grep libc.so.6
+ libc_paths=   libc.so.6 (libc6,AArch64) => /lib/aarch64-linux-gnu/libc.so.6
        libc.so.6 (libc6,AArch64) => /lib/x86_64-linux-gnu/libc.so.6
+ echo  libc.so.6 (libc6,AArch64) => /lib/aarch64-linux-gnu/libc.so.6
        libc.so.6 (libc6,AArch64) => /lib/x86_64-linux-gnu/libc.so.6+ 
wc -l
+ [ 2 -gt 1 ]
+ echo  libc.so.6 (libc6,AArch64) => /lib/aarch64-linux-gnu/libc.so.6
        libc.so.6 (libc6,AArch64) => /lib/x86_64-linux-gnu/libc.so.6
+ grep AArch64
+ awk {print $NF}
gooker commented 9 months ago

Are you serious to centos7?

In this milestone, we have updated the toolchains to build our desktop client. From this release onwards, VS Code desktop is only compatible with Linux distributions based on glibc 2.28 or later, and glibcxx 3.4.25 or later, such as Debian 10, RHEL 8, or Ubuntu 20.04.

darlenegail1218 commented 9 months ago

Is there a better explanation for this decision? This completely screwed me over today. Seriously thought I was crazy.

hbprotoss commented 9 months ago

Is there a better explanation for this decision? This completely screwed me over today.

and even no warning before upgrade

valium123 commented 9 months ago

I am unable to SSH connect to the server using VSCode on Windows. Can someone help me? I have already downgraded the plugin.

ms2008 commented 9 months ago

@valium123 It's the vscode you need to downgrade, not the plugin. And disable automatic updates, the download for the old version is provided here https://github.com/microsoft/vscode/issues/203967#issuecomment-1921540242

valium123 commented 9 months ago

@valium123 It's the vscode you need to downgrade, not the plugin. And disable automatic updates, the download for the old version is provided here #203967 (comment)

Thank you very much. I can work normally now.

polarispw commented 9 months ago

What a smart ass to make a decision like that!

junkai2998 commented 9 months ago

how to downgrad in macos ? i got two versions installed instead and i have to install the extensions again (apparently it's not downgrade)

btw, i (perhaps many of us) cannot just simply ask our server admins to upgrade their related libs. so i urge that the vsc development team to consider a workaround.

ZhanZiyuan commented 9 months ago

I have the same issue trying to connect with CentOS 7.7.1908 whose glibc version is 2.17. While just being stopped supporting by Red Hat, it's not a wise choice to end its support for running VS Code server on this so widely installed Linux distribution. This has caused a huge impact on my workflow. Snipaste_2024-02-02_09-42-26

melspectrum commented 9 months ago

same here. please have a quick hotfix. a lot of centos 7 users around

seryte commented 9 months ago

+1

yakouyang commented 9 months ago

how to downgrad in macos ? i got two versions installed instead and i have to install the extensions again (apparently it's not downgrade)

btw, i (perhaps many of us) cannot just simply ask our server admins to upgrade their related libs. so i urge that the vsc development team to consider a workaround.

  1. Get the 1.85.2 version of Visual Studio Code from this link: https://update.code.visualstudio.com/1.85.2/darwin-arm64/stable
  2. Unzip the .zip file and drag the application to the "Applications" folder to replace the existing version
  3. In the settings, search for "update" and change the mode from "default" to "none" to disable auto-upgrades. Then, install the "Remote-SSH" plugin and restart the application. If the restart has already updated to version 1.86, please repeat step 2. As the settings will not be auto-updated.
iarno commented 9 months ago

+1

Tendo33 commented 9 months ago

exactly!!!

junkai2998 commented 9 months ago

same here. please have a quick hotfix. a lot of centos 7 users around

so apparently the "hot fix" is to ask the server admins to upgrade their libs (which is really hard for them) the recommendations are always "Qu'ils mangent de la brioche"or "何不食肉糜"

junkai2998 commented 9 months ago

how to downgrad in macos ? i got two versions installed instead and i have to install the extensions again (apparently it's not downgrade) btw, i (perhaps many of us) cannot just simply ask our server admins to upgrade their related libs. so i urge that the vsc development team to consider a workaround.

  1. Get the 1.85.2 version of Visual Studio Code from this link: https://update.code.visualstudio.com/1.85.2/darwin-arm64/stable
  2. Unzip the .zip file and drag the application to the "Applications" folder to replace the existing version
  3. In the settings, search for "update" and change the mode from "default" to "none" to disable auto-upgrades. Then, install the "Remote-SSH" plugin and restart the application. If the restart has already updated to version 1.86, please repeat step 2. As the settings will not be auto-updated.

it worked. luckily i dont have much of the extensions installed (just have to reset some minor UI settings). developers, pls consider an option to downgrade !

m00ncheese commented 9 months ago

I've used this trick before attach and it helped https://github.com/microsoft/vscode/issues/203728

In bash shell, touch /tmp/vscode-skip-server-requirements-check Now from latest insiders, run Attach to running container and chose the above container Server setup will fail but make sure the logs contain the following statements !!! WARNING: Skipping server pre-requisite check !!! !!! Server stability is not guaranteed. Proceed at your own risk. !!!

But I do not understand what is wrong with my distro, Ububtu 11 it has "Debian GLIBC 2.31-13+deb11u7"

anda522 commented 9 months ago

Yesterday I used the remotessh at about 9:00am, and it's good. Today I try to connect the remotessh, it occurs the error:

Server did not start successfully. Full server log at /home/wyq/.vscode-server/.05047486b6df5eb8d44b2ecd70ea3bdf775fd937.log >>> Warning: Missing GLIBC >= 2.28! from /lib/x86_64-linux-gnu/libc-2.27.so [09:49:31.078] > Error: Missing required dependencies. Please refer to our FAQ https://aka.ms/vscode-remote/faq/old-linux for additional information.

My ubuntu version is (gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0, GNU ld (GNU Binutils for Ubuntu) 2.30 My solution is https://github.com/microsoft/vscode/issues/203967#issuecomment-1921540242 , I disable the auto update in the setting and downgrade the remote-ssh version, finnally my problem is solved.

ZhanZiyuan commented 9 months ago

I'm trying to reinstall VS Code (on the local machine first, then on the remote host) with an earlier release and block its auto update.

  1. Check the commit ID of Visual Studio Code

    Enter the following command in PowerShell or Command Prompt:

    code -v

    Or you can also find the commit ID by copying the contents in VS Code - Help - About.

  2. The direct download link of Visual Studio Code Server (sample)

    Please replace ${commit_id} with a specific commit ID.

    https://vscode.cdn.azure.cn/stable/${commit_id}/vscode-server-linux-x64.tar.gz

    If the link above doesn't work, try the following:

    https://update.code.visualstudio.com/commit:${commit_id}/server-linux-x64/stable
  3. Download Visual Studio Code Server using Wget

    For more detail, please refer to: The Visual Studio Code Server and Cannot download VS Code Remote Development via SSH when proxy is needed #78

    wget -O- https://aka.ms/install-vscode-server/setup.sh | sh
PappeSister commented 9 months ago

I also encountered the same problem, and it has now been resolved. Here is my solution for your reference:

  1. Install version 1.85.2 of vscode.
  2. Disable updates.
  3. Downgrade the remote-ssh version to 0.107. Now it works normally.
junkai2998 commented 9 months ago

how to downgrad in macos ? i got two versions installed instead and i have to install the extensions again (apparently it's not downgrade) btw, i (perhaps many of us) cannot just simply ask our server admins to upgrade their related libs. so i urge that the vsc development team to consider a workaround.

  1. Get the 1.85.2 version of Visual Studio Code from this link: https://update.code.visualstudio.com/1.85.2/darwin-arm64/stable
  2. Unzip the .zip file and drag the application to the "Applications" folder to replace the existing version
  3. In the settings, search for "update" and change the mode from "default" to "none" to disable auto-upgrades. Then, install the "Remote-SSH" plugin and restart the application. If the restart has already updated to version 1.86, please repeat step 2. As the settings will not be auto-updated.

it worked. luckily i dont have much of the extensions installed (just have to reset some minor UI settings). developers, pls consider an option to downgrade !

holly sh*t. i need to do it all over again

melspectrum commented 9 months ago

I found it is better to use the portable mode portable as you can still keep the 1.86.0 version for newer servers but only use the portable one for centos7

Hua-jiu commented 9 months ago

same here, but my GLIBC version is 2.31. It seems this problem is not just about it. I have wasted all of my morning ! ! QAQ

m00ncheese commented 9 months ago

once again:

try to disable requirements check in bash of container touch /tmp/vscode-skip-server-requirements-check then attach

it works for me

https://github.com/microsoft/vscode/issues/203728

In bash shell, touch /tmp/vscode-skip-server-requirements-check Now from latest insiders, run Attach to running container and chose the above container Server setup will fail but make sure the logs contain the following statements !!! WARNING: Skipping server pre-requisite check !!! !!! Server stability is not guaranteed. Proceed at your own risk. !!!

PappeSister commented 9 months ago

I also encountered the same problem, and it has now been resolved. Here is my solution for your reference:

  1. Install version 1.85.2 of vscode.
  2. Disable updates.
  3. Downgrade the remote-ssh version to 0.107. Now it works normally.

In the second step, the system will ask for a reboot, do not reboot at this time, wait until all 3 steps are completed and then reboot!

owesomething commented 9 months ago

same to me, my remote system is debian9 , glibc version is 2.24