Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attach to a running container on remote host fails #2693

Closed
rADikal8e7 opened this issue Apr 3, 2020 · 1 comment
Closed

Attach to a running container on remote host fails #2693

rADikal8e7 opened this issue Apr 3, 2020 · 1 comment

Comments

@rADikal8e7
Copy link

  • VSCode Version:
    Version: 1.44.0-insider
    Commit: 0dbae2083aff6ff2190c8e2157be95458915d464
    Date: 2020-04-03T05:52:10.484Z (15 hrs ago)
    Electron: 7.1.11
    Chrome: 78.0.3904.130
    Node.js: 12.8.1
    V8: 7.8.279.23-electron.0
    OS: Darwin x64 19.4.0
  • Local OS Version: macOS catalina 10.15.4
  • Remote OS Version: Centos7.7
  • Remote Extension/Connection Type: Docker

Steps to Reproduce:

  1. Have docker up and running on remote.
[root@remote-host lib]# systemctl show --property ActiveState docker
ActiveState=active
[root@remote-host lib]# docker --version
Docker version 1.13.1, build cccb291/1.13.1
[root@remote-host lib]# docker ps -a
CONTAINER ID        IMAGE                                              COMMAND                  CREATED             STATUS                      PORTS               NAMES
af7676241a24        /cont-image:stable   "/usr/bin/supervis..."   29 minutes ago      Up 29 minutes   
  1. Ensure ssh connectivity to remote from CLI using keybased auth.
user@local-mac ~ % ssh root@remote-host
Last login: Fri Apr  3 14:22:06 2020 from <local-ip>
[root@remote-host ~]#
  1. Have docker.host property in settins.json
    "docker.host": "ssh://root@<remote-ip>",
  1. Now if attaching to running container i get the following error. None of the containers show up in the remote panel.

image

  1. Developer tool toggle shows the following error on the console.

Screen Shot 2020-04-03 at 2 55 07 PM

Triage done.

  1. Verified that i can access the host using remote-ssh extension.
  2. Have not set any env variables other than the docker.host in the settings.json file.
  3. ssh-add -i to make sure the identity is added.

I checked some of the open issues #2361 #975 #2514 but couldnt find a solution to my issue. Am i missing something here?

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

@rADikal8e7
Copy link
Author

After further debugging i found the issue. It is due to the OS version of docker Docker version 1.13.1 on the centos 7 release. I assume it doesnt support ssh://user@host that came in docker-ce >18.0

As soon as i uninstalled that version and installed docker-ce >18.0 (Docker version 19.03.8) on the remote host Vscode was able to see the remote containers.

Triage steps for future:

  1. Ensure the following command docker -H ssh://user@remote-host ps shows the running containers on remote host before blaming vscode. This might require you to install docker on local machine even though it is not needed for the remote attach.

Perhaps the developer tools console could to be enhanced to show clearer error message.Anyways i am closing the issue.

@vscodebot vscodebot bot locked and limited conversation to collaborators May 19, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant