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

Can't connect to Remote Container on Remote SSH with VSCode 1.64.0 #6280

Closed
eitsupi opened this issue Feb 4, 2022 · 11 comments
Closed

Can't connect to Remote Container on Remote SSH with VSCode 1.64.0 #6280

eitsupi opened this issue Feb 4, 2022 · 11 comments
Labels
containers Issue in vscode-remote containers

Comments

@eitsupi
Copy link

eitsupi commented Feb 4, 2022

  • VSCode Version: 1.64.0
  • Local OS Version: Windows10 21H1
  • Remote OS Version: Ubuntu 20.04 (Remote SSH), Debian 11(Remote Containers)
  • Remote Extension/Connection Type: Docker
  • Logs:
[2022-02-04T07:39:02.641Z] Start: Resolving Remote
[2022-02-04T07:39:02.641Z] Remote-Containers 0.217.1 in VS Code 1.64.0 (5554b12acf27056905806867f251c859323ff7e9).
[2022-02-04T07:39:02.652Z] Start: Run: ssh remote-linux /bin/sh -c /bin/sh
[2022-02-04T07:39:02.707Z] Start: Run in host: id -un
[2022-02-04T07:39:03.738Z] username
[2022-02-04T07:39:03.738Z] 
[2022-02-04T07:39:03.739Z] Stop (1032 ms): Run in host: id -un
[2022-02-04T07:39:03.739Z] Start: Run in host: cat /etc/passwd
[2022-02-04T07:39:03.761Z] Stop (22 ms): Run in host: cat /etc/passwd
[2022-02-04T07:39:03.762Z] Start: Run in host: echo ~
[2022-02-04T07:39:03.788Z] /home/username
[2022-02-04T07:39:03.790Z] 
[2022-02-04T07:39:03.791Z] Stop (29 ms): Run in host: echo ~
[2022-02-04T07:39:03.792Z] Start: Run in host: test -x '/home/username/.vscode-remote-containers/bin/5554b12acf27056905806867f251c859323ff7e9/node'
[2022-02-04T07:39:03.820Z] 
[2022-02-04T07:39:03.821Z] 
[2022-02-04T07:39:03.822Z] Exit code 1
[2022-02-04T07:39:03.822Z] Stop (30 ms): Run in host: test -x '/home/username/.vscode-remote-containers/bin/5554b12acf27056905806867f251c859323ff7e9/node'
[2022-02-04T07:39:03.823Z] Start: Run in host: test -x '/home/username/.vscode-server/bin/5554b12acf27056905806867f251c859323ff7e9/node'
[2022-02-04T07:39:03.849Z] 
[2022-02-04T07:39:03.849Z] 
[2022-02-04T07:39:03.849Z] Stop (26 ms): Run in host: test -x '/home/username/.vscode-server/bin/5554b12acf27056905806867f251c859323ff7e9/node'
[2022-02-04T07:39:03.850Z] Start: Run in host: test -f '/home/username/.vscode-server/bin/5554b12acf27056905806867f251c859323ff7e9/node_modules/node-pty/package.json'
[2022-02-04T07:39:03.878Z] 
[2022-02-04T07:39:03.878Z] 
[2022-02-04T07:39:03.879Z] Stop (29 ms): Run in host: test -f '/home/username/.vscode-server/bin/5554b12acf27056905806867f251c859323ff7e9/node_modules/node-pty/package.json'
[2022-02-04T07:39:03.879Z] Start: Run in host: test -f '/home/username/.vscode-remote-containers/dist/vscode-remote-containers-server-0.217.1.js'
[2022-02-04T07:39:03.919Z] 
[2022-02-04T07:39:03.920Z] 
[2022-02-04T07:39:03.921Z] Stop (42 ms): Run in host: test -f '/home/username/.vscode-remote-containers/dist/vscode-remote-containers-server-0.217.1.js'
[2022-02-04T07:39:03.954Z] userEnvProbe: loginInteractiveShell (default)
[2022-02-04T07:39:03.956Z] userEnvProbe shell: /bin/bash
[2022-02-04T07:39:04.161Z] userEnvProbe PATHs:
Probe:     '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/linuxbrew/.linuxbrew/bin'
Container: None
[2022-02-04T07:39:04.178Z] Setting up container for folder or workspace: /home/username/project-name
[2022-02-04T07:39:04.179Z] Host: ssh://remote-linux
[2022-02-04T07:39:04.182Z] Start: Check Docker is running
[2022-02-04T07:39:04.182Z] Start: Run in Host: docker version --format {{.Server.APIVersion}}
[2022-02-04T07:39:04.298Z] Stop (116 ms): Run in Host: docker version --format {{.Server.APIVersion}}
[2022-02-04T07:39:04.299Z] Server API version: 1.41
[2022-02-04T07:39:04.299Z] Stop (117 ms): Check Docker is running
[2022-02-04T07:39:04.444Z] Start: Run in Host: git rev-parse --show-cdup
[2022-02-04T07:39:04.480Z] Stop (36 ms): Run in Host: git rev-parse --show-cdup
[2022-02-04T07:39:04.481Z] Start: Run in Host: docker ps -q -a --filter label=vsch.local.folder=/home/username/project-name --filter label=vsch.quality=stable
[2022-02-04T07:39:04.547Z] Stop (66 ms): Run in Host: docker ps -q -a --filter label=vsch.local.folder=/home/username/project-name --filter label=vsch.quality=stable
[2022-02-04T07:39:04.548Z] Start: Run in Host: docker inspect --type container a9b491184d63
[2022-02-04T07:39:04.627Z] Stop (79 ms): Run in Host: docker inspect --type container a9b491184d63
[2022-02-04T07:39:04.664Z] Start: Starting container
[2022-02-04T07:39:04.664Z] Start: Run in Host: docker start a9b491184d63a1292e6666336bedd1507cb373327ee498f8f9ee374344e2039a
[2022-02-04T07:39:05.360Z] Stop (696 ms): Run in Host: docker start a9b491184d63a1292e6666336bedd1507cb373327ee498f8f9ee374344e2039a
[2022-02-04T07:39:05.361Z] Stop (697 ms): Starting container
[2022-02-04T07:39:05.362Z] Start: Run in Host: docker ps -q -a --filter label=vsch.local.folder=/home/username/project-name --filter label=vsch.quality=stable
[2022-02-04T07:39:05.440Z] Stop (78 ms): Run in Host: docker ps -q -a --filter label=vsch.local.folder=/home/username/project-name --filter label=vsch.quality=stable
[2022-02-04T07:39:05.441Z] Start: Run in Host: docker inspect --type container a9b491184d63
[2022-02-04T07:39:05.515Z] Stop (74 ms): Run in Host: docker inspect --type container a9b491184d63
[2022-02-04T07:39:05.516Z] Start: Inspecting container
[2022-02-04T07:39:05.516Z] Start: Run in Host: docker inspect --type container a9b491184d63a1292e6666336bedd1507cb373327ee498f8f9ee374344e2039a
[2022-02-04T07:39:05.592Z] Stop (76 ms): Run in Host: docker inspect --type container a9b491184d63a1292e6666336bedd1507cb373327ee498f8f9ee374344e2039a
[2022-02-04T07:39:05.593Z] Stop (77 ms): Inspecting container
[2022-02-04T07:39:05.639Z] Start: Run in Host: docker exec -i -u vscode -e VSCODE_REMOTE_CONTAINERS_SESSION=dacda592-c9e7-4587-ad63-5d02d417d8261643960340398 a9b491184d63a1292e6666336bedd1507cb373327ee498f8f9ee374344e2039a /bin/sh
[2022-02-04T07:39:05.668Z] Start: Run in container: uname -m
[2022-02-04T07:39:05.805Z] x86_64
[2022-02-04T07:39:05.806Z] 
[2022-02-04T07:39:05.806Z] Stop (138 ms): Run in container: uname -m
[2022-02-04T07:39:05.806Z] Start: Run in container: (cat /etc/os-release || cat /usr/lib/os-release) 2>/dev/null
[2022-02-04T07:39:05.857Z] PRETTY_NAME="Debian GNU/Linux 11 (bullseye)"
NAME="Debian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
VERSION_CODENAME=bullseye
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
[2022-02-04T07:39:05.857Z] 
[2022-02-04T07:39:05.858Z] Stop (52 ms): Run in container: (cat /etc/os-release || cat /usr/lib/os-release) 2>/dev/null
[2022-02-04T07:39:05.858Z] Start: Run in container: cat /etc/passwd
[2022-02-04T07:39:05.879Z] Stop (21 ms): Run in container: cat /etc/passwd
[2022-02-04T07:39:05.881Z] Start: Setup shutdown monitor
[2022-02-04T07:39:05.883Z] Forking shutdown monitor: d:\UserArea\username\.vscode\extensions\ms-vscode-remote.remote-containers-0.217.1\dist\shutdown\shutdownMonitorProcess \\.\pipe\vscode-remote-containers-46f8ef344e2762a6820ffff75ad16f3d95afe839-sock singleContainer Debug d:\UserArea\username\AppData\Roaming\Code\logs\20220204T163858\exthost1\ms-vscode-remote.remote-containers 1643960342511
[2022-02-04T07:39:05.924Z] Stop (43 ms): Setup shutdown monitor
[2022-02-04T07:39:05.926Z] Start: Run in container: test -d /home/vscode/.vscode-server
[2022-02-04T07:39:05.972Z] 
[2022-02-04T07:39:05.973Z] 
[2022-02-04T07:39:05.973Z] Stop (47 ms): Run in container: test -d /home/vscode/.vscode-server
[2022-02-04T07:39:05.974Z] Start: Run in container: test -f /var/vscode-server/.patchEtcEnvironmentMarker
[2022-02-04T07:39:06.007Z] 
[2022-02-04T07:39:06.007Z] 
[2022-02-04T07:39:06.007Z] Stop (33 ms): Run in container: test -f /var/vscode-server/.patchEtcEnvironmentMarker
[2022-02-04T07:39:06.008Z] Start: Run in container: test -f /var/vscode-server/.patchEtcProfileMarker
[2022-02-04T07:39:06.048Z] 
[2022-02-04T07:39:06.049Z] 
[2022-02-04T07:39:06.049Z] Stop (41 ms): Run in container: test -f /var/vscode-server/.patchEtcProfileMarker
[2022-02-04T07:39:06.050Z] Start: Run in container: test ! -f '/home/vscode/.vscode-server/data/Machine/.writeMachineSettingsMarker' && set -o noclobber && mkdir -p '/home/vscode/.vscode-server/data/Machine' && { > '/home/vscode/.vscode-server/data/Machine/.writeMachineSettingsMarker' ; } 2> /dev/null
[2022-02-04T07:39:06.093Z] 
[2022-02-04T07:39:06.093Z] 
[2022-02-04T07:39:06.094Z] Exit code 1
[2022-02-04T07:39:06.094Z] Stop (44 ms): Run in container: test ! -f '/home/vscode/.vscode-server/data/Machine/.writeMachineSettingsMarker' && set -o noclobber && mkdir -p '/home/vscode/.vscode-server/data/Machine' && { > '/home/vscode/.vscode-server/data/Machine/.writeMachineSettingsMarker' ; } 2> /dev/null
[2022-02-04T07:39:06.094Z] Start: Run in container: cat /home/vscode/.vscode-server/data/Machine/settings.json
[2022-02-04T07:39:06.125Z] {
	"python.defaultInterpreterPath": "/usr/local/bin/python",
	"python.linting.enabled": true,
	"python.linting.pylintEnabled": true,
	"python.formatting.autopep8Path": "/usr/local/py-utils/bin/autopep8",
	"python.formatting.blackPath": "/usr/local/py-utils/bin/black",
	"python.formatting.yapfPath": "/usr/local/py-utils/bin/yapf",
	"python.linting.banditPath": "/usr/local/py-utils/bin/bandit",
	"python.linting.flake8Path": "/usr/local/py-utils/bin/flake8",
	"python.linting.mypyPath": "/usr/local/py-utils/bin/mypy",
	"python.linting.pycodestylePath": "/usr/local/py-utils/bin/pycodestyle",
	"python.linting.pydocstylePath": "/usr/local/py-utils/bin/pydocstyle",
	"python.linting.pylintPath": "/usr/local/py-utils/bin/pylint",
	"python.formatting.provider": "black"
}
[2022-02-04T07:39:06.126Z] 
[2022-02-04T07:39:06.127Z] Stop (33 ms): Run in container: cat /home/vscode/.vscode-server/data/Machine/settings.json
[2022-02-04T07:39:06.128Z] Start: Run in container: test -d /home/vscode/.vscode-server/bin/5554b12acf27056905806867f251c859323ff7e9
[2022-02-04T07:39:06.156Z] 
[2022-02-04T07:39:06.157Z] 
[2022-02-04T07:39:06.157Z] Exit code 1
[2022-02-04T07:39:06.157Z] Stop (29 ms): Run in container: test -d /home/vscode/.vscode-server/bin/5554b12acf27056905806867f251c859323ff7e9
[2022-02-04T07:39:06.158Z] Start: Run in container: test -d /vscode/vscode-server/bin/linux-x64/5554b12acf27056905806867f251c859323ff7e9
[2022-02-04T07:39:06.186Z] 
[2022-02-04T07:39:06.186Z] 
[2022-02-04T07:39:06.187Z] Exit code 1
[2022-02-04T07:39:06.187Z] Stop (29 ms): Run in container: test -d /vscode/vscode-server/bin/linux-x64/5554b12acf27056905806867f251c859323ff7e9
[2022-02-04T07:39:06.188Z] Installing VS Code Server for commit 5554b12acf27056905806867f251c859323ff7e9
[2022-02-04T07:39:06.189Z] Start: Run in Host: docker exec -i -u root a9b491184d63a1292e6666336bedd1507cb373327ee498f8f9ee374344e2039a /bin/sh
[2022-02-04T07:39:06.215Z] Start: Downloading VS Code Server
[2022-02-04T07:39:06.215Z] 5554b12acf27056905806867f251c859323ff7e9 linux-x64 stable 
[2022-02-04T07:39:06.254Z] Stop (39 ms): Downloading VS Code Server
[2022-02-04T07:39:06.265Z] Error: getaddrinfo ENOTFOUND update.code.visualstudio.com
	at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:67:26)
[2022-02-04T07:39:06.265Z] Exit code ENOTFOUND

Steps to Reproduce:

I updated VSCode today while working with Remote-Containers and now I can't reconnect to the container. I'm behind a proxy, so that could be the cause, but I don't know why as I've never had any problems before.

edited: On the remote Linux machine, I specified http_proxy, etc. in ~/.bashrc and general settings for Docker (e.g. ~/.docker/config.json).
On the local Windows machine, the proxy is configured in the pac file in the OS.

@github-actions github-actions bot added the containers Issue in vscode-remote containers label Feb 4, 2022
@BenjaminSchubert
Copy link

I am seeing the same behavior behind proxy for both remote-containers and remote-wsl (using wsl2) on vscode 1.64.0.

1.63.0 works fine

@aizzi
Copy link

aizzi commented Feb 4, 2022

Same problem here. Was working with vscode this morning. Then had to restart due to windows update. Noticed vscode being updated too. After restart the machine, I can start vscode on Windows (with version 1.64), but when I start it on wsl2 Ubuntu, I get the following error:

(architecture) [Ubuntu]aizzi:~/SourceCode/vas-arch-odcc$ code .
Installing VS Code Server for x64 (5554b12acf27056905806867f251c859323ff7e9)
Downloading: 100%
Unpacking: 100%
Unpacked 2158 files and folders to /home/aizzi/.vscode-server-server/bin/5554b12acf27056905806867f251c859323ff7e9.
/mnt/c/Users/<userid_amended>/.vscode/extensions/ms-vscode-remote.remote-wsl-0.63.13/scripts/wslCode.sh: 69: /home/aizzi/.vscode-server-server/bin/5554b12acf27056905806867f251c859323ff7e9/bin/code: not found

When I looked into the directory, I found the following:

(architecture) [Ubuntu]aizzi:~/.vscode-server-server/bin/5554b12acf27056905806867f251c859323ff7e9/bin$ ls
code-server  helpers  remote-cli

So I tried and copied code-server to code

(architecture) [Ubuntu]aizzi:~/.vscode-server-server/bin/5554b12acf27056905806867f251c859323ff7e9/bin$ ls
code  code-server  helpers  remote-cli

and with that I was able to start vscode in wsl2 too.

@aurora6174
Copy link

I'm having the exact same issue as @JoChaw

@eabase
Copy link

eabase commented Feb 4, 2022

This is named very weird: /.vscode-server-server/. I've seen a similar problem recently. But don't know how to reproduce

@tksst
Copy link

tksst commented Feb 6, 2022

I'm having trouble encountering the same bug.

  • VSCode Version: 1.64.0 (Remote SSH v0.70.0 / Remote Containers v0.217.1)
  • Local OS Version: Windows 10 20H2
  • Remote OS Version (SSH) : Ubuntu 21.10
  • Remote OS Version (Container) : Alpine 3.14.0 or Debian Bullseye or NodeJs 16-Bullseye
  • Remote Extension/Connection Type: Docker

Both the local machine and the remote machine are behind the http proxy.

Steps to Reproduce:

  1. Open a VSCode winow.
  2. With "Remote-SSH: Connect to Host..." connect to the remote linux machine.
  3. With "Remote-Containers; Open Folder in Container..." open any empty folder and select a Alpine 3.14.0 or Debina bullseye or Node.js16-bullseye.

I uninstalled vscode and installed vscode 1.63.2, then works fine.

@aurora6174
Copy link

Same problem here. Was working with vscode this morning. Then had to restart due to windows update. Noticed vscode being updated too. After restart the machine, I can start vscode on Windows (with version 1.64), but when I start it on wsl2 Ubuntu, I get the following error:

(architecture) [Ubuntu]aizzi:~/SourceCode/vas-arch-odcc$ code .
Installing VS Code Server for x64 (5554b12acf27056905806867f251c859323ff7e9)
Downloading: 100%
Unpacking: 100%
Unpacked 2158 files and folders to /home/aizzi/.vscode-server-server/bin/5554b12acf27056905806867f251c859323ff7e9.
/mnt/c/Users/<userid_amended>/.vscode/extensions/ms-vscode-remote.remote-wsl-0.63.13/scripts/wslCode.sh: 69: /home/aizzi/.vscode-server-server/bin/5554b12acf27056905806867f251c859323ff7e9/bin/code: not found

When I looked into the directory, I found the following:

(architecture) [Ubuntu]aizzi:~/.vscode-server-server/bin/5554b12acf27056905806867f251c859323ff7e9/bin$ ls
code-server  helpers  remote-cli

So I tried and copied code-server to code

(architecture) [Ubuntu]aizzi:~/.vscode-server-server/bin/5554b12acf27056905806867f251c859323ff7e9/bin$ ls
code  code-server  helpers  remote-cli

and with that I was able to start vscode in wsl2 too.

I replicated these steps and it works just fine!

@EricHripko
Copy link

Hey folks! This appears to render Remote - Containers workflows unusable if your device is behind a proxy (with only downgrade being the only know fix 🙁). Is there any ETA for when this might be fixed?

@vytautas-petrikas
Copy link

vytautas-petrikas commented Feb 8, 2022

It looks like behavior of the extension has changed... It no longer downloads VS Code Server locally and instead tries to download it on the remote machine.

This is related to:
#6299
Please vote on:
#6274

@eitsupi
Copy link
Author

eitsupi commented Feb 8, 2022

My containers are supposed to be configured with Proxy settings on the Docker host, so it can connect to the Internet (otherwise it wouldn't be able to build Docker images).
Does that mean that the proxy settings are not respected? I don't know...

In any case it looks like I will have to stay at 1.63 for a while.

@chrmarti
Copy link
Contributor

chrmarti commented Feb 8, 2022

Tracked as microsoft/vscode#142201.

You could give the latest pre-release of Remote-Containers (0.219.0) a try. That falls back to downloading the server via Electron which is not affected by this bug. (Coincidental timing with this issue.)

Switch to the pre-release version if you haven't:
image

@chrmarti chrmarti closed this as completed Feb 8, 2022
@EricHripko
Copy link

Can confirm that 1.64.2 fixed the issue for me, thank you 🙌

@github-actions github-actions bot locked and limited conversation to collaborators Mar 25, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
containers Issue in vscode-remote containers
Projects
None yet
Development

No branches or pull requests

9 participants