microsoft / vscode-remote-release

Visual Studio Code Remote Development: Open any folder in WSL, in a Docker container, or on a remote machine using SSH and take advantage of VS Code's full feature set.
https://aka.ms/vscode-remote
Other
3.61k stars 275 forks source link

Cannot connect to remote container #10156

Open fengbolan opened 1 month ago

fengbolan commented 1 month ago
  1. connect to remote ssh, it works
  2. connect to remote containers, get stuck for a very long time, and the containers don't show up in the vscode-remote extension but will show up in the docker extension.
  3. tried to connect from the docker extension, but I still get stuck

Does this issue occur when you try this locally?: No Does this issue occur when you try this locally and all extensions are disabled?: No

image

ZethWang commented 1 month ago

I have the same problem

ZethWang commented 1 month ago

O(u 'wsl.exe --list --online' R�Q�S(u�vR�SHr �T 'wsl.exe --install ' ۏL��[ň0

_N�S�N�Ǐ��� Microsoft Store eg�[ňR�SHr: https://aka.ms/wslstore Error code: Wsl/WSL_E_DEFAULT_DISTRO_NOT_FOUND

[11092 ms] [11200 ms] Start: Check Docker is running [11200 ms] Start: Run: docker version [11397 ms] Client: [11397 ms] Version: 18.06.3-ce API version:
[11397 ms] 1.38 Go version: go1.10.3 [11397 ms] Git commit:
[11397 ms] d7080c1 Built: Wed Feb 20 02:26:51 2019 [11397 ms] OS/Arch: [11397 ms] linux/amd64 Experimental: false [11398 ms] [11398 ms] Server: [11398 ms] Engine: [11398 ms] Version:
[11398 ms] 18.06.3-ce API version: 1.38 (minimum version 1.12) Go version: [11398 ms] go1.10.3 Git commit: d7080c1 [11398 ms] Built:
[11398 ms] Wed Feb 20 02:28:17 2019 OS/Arch:
[11398 ms] linux/amd64 Experimental:
[11398 ms] false [11399 ms] Start: Run: docker volume ls -q [11641 ms] Start: Run: docker ps -q -a --filter label=vsch.local.folder=/hpc_stor03/sjtu_home/zihan.wang/projQA/ToolQA --filter label=vsch.quality=stable [11841 ms] Start: Run: docker ps -q -a --filter label=devcontainer.local_folder=/hpc_stor03/sjtu_home/zihan.wang/projQA/ToolQA --filter label=devcontainer.config_file=/hpc_stor03/sjtu_home/zihan.wang/projQA/ToolQA/.devcontainer/devcontainer.json [12040 ms] Start: Run: docker ps -q -a --filter label=devcontainer.local_folder=/hpc_stor03/sjtu_home/zihan.wang/projQA/ToolQA [12237 ms] Running Dev Containers CLI: up --container-session-data-folder /tmp/devcontainers-2f3772cc-cba2-4e4e-8f6b-d3c21c55f9e21723363366314 --workspace-folder /hpc_stor03/sjtu_home/zihan.wang/projQA/ToolQA --workspace-mount-consistency cached --id-label devcontainer.local_folder=/hpc_stor03/sjtu_home/zihan.wang/projQA/ToolQA --id-label devcontainer.config_file=/hpc_stor03/sjtu_home/zihan.wang/projQA/ToolQA/.devcontainer/devcontainer.json --log-level debug --log-format json --config /hpc_stor03/sjtu_home/zihan.wang/projQA/ToolQA/.devcontainer/devcontainer.json --default-user-env-probe loginInteractiveShell --remove-existing-container --mount type=volume,source=vscode,target=/vscode,external=true --skip-post-create --update-remote-user-uid-default on --mount-workspace-git-root --include-configuration --include-merged-configuration [12237 ms] Start: Checking for Dev Containers CLI [12446 ms] Start: Run: /hpc_stor03/sjtu_home/zihan.wang/.vscode-server/cli/servers/Stable-eaa41d57266683296de7d118f574d0c2652e1fc4/server/node /hpc_stor03/sjtu_home/zihan.wang/.vscode-remote-containers/dist/dev-containers-cli-0.381.0/dist/spec-node/devContainersSpecCLI.js up --container-session-data-folder /tmp/devcontainers-2f3772cc-cba2-4e4e-8f6b-d3c21c55f9e21723363366314 --workspace-folder /hpc_stor03/sjtu_home/zihan.wang/projQA/ToolQA --workspace-mount-consistency cached --id-label devcontainer.local_folder=/hpc_stor03/sjtu_home/zihan.wang/projQA/ToolQA --id-label devcontainer.config_file=/hpc_stor03/sjtu_home/zihan.wang/projQA/ToolQA/.devcontainer/devcontainer.json --log-level debug --log-format json --config /hpc_stor03/sjtu_home/zihan.wang/projQA/ToolQA/.devcontainer/devcontainer.json --default-user-env-probe loginInteractiveShell --remove-existing-container --mount type=volume,source=vscode,target=/vscode,external=true --skip-post-create --update-remote-user-uid-default on --mount-workspace-git-root --include-configuration --include-merged-configuration [15119 ms] @devcontainers/cli 0.67.0. Node.js v20.14.0. linux 4.18.0-425.3.1.el8_lustre.x86_64 x64. [15119 ms] Start: Run: docker buildx version [15183 ms] Usage: docker [OPTIONS] COMMAND

A self-sufficient runtime for containers

Options: --config string Location of client config files (default "/hpc_stor03/sjtu_home/zihan.wang/.docker") -D, --debug Enable debug mode -H, --host list Daemon socket(s) to connect to -l, --log-level string Set the logging level ("debug"|"info"|"warn"|"error"|"fatal") (default "info") --tls Use TLS; implied by --tlsverify --tlscacert string Trust certs signed only by this CA (default "/hpc_stor03/sjtu_home/zihan.wang/.docker/ca.pem") --tlscert string Path to TLS certificate file (default "/hpc_stor03/sjtu_home/zihan.wang/.docker/cert.pem") --tlskey string Path to TLS key file (default "/hpc_stor03/sjtu_home/zihan.wang/.docker/key.pem") --tlsverify Use TLS and verify the remote -v, --version Print version information and quit

Management Commands: config Manage Docker configs container Manage containers image Manage images network Manage networks node Manage Swarm nodes plugin Manage plugins secret Manage Docker secrets service Manage services stack Manage Docker stacks swarm Manage Swarm system Manage Docker trust Manage trust on Docker images volume Manage volumes

Commands: attach Attach local standard input, output, and error streams to a running container build Build an image from a Dockerfile commit Create a new image from a container's changes cp Copy files/folders between a container and the local filesystem create Create a new container diff Inspect changes to files or directories on a container's filesystem events Get real time events from the server exec Run a command in a running container export Export a container's filesystem as a tar archive history Show the history of an image images List images import Import the contents from a tarball to create a filesystem image info Display system-wide information inspect Return low-level information on Docker objects kill Kill one or more running containers load Load an image from a tar archive or STDIN login Log in to a Docker registry logout Log out from a Docker registry logs Fetch the logs of a container pause Pause all processes within one or more containers port List port mappings or a specific mapping for the container ps List containers pull Pull an image or a repository from a registry push Push an image or a repository to a registry rename Rename a container restart Restart one or more containers rm Remove one or more containers rmi Remove one or more images run Run a command in a new container save Save one or more images to a tar archive (streamed to STDOUT by default) search Search the Docker Hub for images start Start one or more stopped containers stats Display a live stream of container(s) resource usage statistics stop Stop one or more running containers tag Create a tag TARGET_IMAGE that refers to SOURCE_IMAGE top Display the running processes of a container unpause Unpause all processes within one or more containers update Update configuration of one or more containers version Show the Docker version information wait Block until one or more containers stop, then print their exit codes

Run 'docker COMMAND --help' for more information on a command. [15183 ms] [15183 ms] Start: Run: docker -v [15239 ms] Start: Resolving Remote [15242 ms] Start: Run: git rev-parse --show-cdup [144913 ms] Failed to fetch control manifest: [144914 ms] Start: Run: docker ps -q -a --filter label=devcontainer.local_folder=/hpc_stor03/sjtu_home/zihan.wang/projQA/ToolQA --filter label=devcontainer.config_file=/hpc_stor03/sjtu_home/zihan.wang/projQA/ToolQA/.devcontainer/devcontainer.json [144994 ms] Start: Run: docker inspect --type image pytorch/pytorch:1.9.1-cuda11.1-cudnn8-runtime [145056 ms] Start: Run: docker buildx build --load --build-arg BUILDKIT_INLINE_CACHE=1 -f /tmp/devcontainercli-zihan.wang/container-features/0.67.0-1723363512036/Dockerfile-with-features -t vsc-toolqa-b486d16360b015003cc2f9c8247577f672a4ab71d7b5aae7502745868ea412fa --target dev_containers_target_stage --build-arg _DEV_CONTAINERS_BASE_IMAGE=dev_container_auto_added_stage_label /hpc_stor03/sjtu_home/zihan.wang/projQA/ToolQA unknown flag: --load See 'docker --help'.

Usage: docker [OPTIONS] COMMAND

A self-sufficient runtime for containers

Options: --config string Location of client config files (default "/hpc_stor03/sjtu_home/zihan.wang/.docker") -D, --debug Enable debug mode -H, --host list Daemon socket(s) to connect to -l, --log-level string Set the logging level ("debug"|"info"|"warn"|"error"|"fatal") (default "info") --tls Use TLS; implied by --tlsverify --tlscacert string Trust certs signed only by this CA (default "/hpc_stor03/sjtu_home/zihan.wang/.docker/ca.pem") --tlscert string Path to TLS certificate file (default "/hpc_stor03/sjtu_home/zihan.wang/.docker/cert.pem") --tlskey string Path to TLS key file (default "/hpc_stor03/sjtu_home/zihan.wang/.docker/key.pem") --tlsverify Use TLS and verify the remote -v, --version Print version information and quit

Management Commands: checkpoint Manage checkpoints config Manage Docker configs container Manage containers image Manage images manifest Manage Docker image manifests and manifest lists network Manage networks node Manage Swarm nodes plugin Manage plugins secret Manage Docker secrets service Manage services stack Manage Docker stacks swarm Manage Swarm system Manage Docker trust Manage trust on Docker images volume Manage volumes

Commands: attach Attach local standard input, output, and error streams to a running container build Build an image from a Dockerfile commit Create a new image from a container's changes cp Copy files/folders between a container and the local filesystem create Create a new container deploy Deploy a new stack or update an existing stack diff Inspect changes to files or directories on a container's filesystem events Get real time events from the server exec Run a command in a running container export Export a container's filesystem as a tar archive history Show the history of an image images List images import Import the contents from a tarball to create a filesystem image info Display system-wide information inspect Return low-level information on Docker objects kill Kill one or more running containers load Load an image from a tar archive or STDIN login Log in to a Docker registry logout Log out from a Docker registry logs Fetch the logs of a container pause Pause all processes within one or more containers port List port mappings or a specific mapping for the container ps List containers pull Pull an image or a repository from a registry push Push an image or a repository to a registry rename Rename a container restart Restart one or more containers rm Remove one or more containers rmi Remove one or more images run Run a command in a new container save Save one or more images to a tar archive (streamed to STDOUT by default) search Search the Docker Hub for images start Start one or more stopped containers stats Display a live stream of container(s) resource usage statistics stop Stop one or more running containers tag Create a tag TARGET_IMAGE that refers to SOURCE_IMAGE top Display the running processes of a container unpause Unpause all processes within one or more containers update Update configuration of one or more containers version Show the Docker version information wait Block until one or more containers stop, then print their exit codes

Run 'docker COMMAND --help' for more information on a command.

Error: exit status 125 [145112 ms] Start: Run: docker inspect --type image vsc-toolqa-b486d16360b015003cc2f9c8247577f672a4ab71d7b5aae7502745868ea412fa [142826 ms] { [142826 ms] stdout: '[]\nError: exit status 1\n', [142826 ms] stderr: 'Error: No such image: vsc-toolqa-b486d16360b015003cc2f9c8247577f672a4ab71d7b5aae7502745868ea412fa\n' [142826 ms] } [142828 ms] SyntaxError: Unexpected non-whitespace character after JSON at position 3 [142829 ms] at JSON.parse () [142829 ms] at vJ (/mnt/cloudstorfs/sjtu_home/zihan.wang/.vscode-remote-containers/dist/dev-containers-cli-0.381.0/dist/spec-node/devContainersSpecCLI.js:251:1120) [142829 ms] at async im (/mnt/cloudstorfs/sjtu_home/zihan.wang/.vscode-remote-containers/dist/dev-containers-cli-0.381.0/dist/spec-node/devContainersSpecCLI.js:251:944) [142829 ms] at async On (/mnt/cloudstorfs/sjtu_home/zihan.wang/.vscode-remote-containers/dist/dev-containers-cli-0.381.0/dist/spec-node/devContainersSpecCLI.js:474:767) [142829 ms] at async CtA (/mnt/cloudstorfs/sjtu_home/zihan.wang/.vscode-remote-containers/dist/dev-containers-cli-0.381.0/dist/spec-node/devContainersSpecCLI.js:410:1401) [142829 ms] at async Tc (/mnt/cloudstorfs/sjtu_home/zihan.wang/.vscode-remote-containers/dist/dev-containers-cli-0.381.0/dist/spec-node/devContainersSpecCLI.js:410:1711) [142829 ms] at async NH (/mnt/cloudstorfs/sjtu_home/zihan.wang/.vscode-remote-containers/dist/dev-containers-cli-0.381.0/dist/spec-node/devContainersSpecCLI.js:465:689) [142829 ms] at async KtA (/mnt/cloudstorfs/sjtu_home/zihan.wang/.vscode-remote-containers/dist/dev-containers-cli-0.381.0/dist/spec-node/devContainersSpecCLI.js:482:3771) [142829 ms] at async eB (/mnt/cloudstorfs/sjtu_home/zihan.wang/.vscode-remote-containers/dist/dev-containers-cli-0.381.0/dist/spec-node/devContainersSpecCLI.js:482:4886) [142829 ms] at async hrA (/mnt/cloudstorfs/sjtu_home/zihan.wang/.vscode-remote-containers/dist/dev-containers-cli-0.381.0/dist/spec-node/devContainersSpecCLI.js:663:200) [142830 ms] Exit code 1 [142832 ms] Command failed: /hpc_stor03/sjtu_home/zihan.wang/.vscode-server/cli/servers/Stable-eaa41d57266683296de7d118f574d0c2652e1fc4/server/node /hpc_stor03/sjtu_home/zihan.wang/.vscode-remote-containers/dist/dev-containers-cli-0.381.0/dist/spec-node/devContainersSpecCLI.js up --container-session-data-folder /tmp/devcontainers-2f3772cc-cba2-4e4e-8f6b-d3c21c55f9e21723363366314 --workspace-folder /hpc_stor03/sjtu_home/zihan.wang/projQA/ToolQA --workspace-mount-consistency cached --id-label devcontainer.local_folder=/hpc_stor03/sjtu_home/zihan.wang/projQA/ToolQA --id-label devcontainer.config_file=/hpc_stor03/sjtu_home/zihan.wang/projQA/ToolQA/.devcontainer/devcontainer.json --log-level debug --log-format json --config /hpc_stor03/sjtu_home/zihan.wang/projQA/ToolQA/.devcontainer/devcontainer.json --default-user-env-probe loginInteractiveShell --remove-existing-container --mount type=volume,source=vscode,target=/vscode,external=true --skip-post-create --update-remote-user-uid-default on --mount-workspace-git-root --include-configuration --include-merged-configuration [142832 ms] Exit code 1 `

When I rebuild and reopen in Container I report an error like following pictures image image

and I have the problem the same to @fengbolan

image

and "attach vscode" in docker extension didn't work.It's no reflection.But 'attach shell' normal image