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

An error occurred setting up the container

Open OldStarchy opened this issue 3 years ago • 2 comments

Starting a container before updating the vscode server in WSL fails to start the container.

  • VSCode Version:1.72.0-insider (user setup)
  • Local OS Version: Windows_NT x64 10.0.22000
  • Remote OS Version: Ubuntu 20.04 / WSL2
  • Remote Extension/Connection Type: Containers
  • Logs:
Logs
[2022-09-19T22:14:02.541Z] Remote-Containers 0.252.0 in VS Code 1.72.0-insider (bd782eb059e133d3a20fdb446b8feb0010a278ad).
[2022-09-19T22:14:02.541Z] Start: Run: wsl -d Ubuntu-20.04 -e wslpath -u \\wsl.localhost\Ubuntu-20.04\home\sorokin\projects\gitlab\some-project
[2022-09-19T22:14:02.894Z] Stop (353 ms): Run: wsl -d Ubuntu-20.04 -e wslpath -u \\wsl.localhost\Ubuntu-20.04\home\sorokin\projects\gitlab\some-project
[2022-09-19T22:14:02.935Z] Start: Resolving Remote
[2022-09-19T22:14:02.956Z] Start: Run: wsl -d Ubuntu-20.04 -e wslpath -u \\wsl.localhost\Ubuntu-20.04\home\sorokin\projects\gitlab\some-project
[2022-09-19T22:14:03.326Z] Stop (370 ms): Run: wsl -d Ubuntu-20.04 -e wslpath -u \\wsl.localhost\Ubuntu-20.04\home\sorokin\projects\gitlab\some-project
[2022-09-19T22:14:03.328Z] Start: Run: wsl -d Ubuntu-20.04 -e /bin/sh -c cd '/home/sorokin/projects/gitlab/some-projecte' && /bin/sh
[2022-09-19T22:14:03.360Z] Start: Run in host: id -un
[2022-09-19T22:14:03.519Z] sorokin
[2022-09-19T22:14:03.520Z] 
[2022-09-19T22:14:03.520Z] Stop (160 ms): Run in host: id -un
[2022-09-19T22:14:03.520Z] Start: Run in host: cat /etc/passwd
[2022-09-19T22:14:03.522Z] Stop (2 ms): Run in host: cat /etc/passwd
[2022-09-19T22:14:03.523Z] Start: Run in host: echo ~
[2022-09-19T22:14:03.525Z] /home/sorokin
[2022-09-19T22:14:03.526Z] 
[2022-09-19T22:14:03.526Z] Stop (3 ms): Run in host: echo ~
[2022-09-19T22:14:03.527Z] Start: Run in host: test -x '/home/sorokin/.vscode-remote-containers/bin/bd782eb059e133d3a20fdb446b8feb0010a278ad/node'
[2022-09-19T22:14:03.533Z] 
[2022-09-19T22:14:03.535Z] 
[2022-09-19T22:14:03.536Z] Exit code 1
[2022-09-19T22:14:03.536Z] Stop (9 ms): Run in host: test -x '/home/sorokin/.vscode-remote-containers/bin/bd782eb059e133d3a20fdb446b8feb0010a278ad/node'
[2022-09-19T22:14:03.537Z] Start: Run in host: test -x '/home/sorokin/.vscode-server-insiders/bin/bd782eb059e133d3a20fdb446b8feb0010a278ad/node'
[2022-09-19T22:14:03.539Z] 
[2022-09-19T22:14:03.539Z] 
[2022-09-19T22:14:03.540Z] Exit code 1
[2022-09-19T22:14:03.540Z] Stop (3 ms): Run in host: test -x '/home/sorokin/.vscode-server-insiders/bin/bd782eb059e133d3a20fdb446b8feb0010a278ad/node'
[2022-09-19T22:14:03.540Z] Start: Run in host: uname -s
[2022-09-19T22:14:03.542Z] Linux
[2022-09-19T22:14:03.543Z] 
[2022-09-19T22:14:03.543Z] Stop (3 ms): Run in host: uname -s
[2022-09-19T22:14:03.543Z] Start: Run in host: uname -m
[2022-09-19T22:14:03.546Z] x86_64
[2022-09-19T22:14:03.547Z] 
[2022-09-19T22:14:03.549Z] Stop (6 ms): Run in host: uname -m
[2022-09-19T22:14:03.552Z] Start: Run in host: (cat /etc/os-release || cat /usr/lib/os-release) 2>/dev/null
[2022-09-19T22:14:03.558Z] NAME="Ubuntu"
VERSION="20.04.5 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.5 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal
[2022-09-19T22:14:03.559Z] 
[2022-09-19T22:14:03.559Z] Stop (7 ms): Run in host: (cat /etc/os-release || cat /usr/lib/os-release) 2>/dev/null
[2022-09-19T22:14:03.561Z] Start: Downloading VS Code Server
[2022-09-19T22:14:03.561Z] bd782eb059e133d3a20fdb446b8feb0010a278ad linux-x64 insider 
[2022-09-19T22:14:14.377Z] Stop (10816 ms): Downloading VS Code Server
[2022-09-19T22:14:20.267Z] Start: Installing VS Code Server
[2022-09-19T22:14:20.273Z] Start: Run in host: mkdir -p /home/sorokin/.vscode-remote-containers/bin/bd782eb059e133d3a20fdb446b8feb0010a278ad_1663625660272
[2022-09-19T22:14:20.304Z] 
[2022-09-19T22:14:20.306Z] 
[2022-09-19T22:14:20.308Z] Stop (35 ms): Run in host: mkdir -p /home/sorokin/.vscode-remote-containers/bin/bd782eb059e133d3a20fdb446b8feb0010a278ad_1663625660272
[2022-09-19T22:14:20.310Z] Start: Run in host: (dd iflag=fullblock bs=8192 count=9819 2>/dev/null; dd iflag=fullblock bs=2048 count=1 2>/dev/null) | tar --no-same-owner -x -C /home/sorokin/.vscode-remote-containers/bin/bd782eb059e133d3a20fdb446b8feb0010a278ad_1663625660272
[2022-09-19T22:14:21.960Z] 
[2022-09-19T22:14:21.961Z] 
[2022-09-19T22:14:21.962Z] Stop (1652 ms): Run in host: (dd iflag=fullblock bs=8192 count=9819 2>/dev/null; dd iflag=fullblock bs=2048 count=1 2>/dev/null) | tar --no-same-owner -x -C /home/sorokin/.vscode-remote-containers/bin/bd782eb059e133d3a20fdb446b8feb0010a278ad_1663625660272
[2022-09-19T22:14:21.964Z] Start: Run in host: mv -n /home/sorokin/.vscode-remote-containers/bin/bd782eb059e133d3a20fdb446b8feb0010a278ad_1663625660272/* /home/sorokin/.vscode-remote-containers/bin/bd782eb059e133d3a20fdb446b8feb0010a278ad && rmdir /home/sorokin/.vscode-remote-containers/bin/bd782eb059e133d3a20fdb446b8feb0010a278ad_1663625660272
[2022-09-19T22:14:22.003Z] 
[2022-09-19T22:14:22.005Z] 
[2022-09-19T22:14:22.007Z] Stop (43 ms): Run in host: mv -n /home/sorokin/.vscode-remote-containers/bin/bd782eb059e133d3a20fdb446b8feb0010a278ad_1663625660272/* /home/sorokin/.vscode-remote-containers/bin/bd782eb059e133d3a20fdb446b8feb0010a278ad && rmdir /home/sorokin/.vscode-remote-containers/bin/bd782eb059e133d3a20fdb446b8feb0010a278ad_1663625660272
[2022-09-19T22:14:22.009Z] Stop (1742 ms): Installing VS Code Server
[2022-09-19T22:14:22.010Z] Start: Run in host: test -f '/home/sorokin/.vscode-remote-containers/dist/vscode-remote-containers-server-0.252.0.js'
[2022-09-19T22:14:22.018Z] 
[2022-09-19T22:14:22.019Z] 
[2022-09-19T22:14:22.021Z] Stop (11 ms): Run in host: test -f '/home/sorokin/.vscode-remote-containers/dist/vscode-remote-containers-server-0.252.0.js'
[2022-09-19T22:14:22.078Z] userEnvProbe: loginInteractiveShell (default)
[2022-09-19T22:14:22.086Z] userEnvProbe shell: /bin/bash
[2022-09-19T22:14:24.108Z] Start: Run in Host: /bin/sh 
[2022-09-19T22:14:24.126Z] Start: Run in container: for pid in `cd /proc && ls -d [0-9]*`; do { echo $pid ; readlink /proc/$pid/cwd ; readlink /proc/$pid/ns/mnt ; cat /proc/$pid/stat | tr "
[2022-09-19T22:14:25.358Z] Stop (1232 ms): Run in container: for pid in `cd /proc && ls -d [0-9]*`; do { echo $pid ; readlink /proc/$pid/cwd ; readlink /proc/$pid/ns/mnt ; cat /proc/$pid/stat | tr "
[2022-09-19T22:14:25.370Z] userEnvProbe is taking longer than 2 seconds. Process tree:
  190: /bin/bash -lic echo -n e00608a98ddbb8b0ec1f5cd655ecee94; cat /proc/self/environ; echo -n e00608a98ddbb8b0ec1f5cd655ecee94 
[2022-09-19T22:14:25.401Z] Stop (1293 ms): Run in Host: /bin/sh 
[2022-09-19T22:14:32.118Z] userEnvProbe is taking longer than 10 seconds. Avoid waiting for user input in your shell's startup scripts. Continuing.
[2022-09-19T22:14:32.173Z] Setting up container for folder or workspace: /home/sorokin/projects/gitlab/some-projecte
[2022-09-19T22:14:32.307Z] Start: Check Docker is running
[2022-09-19T22:14:32.310Z] Start: Run in Host: docker version --format {{.Server.APIVersion}}
[2022-09-19T22:14:33.485Z] Stop (1175 ms): Run in Host: docker version --format {{.Server.APIVersion}}
[2022-09-19T22:14:33.486Z] Server API version: 1.41
[2022-09-19T22:14:33.488Z] Stop (1181 ms): Check Docker is running
[2022-09-19T22:14:33.502Z] Start: Run in Host: docker volume ls -q
[2022-09-19T22:14:34.342Z] Stop (840 ms): Run in Host: docker volume ls -q
[2022-09-19T22:14:34.458Z] Start: Run in Host: docker ps -q -a --filter label=vsch.local.folder=\\wsl.localhost\Ubuntu-20.04\home\sorokin\projects\gitlab\some-project --filter label=vsch.quality=insider
[2022-09-19T22:14:35.453Z] Stop (995 ms): Run in Host: docker ps -q -a --filter label=vsch.local.folder=\\wsl.localhost\Ubuntu-20.04\home\sorokin\projects\gitlab\some-project --filter label=vsch.quality=insider
[2022-09-19T22:14:35.457Z] Start: Run in Host: docker ps -q -a --filter label=devcontainer.local_folder=\\wsl.localhost\Ubuntu-20.04\home\sorokin\projects\gitlab\some-project
[2022-09-19T22:14:36.578Z] Stop (1121 ms): Run in Host: docker ps -q -a --filter label=devcontainer.local_folder=\\wsl.localhost\Ubuntu-20.04\home\sorokin\projects\gitlab\some-project
[2022-09-19T22:14:36.582Z] Start: Run in Host: docker inspect --type container 0baade66002d
[2022-09-19T22:14:37.644Z] Stop (1062 ms): Run in Host: docker inspect --type container 0baade66002d
[2022-09-19T22:14:37.703Z] Start: Run in Host: /home/sorokin/.vscode-remote-containers/bin/bd782eb059e133d3a20fdb446b8feb0010a278ad/node /home/sorokin/.vscode-remote-containers/dist/dev-containers-cli-0.252.0/dist/spec-node/devContainersSpecCLI.js up --workspace-folder /home/sorokin/projects/gitlab/some-projecte --workspace-mount-consistency cached --id-label devcontainer.local_folder=\\wsl.localhost\Ubuntu-20.04\home\sorokin\projects\gitlab\some-project --log-level debug --log-format json --config /home/sorokin/projects/gitlab/some-projecte/.devcontainer/devcontainer.json --default-user-env-probe loginInteractiveShell --mount type=volume,source=vscode,target=/vscode,external=true --skip-post-create --update-remote-user-uid-default on --mount-workspace-git-root true
[2022-09-19T22:14:39.319Z] remote-containers 0.252.0.
[2022-09-19T22:14:39.318Z] Start: Run: docker buildx version
[2022-09-19T22:14:41.108Z] Stop (1790 ms): Run: docker buildx version
[2022-09-19T22:14:41.122Z] Start: Resolving Remote
[2022-09-19T22:14:41.175Z] Start: Run: docker-compose version --short
[2022-09-19T22:14:41.263Z] Stop (88 ms): Run: docker-compose version --short
[2022-09-19T22:14:41.268Z] Start: Run: docker ps -q -a --filter label=com.docker.compose.project=some-projecte_devcontainer --filter label=com.docker.compose.service=dev
[2022-09-19T22:14:42.210Z] Stop (942 ms): Run: docker ps -q -a --filter label=com.docker.compose.project=some-projecte_devcontainer --filter label=com.docker.compose.service=dev
[2022-09-19T22:14:42.214Z] Start: Run: docker inspect --type container 0baade66002d
[2022-09-19T22:14:43.492Z] Stop (1278 ms): Run: docker inspect --type container 0baade66002d
[2022-09-19T22:14:43.521Z] Error: Command failed: docker-compose version --short
[2022-09-19T22:14:43.524Z]     at gc (/home/sorokin/.vscode-remote-containers/dist/dev-containers-cli-0.252.0/dist/spec-node/devContainersSpecCLI.js:248:907)
[2022-09-19T22:14:43.525Z]     at processTicksAndRejections (node:internal/process/task_queues:96:5)
[2022-09-19T22:14:43.530Z]     at async pF (/home/sorokin/.vscode-remote-containers/dist/dev-containers-cli-0.252.0/dist/spec-node/devContainersSpecCLI.js:222:1353)
[2022-09-19T22:14:43.534Z]     at async dF (/home/sorokin/.vscode-remote-containers/dist/dev-containers-cli-0.252.0/dist/spec-node/devContainersSpecCLI.js:206:2361)
[2022-09-19T22:14:43.535Z]     at async DF (/home/sorokin/.vscode-remote-containers/dist/dev-containers-cli-0.252.0/dist/spec-node/devContainersSpecCLI.js:263:2177)
[2022-09-19T22:14:43.535Z]     at async to (/home/sorokin/.vscode-remote-containers/dist/dev-containers-cli-0.252.0/dist/spec-node/devContainersSpecCLI.js:263:3110)
[2022-09-19T22:14:43.536Z]     at async Ak (/home/sorokin/.vscode-remote-containers/dist/dev-containers-cli-0.252.0/dist/spec-node/devContainersSpecCLI.js:383:8108)
[2022-09-19T22:14:43.539Z]     at async Ok (/home/sorokin/.vscode-remote-containers/dist/dev-containers-cli-0.252.0/dist/spec-node/devContainersSpecCLI.js:383:7864)
[2022-09-19T22:14:43.596Z] Stop (5893 ms): Run in Host: /home/sorokin/.vscode-remote-containers/bin/bd782eb059e133d3a20fdb446b8feb0010a278ad/node /home/sorokin/.vscode-remote-containers/dist/dev-containers-cli-0.252.0/dist/spec-node/devContainersSpecCLI.js up --workspace-folder /home/sorokin/projects/gitlab/some-projecte --workspace-mount-consistency cached --id-label devcontainer.local_folder=\\wsl.localhost\Ubuntu-20.04\home\sorokin\projects\gitlab\some-project --log-level debug --log-format json --config /home/sorokin/projects/gitlab/some-projecte/.devcontainer/devcontainer.json --default-user-env-probe loginInteractiveShell --mount type=volume,source=vscode,target=/vscode,external=true --skip-post-create --update-remote-user-uid-default on --mount-workspace-git-root true
[2022-09-19T22:14:43.599Z] Exit code 1
[2022-09-19T22:14:43.652Z] Command failed: /home/sorokin/.vscode-remote-containers/bin/bd782eb059e133d3a20fdb446b8feb0010a278ad/node /home/sorokin/.vscode-remote-containers/dist/dev-containers-cli-0.252.0/dist/spec-node/devContainersSpecCLI.js up --workspace-folder /home/sorokin/projects/gitlab/some-projecte --workspace-mount-consistency cached --id-label devcontainer.local_folder=\\wsl.localhost\Ubuntu-20.04\home\sorokin\projects\gitlab\some-project --log-level debug --log-format json --config /home/sorokin/projects/gitlab/some-projecte/.devcontainer/devcontainer.json --default-user-env-probe loginInteractiveShell --mount type=volume,source=vscode,target=/vscode,external=true --skip-post-create --update-remote-user-uid-default on --mount-workspace-git-root true
[2022-09-19T22:14:43.654Z] Exit code 1
[2022-09-19T22:17:12.025Z] Start: Run: wsl -d Ubuntu-20.04 -e wslpath -u \\wsl.localhost\Ubuntu-20.04\home\sorokin\projects\gitlab\some-project
[2022-09-19T22:17:12.251Z] Stop (226 ms): Run: wsl -d Ubuntu-20.04 -e wslpath -u \\wsl.localhost\Ubuntu-20.04\home\sorokin\projects\gitlab\some-project

Steps to Reproduce:

  1. Update VSCode in windows (which happens automatically after closing most nights)
  2. Don't open any project in WSL
  3. Open a dev container project from the recent projects list

The way I resolve this is to

  1. Open VSCode first not connected to WSL or a container - make sure it's up to date
  2. Run the "New WSL Window" command, or open a project in WSL from the recent projects list - this updates the VSCode server in wsl
  3. Open a dev container project, either from recent projects or "reopen in container" - then this works

Skipping step 2 causes step 3 to fail.

Does this issue occur when you try this locally?: N/A Does this issue occur when you try this locally and all extensions are disabled?: N/A

OldStarchy avatar Sep 19 '22 23:09 OldStarchy

Could you attach the log from when it fails? (F1 > Remote-Containers: Show Containers Log)

chrmarti avatar Sep 20 '22 06:09 chrmarti

Is that different to the log included above? I copied it from the log window after it failed to start. Next time I get this error I'll do as you said to see if its a different log.

OldStarchy avatar Sep 21 '22 02:09 OldStarchy

Missed that, thanks. Same as https://github.com/microsoft/vscode-remote-release/issues/7464, continuing there.

Note that https://github.com/microsoft/vscode-remote-release/issues/7464#issuecomment-1338907216 suggests that updating to the latest Docker Compose might fix it. Let us know the outcome if you try that. Thanks.

chrmarti avatar Dec 15 '22 10:12 chrmarti