-
Notifications
You must be signed in to change notification settings - Fork 261
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
Attaching Visual Studio Code to Remote Containers Hangs at "Setting up Remote-Containers (show log)" #6670
Comments
P.S. It works if I run the extension in the workspace by adding the following to my settings:
|
Does your ssh connection require a password or passphrase to connect? |
P.S. this doesn't get stuck on |
@chrmarti - password |
Are you asked for the password before it stops on |
Nope - not asked for a password. |
@chrmarti which of these logs would you be interested in? |
@uns1 Are you connecting to a Azure VM using a bastion tunnel? I am facing exactly the same issue and suspect azure-cli to be the reason. VSCode seems to open two connections, one for remote ssh and a second to open the remote container. But the bastion tunnel seems to only support one connection at a time resulting VSCode to block with the log output in your issue description. I managed to create an ugly workaround with two ports and switching the port in my ssh config before opening the container. |
@uns1 The one you get with |
@chrmarti - same thing - even with log level == trace, all I get is: |
@sharkfox - not entirely sure where/how the machine I'm SSH-ing into is hosted - sorry, |
@uns1 Do you have "Remote.SSH: Use Local Server" enabled in your user settings? If not: Could you enable it and check if you can still connect to the SSH server using Remote-SSH? Also: Do you have a RemoteCommand in your SSH config for that server? |
@chrmarti - Use Local Server is already enabled. No RemoteCommand in SSH config |
I had this exact problem with the exact same log. The only workaround I found was to configure ssh to not need any passwords, either the user password on the host or the key passphrase. At first I tried letting the user log in with just the ssh key but still having a passcode on the key, but the problem remained. |
Same problem here. |
I am also having a problem with attaching to a remote docker container. However, my log gets stuck on the following line when attempting to attach: I am using SSH public key to log into the remote server. UPDATE 06/06/2022: PS. I am using Windows 10 client and Ubuntu 20.04 server. |
Experiencing the same issue. Container start up gets stuck at |
@Alino Connecting to a Windows SSH server is not supported yet. Tracked as #6055. @abarcovschi That last command in the log transfers the VS Code server to the container. If the connection to the SSH server is slow, that might take more time to finish. For everyone else, loading the private key into the local SSH agent might work around the problem (which appears to be related to entering a passphrase/password when connecting to the SSH server). |
Getting the same thing - Ubunutu server - Can connect to vscode server fine, but it hangs at the |
I had the same problem, and this worked for me. Thanks! |
Is there any other workaround for this? It gets stuck on: Or how can I programatically invoke the remote container directly without sshing to the host first with VS Code? |
@esttenorio setting up ssh key without passcode worked for me. |
@esttenorio What is your local OS? What is the ssh server's OS? Could you append your |
I had the same problem when |
I had the same problem that devcontainer attach command hangs after I wonder if there's a work around in my situation? @chrmarti |
Have seen this when connecting to Unbuntu VM on Google Cloud. Hanging exactly as @abarcovschi showed, it helped to clear |
I had the same error as @abarcovschi. I tried using ssh keys, but the problem persists. |
Issue
Trying to attach visual studio code to a container hangs at "Setting up Remote-Containers (show log)". I can attach a shell to the container as well as attach visual studio code to the same container from another computer. To remedy, I reinstalled (clean) VS Code but that did not help either. The Dev Container log shows this:
[26127 ms] Remote-Containers 0.233.0 in VS Code 1.66.2 (dfd34e8260c270da74b5c2d86d61aee4b6d56977).
[26127 ms] Start: Run: ssh xxx-xxxxxxx /bin/sh
[26141 ms] Start: Run in host: id -un
Version of VS Code
Version 1.66.2
What type of remote connection you were using: SSH, Containers, WSL
SSH and Containers
Your operating system
On a Windows 11 Pro Machine, SSH-ed into Ubuntu (18.04.5 LTS)
The remote operating system you are connecting to
A docker container building from python and/or ubuntu
List of extensions that you have installed
Reproducible steps (1... 2... 3...) that cause the issue
Right click on running container, click attach Visual Studio Code
What you expected to see, versus what you actually saw
VS Code to open in remote container
Errors from the Dev Tools Console (open from the menu: Help > Toggle Developer Tools)
If you are using VS Code Remote - Container support, include your container configuration files if you are able to.
This happens with every container, all of which were functioning properly until recently - hence I do not think providing the container config files will be beneficial as the issue is not specific to certain containers
The text was updated successfully, but these errors were encountered: