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.66k stars 287 forks source link

List of Containers blank when trying to connect to a running remote container. #6780

Closed vlad43210 closed 1 year ago

vlad43210 commented 2 years ago

Steps to Reproduce:

  1. Connect to Host... option to connect to remote Host
  2. Click on Attach to Running Container...

After step 2, the list of containers is blank. A colleague confirms that on an older version, the list of containers appears. I do not see any errors associated with this issue.

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

chrmarti commented 2 years ago

Could you append the log after trying that? (F1 > Remote-Containers: Show Containers Log)

vlad43210 commented 2 years ago

Sure, here's the log output:

[4565 ms] Start: Run: ssh (hostname) /bin/sh
[4576 ms] Start: Run in host: id -un
[5380 ms] (user)
[5394 ms] 
[5396 ms] Start: Run in host: cat /etc/passwd
[5457 ms] Start: Run in host: echo ~
[5492 ms] /home/(user)
[5494 ms] 
[5498 ms] Start: Run in host: test -x '/home/(user)/.vscode-remote-containers/bin/c3511e6c69bb39013c4a4b7b9566ec1ca73fc4d5/node'
[5553 ms] 
[5556 ms] 
[5558 ms] Exit code 1
[5562 ms] Start: Run in host: test -x '/home/(user)/.vscode-server/bin/c3511e6c69bb39013c4a4b7b9566ec1ca73fc4d5/node'
[5595 ms] 
[5596 ms] 
[5599 ms] Start: Run in host: test -f '/home/(user)/.vscode-server/bin/c3511e6c69bb39013c4a4b7b9566ec1ca73fc4d5/node_modules/node-pty/package.json'
[5630 ms] 
[5632 ms] 
[5633 ms] Start: Run in host: test -f '/home/(user)/.vscode-remote-containers/dist/vscode-remote-containers-server-0.234.0.js'
[5772 ms] 
[5772 ms] 
[5826 ms] userEnvProbe: loginInteractiveShell (default)
[5828 ms] userEnvProbe shell: /bin/bash
[6182 ms] userEnvProbe PATHs:
Probe:     '/usr/local/cuda/:/usr/local/cuda/bin:/usr/local/cuda:/usr/local/cuda/bin:/home/(user)/anaconda3/bin:/home/(user)/anaconda3/condabin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/home/(user)/.local/bin:/home/(user)/bin'
Container: None
[6237 ms] Start: Run in Host: docker version --format {{.Server.APIVersion}}
[6457 ms] 1.40
[6466 ms] Start: Run in Host: docker ps -q
[6576 ms] Start: Run in Host: docker inspect --type container 207b0c754fbd 6adadebdfb5e 4f8d50b94ff0 1730df1ef13c 4fb37bec4b0a 46773ee728f5 9fdcd6b15f21 33353ff5de4b 85831930dfa9 7f3f7fe48bd0

For what it's worth, when I do docker container ls in a terminal window in vscode (after connecting to this remote server), I see a number of containers with those same ids. But they don't show up when I select "Attach to Running Container..."

chrmarti commented 2 years ago

What is shown as the "Status" of these containers when you docker inspect them? The UI only shows "running" containers to attach to.

vlad43210 commented 2 years ago

What is shown as the "Status" of these containers when you docker inspect them? The UI only shows "running" containers to attach to.

All of their status is "Up (time)", e.g. "Up 9 days". Here is a sample output:

CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES
207b0c754fbd        kge_gpu             "/bin/bash"         9 days ago          Up 9 days                               (name)
6adadebdfb5e        kge_gpu             "/bin/bash"         3 weeks ago         Up 3 weeks                              (name)
4f8d50b94ff0        kge_gpu             "/bin/bash"         3 weeks ago         Up 3 weeks                              (name)
chrmarti commented 2 years ago

Could you check with docker inspect <container id> | grep Status? (That is what the extension uses.)

chrmarti commented 2 years ago

Could you also check if there is anything the developer console? (Help > Toggle Developer Tools)

vlad43210 commented 2 years ago
(base) [ec2-user@ip-172-21-36-77 ~]$ docker inspect 207b0c754fbd | grep Status
            "Status": "running",

I toggled the developer console, I don't see anything out of the ordinary but I also don't know where to look :)

github-actions[bot] commented 1 year ago

Hey @chrmarti, this issue might need further attention.

@vlad43210, you can help us out by closing this issue if the problem no longer exists, or adding more information.

vlad43210 commented 1 year ago

No longer an issue: went away after resetting the missing container.