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.62k stars 279 forks source link

"docker.host": "ssh://user@ip" hangs the remote machine #3626

Closed zingdle closed 3 years ago

zingdle commented 4 years ago

Steps to Reproduce:

Before started, I can ssh to the remote host.

When using vscode remote to connect a remote docker host with .vscode/settings.json:

{
  "docker.host": "ssh://user@ip"
}

Open the folder in container, It hangs on:

...
[2954 ms] Forwarding local port 41933 to container port 41933
[3000 ms] Start: Run: docker exec -i -u vscode -e VSCODE_REMOTE_CONTAINERS_SESSION=dc12973c-4ddf-4775-ad24-ff305839870e1599053809993 95809220cb717e4c26ed285f71047124102477b94d6ac6c6bbf335299c71b969 /home/vscode/.vscode-server/bin/db40434f562994116e5b21c24015a2e40b2504e6/node -e 
[3005 ms] Start: Run: docker exec -i -u vscode -e VSCODE_REMOTE_CONTAINERS_SESSION=dc12973c-4ddf-4775-ad24-ff305839870e1599053809993 95809220cb717e4c26ed285f71047124102477b94d6ac6c6bbf335299c71b969 /home/vscode/.vscode-server/bin/db40434f562994116e5b21c24015a2e40b2504e6/node -e 

At this time I tried to ssh the remote machine, it hangs too:

ssh -vvv user@ip
...
debug2: ssh_connect_direct
debug1: Connecting to ip [ip] port 22.

But few minutes later, I can ssh to the remote host again.

Using tcp://localhost:23750 instead works fine for me.

zingdle commented 4 years ago

I believe this issue is mostly related to container, not ssh.

@chrisdias

bamurtaugh commented 3 years ago

cc @chrmarti

chrmarti commented 3 years ago

@zingdle Can you try monitoring the remote host while connecting to it with Remote-Containers? E.g., using top to monitior CPU and memory usage in a separate ssh session (or without ssh if you have physical access to the machine). That would help us understand what is going on.

github-actions[bot] commented 3 years ago

This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines.

Happy Coding!