vscode: SSH/DevContainer Port Forwarding broken
Does this issue occur when all extensions are disabled?: Yes/No
Version: 1.82.0-insider (system setup)
Commit: 3cd6f481266dcbd2ca2fcff43b4465d747c78e2f
Date: 2023-08-31T17:34:55.916Z
Electron: 25.7.0
ElectronBuildId: 23434598
Chromium: 114.0.5735.289
Node.js: 18.15.0
V8: 11.4.183.29-electron.0
OS: Windows_NT x64 10.0.22621
Issue similar to #190859 - this time it affects Devcontainers running on remote ssh hosts ⚠️
Client: Windows 11 Remote-Host: Ubuntu 22.04 Container: Debian 11 Repo for reproduction: https://github.com/gecio/gecio.github.io
Steps to Reproduce:
- Connect to ssh host
- Clone Repo
- Open in devcontainer when asked
- Launch Task “Serve” to start webserver
- Open http://localhost:4000 and see indefinite loading.
I can’t test it without the remote ssh host 😕
Shared-Log
2023-09-01 00:51:07.658 [info] [SharedProcessTunnelService] Created tunnel 1: 127.0.0.1:64076 (local) to 127.0.0.1:7863 (remote).
2023-09-01 00:51:07.673 [info] [SharedProcessTunnelService] Created tunnel 2: 127.0.0.1:33761 (local) to 127.0.0.1:33761 (remote).
2023-09-01 00:51:07.833 [info] [SharedProcessTunnelService] Created tunnel 3: localhost:4000 (local) to localhost:4000 (remote).
2023-09-01 00:51:07.834 [info] [SharedProcessTunnelService] Created tunnel 4: localhost:35729 (local) to localhost:35729 (remote).
2023-09-01 00:51:09.216 [info] Getting Manifest... ms-vscode-remote.remote-containers
2023-09-01 00:51:09.313 [info] Installing extension: ms-vscode-remote.remote-containers
2023-09-01 00:51:10.103 [info] Extension signature is verified: ms-vscode-remote.remote-containers
2023-09-01 00:51:10.426 [info] Extracted extension to file:///c%3A/Users/max06/.vscode-insiders/extensions/ms-vscode-remote.remote-containers-0.308.0: ms-vscode-remote.remote-containers
2023-09-01 00:51:10.432 [info] Renamed to c:\Users\max06\.vscode-insiders\extensions\ms-vscode-remote.remote-containers-0.308.0
2023-09-01 00:51:10.439 [info] Extracting extension completed. ms-vscode-remote.remote-containers
2023-09-01 00:51:10.463 [info] Extension installed successfully: ms-vscode-remote.remote-containers
2023-09-01 00:51:10.469 [info] Marked extension as uninstalled ms-vscode-remote.remote-containers-0.307.0
2023-09-01 00:51:12.628 [info] [SharedProcessTunnelService] Created tunnel 5: 127.0.0.1:42025 (local) to 127.0.0.1:42025 (remote).
2023-09-01 00:51:30.294 [info] Creating a socket (renderer-Tunnel-f2cc70c7-d306-4708-b542-3bfdd2cb513f)...
2023-09-01 00:51:30.416 [info] Creating a socket (renderer-Tunnel-f2cc70c7-d306-4708-b542-3bfdd2cb513f) was successful after 123 ms.
2023-09-01 00:51:30.957 [info] Creating a socket (renderer-Tunnel-57cbefc6-cb29-42ef-89ac-2ff5873ad23a)...
2023-09-01 00:51:31.049 [info] Creating a socket (renderer-Tunnel-57cbefc6-cb29-42ef-89ac-2ff5873ad23a) was successful after 93 ms.
2023-09-01 00:51:31.223 [info] Creating a socket (renderer-Tunnel-d3fcfdea-adbf-44f9-a6da-2d1089f1c7fd)...
2023-09-01 00:51:31.311 [info] Creating a socket (renderer-Tunnel-d3fcfdea-adbf-44f9-a6da-2d1089f1c7fd) was successful after 90 ms.
2023-09-01 00:56:31.298 [info] Creating a socket (renderer-Tunnel-ec10ac1a-bbec-46d3-bb84-2667f176bf2f)...
2023-09-01 00:56:31.400 [info] Creating a socket (renderer-Tunnel-ec10ac1a-bbec-46d3-bb84-2667f176bf2f) was successful after 101 ms.
2023-09-01 00:58:16.519 [info] Creating a socket (renderer-Tunnel-bebfb153-c346-414c-bdcf-e567fb8e8bf6)...
2023-09-01 00:58:16.623 [info] Creating a socket (renderer-Tunnel-bebfb153-c346-414c-bdcf-e567fb8e8bf6) was successful after 104 ms.
2023-09-01 00:58:16.783 [info] Creating a socket (renderer-Tunnel-54b3ca0c-f89e-4827-bd48-d42869c6094f)...
2023-09-01 00:58:16.891 [info] Creating a socket (renderer-Tunnel-54b3ca0c-f89e-4827-bd48-d42869c6094f) was successful after 109 ms.
Dev console doesn’t contain anything related.
The extension host shows:
2023-09-01 00:53:21.861 [error] Error: read ECONNRESET
at TCP.onStreamRead (node:internal/stream_base_commons:217:20)
2023-09-01 00:53:21.861 [error] Error: read ECONNRESET
at TCP.onStreamRead (node:internal/stream_base_commons:217:20)
2023-09-01 00:53:21.985 [error] Error: read ECONNRESET
at TCP.onStreamRead (node:internal/stream_base_commons:217:20)
2023-09-01 00:53:22.031 [error] Error: read ECONNRESET
at TCP.onStreamRead (node:internal/stream_base_commons:217:20)
2023-09-01 00:53:22.451 [error] Error: read ECONNRESET
at TCP.onStreamRead (node:internal/stream_base_commons:217:20)
Although I’m not sure if that’s related.
The server output is interesting:
2023-08-31 23:03:58.609 [error] Error: connect ECONNREFUSED ::1:4000
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1494:16)
2023-08-31 23:03:58.870 [error] Error: connect ECONNREFUSED ::1:4000
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1494:16)
This is directly related - it happens right/shortly after opening the url in the browser.
About this issue
- Original URL
- State: closed
- Created 10 months ago
- Comments: 17 (17 by maintainers)
Commits related to this issue
- tunnels: try to connect localhost to both ipv6 and ipv4 See context here https://github.com/microsoft/vscode/issues/191945#issuecomment-1701899793 — committed to microsoft/vscode by connor4312 10 months ago
- tunnels: try to connect localhost to both ipv6 and ipv4 See context here https://github.com/microsoft/vscode/issues/191945#issuecomment-1701899793 — committed to microsoft/vscode by connor4312 10 months ago
- Fixes #191945: Enable the family autodetection algorithm to support a case where localhost resolves first to the ipv6 address and only second to the ipv4 address, and the desired server listens only o... — committed to microsoft/vscode by alexdima 10 months ago
- Fixes #191945: Enable the family autodetection algorithm to support a case where localhost resolves first to the ipv6 address and only second to the ipv4 address, and the desired server listens only o... — committed to microsoft/vscode by alexdima 10 months ago
- Enable the family autodetection algorithm (#191970) Fixes #191945: Enable the family autodetection algorithm to support a case where localhost resolves first to the ipv6 address and only second to th... — committed to microsoft/vscode by alexdima 10 months ago
- Enable the family autodetection algorithm (#191971) Fixes #191945: Enable the family autodetection algorithm to support a case where localhost resolves first to the ipv6 address and only second to th... — committed to microsoft/vscode by alexdima 10 months ago
The code that sets up a tunnel executes in the server process, where it tries to
connect
tolocalhost
, so that is why the extension host flag doesn’t have any effect. I also like the idea of using node’s builtinautoSelectFamily
rather than us reimplementing it.