vscode-remote-release icon indicating copy to clipboard operation
vscode-remote-release copied to clipboard

Fail to attach docker container /lib64/libc.so.6: version `GLIBC_2.28' not found

Open Liuz233 opened this issue 2 years ago • 15 comments

Just now I tried to connect to docker using the remote-container plugin for vscode. i found that it could not connect and reported an error, however I was still able to connect normally in the morning, why is this? Here is the error message image

Liuz233 avatar Apr 08 '24 07:04 Liuz233

Also I noticed that the file /lib64/libc.so.6 is not even present inside my ubuntu docker, how was I using it properly before?

Liuz233 avatar Apr 08 '24 07:04 Liuz233

I am affected too (#9753) with a container based on centos7

GhislainC avatar Apr 08 '24 08:04 GhislainC

@GhislainC Is this a vscode version issue?1.88 seems to have been updated a few days ago, but I was able to use it fine this morning. However I seem to have re-downloaded the vscode server side on the server this afternoon when connecting to the server with vscode. After this I then had this problem when connecting to the container from the server using the plugin for vscode. I suspect that the vscode server side was updated on the server at this point.

Liuz233 avatar Apr 08 '24 08:04 Liuz233

I am impacted since VSCode self updated friday to 1.88. I am now using portable version 1.87.2 to be able to work (with the 1.87.2 VSC server). I agree with you, this seems to be an issue around vscode server (prerequisites checks). It's weird because the remote ssh works well with VSC 1.88 and Centos 7, only the dev container is affected by this issue.

GhislainC avatar Apr 08 '24 08:04 GhislainC

me too!

aqlkzf avatar Apr 08 '24 09:04 aqlkzf

https://code.visualstudio.com/updates/v1_86 I try to use the history version and it works fine now.

aqlkzf avatar Apr 08 '24 09:04 aqlkzf

Same as #9745.

Could you try:

  • Connect to the ssh server using Remote-SSH and confirm it is working.
  • Remove the ~/.vscode-remote-containers/bin/5c3e652f63e798a5ac2f31ffd0d863669328dc4c folder.
  • Reload the VS Code window.
  • Retry attaching to the dev container.

chrmarti avatar Apr 08 '24 09:04 chrmarti

yeah I remote the ~/.vscode-remote-containers/bin/5c3e652f63e798a5ac2f31ffd0d863669328dc4c folder , reload the VS Code windows and retry. Then it works!

Same as #9745.

Could you try:

  • Connect to the ssh server using Remote-SSH and confirm it is working.
  • Remove the ~/.vscode-remote-containers/bin/5c3e652f63e798a5ac2f31ffd0d863669328dc4c folder.
  • Reload the VS Code window.
  • Retry attaching to the dev container.

Liuz233 avatar Apr 08 '24 09:04 Liuz233

Same as #9745.

Could you try:

  • Connect to the ssh server using Remote-SSH and confirm it is working.
  • Remove the ~/.vscode-remote-containers/bin/5c3e652f63e798a5ac2f31ffd0d863669328dc4c folder.
  • Reload the VS Code window.
  • Retry attaching to the dev container.

I can't use the first method because I'm using remote-ssh to connect to a server, and then using the dev container plugin on the server to connect to the containers on that server. But I didn't specify port mapping when I created the docker container at the time, so I can't seem to connect to my container directly via remote-ssh.

Liuz233 avatar Apr 08 '24 09:04 Liuz233

I think this would trigger when the following conditions are met:

  • You are connected through an older ("legacy") Linux install's SSH server to a Dev Container.
  • The workspace URI uses the old-style SSH connection encoded in the Dev Container URI's authority (not a concatenated resolver URI).
  • VS Code updates.
  • VS Code reconnects through this URI. (Existing connection or reconnection through a Recent history entry.)

In this case Remote-SSH did not yet install the legacy server and Dev Containers uses a fallback code path that does not support legacy Linux systems at the moment.

This should not happen when a new workspace URI is used that uses the resolver concatenation. Additionally the SSH server must be a legacy install with an older libc.

Reopening for tracking.

Could those seeing this again append the full Dev Containers log from when this happens. (F1 > Dev Containers: Show Container Log)

chrmarti avatar Apr 08 '24 13:04 chrmarti

@lucaspompeun

hiae-lucaspompeun avatar Apr 16 '24 18:04 hiae-lucaspompeun

@Liuz233 try to erase the .vscode-server folder inside the docker container. Atach the shell and try it. Worked for me.

lucaspompeun avatar Apr 16 '24 18:04 lucaspompeun

FTR I just ran on this issue. Fiddling around with downgrading VSCode, SSH Remote and Dev Containers, killing the remote host using the VSCode command, deleting .vscode-server on the host and inside the container, reupdating VSCode and the extensions, and reconnecting to the host then the container manually instead of using the link from the Recent History, I finally got everything to connect on the latest VSCode and extensions. I am not sure what did the trick. Unfortunately I saw @chrmarti request for logs after everything got back to work, but his suggestion seems on point.

perrstep avatar Apr 17 '24 17:04 perrstep

Logs would indeed be helpful to confirm the current understanding.

I will change the code to prefer Remote-SSH's node install when available, that should help getting unstuck in case this is a wider issue. The full fix would be to run the compatibility check and download the legacy server if needed.

chrmarti avatar Apr 18 '24 09:04 chrmarti

Dev Containers 0.360.0-pre-release has the above mentioned improvement.

chrmarti avatar Apr 19 '24 12:04 chrmarti