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

Concurrent remote container and ssh sessions to same host cause confusion #2555

Closed
nb88r opened this issue Mar 16, 2020 · 5 comments
Closed
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug *duplicate Issue identified as a duplicate of another issue(s) ssh Issue in vscode-remote SSH
Milestone

Comments

@nb88r
Copy link

nb88r commented Mar 16, 2020

Version of VS Code: 1.43.0
Remote connection: ssh and containers
OS: Windows 10 (local), Ubuntu 19.10 (remote)

I'm using Ubuntu development vm and connecting to it from a Windows desktop, using the remote ssh extension.

Lately, I've converted one of our projects to use a dev container and configured VS Code to use docker on my dev vm (looking forward to #20 being resolved!)

I'm finding I'm unable to start a remote ssh VS Code window if I already have a remote container window open. Looking at the output I think it's because the ssh session has found an existing VS Code server, but that server is running inside the dev container which isn't exposing ports and thus the wget is failing.

Closing down the dev container and starting the ssh window first fixes things.

Example ssh remote output when trying to connect to a vm already hosting a dev container session:

[10:27:06.878] > Acquiring lock on /home/builder/.vscode-server/bin/78a4c91400152c0f27ba4d363eb56d2835f9903a/vscode-remote-lock.builder.78a4c91400152c0f27ba4d363eb56d2835f9903a
[10:27:06.879] > \ln /home/builder/.vscode-server/bin/78a4c91400152c0f27ba4d363eb56d2835f9903a/vscode-remote-lock.builder.78a4c91400152c0f27ba4d363eb56d2835f9903a.target /home/builder/.vscode-server/bin/78a4c91400152c0f27ba4d363eb56d2835f9903a/vscode-remote-lock.builder.78a4c91400152c0f27ba4d363eb56d2835f9903a
[10:27:06.880] > Found existing installation at /home/builder/.vscode-server/bin/78a4c91400152c0f27ba4d363eb56d2835f9903a...
[10:27:06.899] > Found running server...
>  
> *
> * Reminder: You may only use this software with Visual Studio family products,
> * as described in the license (https://go.microsoft.com/fwlink/?linkid=2077057)
> *
>  
[10:27:06.906] > Checking server status on port 35865 with wget
[10:27:06.908] > failed: Connection refused.
@roblourens
Copy link
Member

So you have a remote window using Docker, and now you are connecting to that same container host with the Remote-SSH extension?

Out of curiosity, why do you need to do that?

@roblourens roblourens added the info-needed Issue requires more information from poster label Mar 16, 2020
@nb88r
Copy link
Author

nb88r commented Mar 16, 2020

So you have a remote window using Docker, and now you are connecting to that same container host with the Remote-SSH extension?

Correct.

Out of curiosity, why do you need to do that?

Only one of the projects I'm working on has support for remote docker containers. My other main project is a regular VSCode workspace I access through the remote SSH extension. Plus it's nice to use VSCode to edit other files on my remote VM (eg shell scripts in my bin directory).

@roblourens
Copy link
Member

Oh, so there is a container inside the remote VM, and you connect to the remote container and also ssh just to that VM itself.

I do see the problem, we do a really simple check for whether there is already a server running, and it will find the server in the container. If I can just beef up that check, this should work.

@roblourens roblourens added bug Issue identified by VS Code Team member as probable bug ssh Issue in vscode-remote SSH and removed info-needed Issue requires more information from poster labels Mar 16, 2020
@roblourens roblourens added this to the March 2020 milestone Mar 16, 2020
@roblourens roblourens self-assigned this Mar 16, 2020
@roblourens roblourens modified the milestones: March 2020, Backlog Mar 16, 2020
@nb88r
Copy link
Author

nb88r commented Mar 16, 2020

Excellent, thanks! Also why I'm interested in #20, as it would make it much easier to start the vscode container (local container wrt remote ssh) without having to get the .devcontainer directory on my Windows deskop(s) first.

@roblourens
Copy link
Member

#3503

@roblourens roblourens added the *duplicate Issue identified as a duplicate of another issue(s) label Nov 10, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Dec 25, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug *duplicate Issue identified as a duplicate of another issue(s) ssh Issue in vscode-remote SSH
Projects
None yet
Development

No branches or pull requests

2 participants