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

"Connecting with SSH timed out" when open Remote Workspace #7324

Closed
giahung24 opened this issue Oct 11, 2022 · 50 comments · Fixed by microsoft/vscode#165742
Closed

"Connecting with SSH timed out" when open Remote Workspace #7324

giahung24 opened this issue Oct 11, 2022 · 50 comments · Fixed by microsoft/vscode#165742
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug important Issue identified as high-priority ssh Issue in vscode-remote SSH verified Verification succeeded
Milestone

Comments

@giahung24
Copy link

Hello,

After the last VSCode update, I have this strange bug. I still can connect to host with Remote-SSH, by clicking "Connect to host" or "Connect current window to host", but when I tried to open a saved workspace (from file on remote), the extension has an "Timed out" error.
Oddly, if I create a new workspace and save as a new file (on remote), I can reconnect to this new workspace few times after this creation, but after a while, the same error occurs again.

  • VSCode Version: 1.72.0
  • Local OS Version: Windows 10
  • Remote OS Version: Debian GNU/Linux 8
  • Remote Extension/Connection Type: Remote-SSH
  • Log: 1st comment below
    In the log, we can see there is "got some output, clearing connection timeout" very far after several Timed out errors.

Does this issue occur when you try this locally?: N/A
Does this issue occur when you try this locally and all extensions are disabled?: Yes

@giahung24
Copy link
Author

Log here

[12:01:16.064] Log Level: 2
[12:01:16.064] remote-ssh@0.84.0
[12:01:16.064] win32 x64
[12:01:16.100] SSH Resolver called for "ssh-remote+my-sandbox", attempt 1
[12:01:16.100] "remote.SSH.useLocalServer": false
[12:01:16.101] "remote.SSH.showLoginTerminal": false
[12:01:16.101] "remote.SSH.remotePlatform": {"my-sandbox":"linux"}
[12:01:16.101] "remote.SSH.path": undefined
[12:01:16.101] "remote.SSH.configFile": undefined
[12:01:16.101] "remote.SSH.useFlock": true
[12:01:16.101] "remote.SSH.lockfilesInTmp": false
[12:01:16.101] "remote.SSH.localServerDownload": auto
[12:01:16.101] "remote.SSH.remoteServerListenOnSocket": false
[12:01:16.102] "remote.SSH.showLoginTerminal": false
[12:01:16.102] "remote.SSH.defaultExtensions": []
[12:01:16.102] "remote.SSH.loglevel": 2
[12:01:16.102] "remote.SSH.enableDynamicForwarding": true
[12:01:16.102] "remote.SSH.enableRemoteCommand": false
[12:01:16.102] "remote.SSH.serverPickPortsFromRange": {}
[12:01:16.102] "remote.SSH.serverInstallPath": {}
[12:01:16.106] SSH Resolver called for host: my-sandbox
[12:01:16.106] Setting up SSH remote "my-sandbox"
[12:01:16.110] Using commit id "64bbfbf67ada9953918d72e1df2f4d8e537d340e" and quality "stable" for server
[12:01:16.114] Install and start server if needed
[12:01:16.117] Checking ssh with "ssh -V"
[12:01:16.174] > OpenSSH_for_Windows_8.1p1, LibreSSL 3.0.2

[12:01:16.179] Running script with connection command: ssh -T -D 64901 "my-sandbox" bash
[12:01:16.180] Terminal shell path: C:\WINDOWS\System32\cmd.exe
[12:01:33.183] Resolver error: Error: Connecting with SSH timed out
	at g.Timeout (c:\Users\gh.ng\.vscode\extensions\ms-vscode-remote.remote-ssh-0.84.0\out\extension.js:1:585348)
	at Timeout._onTimeout (c:\Users\gh.ng\.vscode\extensions\ms-vscode-remote.remote-ssh-0.84.0\out\extension.js:1:679743)
	at listOnTimeout (node:internal/timers:559:17)
	at process.processTimers (node:internal/timers:502:7)
[12:01:33.192] ------




[12:01:33.214] ------




[12:01:33.214] SSH Resolver called for "ssh-remote+my-sandbox", attempt 2, (Reconnection)
[12:01:33.216] SSH Resolver called for host: my-sandbox
[12:01:33.216] Setting up SSH remote "my-sandbox"
[12:01:33.218] Using commit id "64bbfbf67ada9953918d72e1df2f4d8e537d340e" and quality "stable" for server
[12:01:33.222] Install and start server if needed
[12:01:33.226] Running script with connection command: ssh -T -D 64909 "my-sandbox" bash
[12:01:33.227] Terminal shell path: C:\WINDOWS\System32\cmd.exe
[12:01:37.797] ConfigFileWatcher: start watching file:///c%3A/Users/gh.ng/.ssh/config
[12:01:37.797] ConfigFileWatcher: adding save listener
[12:01:37.797] ConfigFileWatcher: adding close listener
[12:01:50.236] Resolver error: Error: Connecting with SSH timed out
	at g.Timeout (c:\Users\gh.ng\.vscode\extensions\ms-vscode-remote.remote-ssh-0.84.0\out\extension.js:1:585348)
	at Timeout._onTimeout (c:\Users\gh.ng\.vscode\extensions\ms-vscode-remote.remote-ssh-0.84.0\out\extension.js:1:679743)
	at listOnTimeout (node:internal/timers:559:17)
	at process.processTimers (node:internal/timers:502:7)
[12:01:50.240] ------




[12:01:50.248] ------




[12:01:50.248] SSH Resolver called for "ssh-remote+my-sandbox", attempt 3, (Reconnection)
[12:01:50.249] SSH Resolver called for host: my-sandbox
[12:01:50.250] Setting up SSH remote "my-sandbox"
[12:01:50.251] Using commit id "64bbfbf67ada9953918d72e1df2f4d8e537d340e" and quality "stable" for server
[12:01:50.253] Install and start server if needed
[12:01:50.256] Running script with connection command: ssh -T -D 64916 "my-sandbox" bash
[12:01:50.257] Terminal shell path: C:\WINDOWS\System32\cmd.exe
[12:02:07.268] Resolver error: Error: Connecting with SSH timed out
	at g.Timeout (c:\Users\gh.ng\.vscode\extensions\ms-vscode-remote.remote-ssh-0.84.0\out\extension.js:1:585348)
	at Timeout._onTimeout (c:\Users\gh.ng\.vscode\extensions\ms-vscode-remote.remote-ssh-0.84.0\out\extension.js:1:679743)
	at listOnTimeout (node:internal/timers:559:17)
	at process.processTimers (node:internal/timers:502:7)
[12:02:07.273] ------




[12:02:07.302] ------




[12:02:07.302] SSH Resolver called for "ssh-remote+my-sandbox", attempt 4, (Reconnection)
[12:02:07.303] SSH Resolver called for host: my-sandbox
[12:02:07.303] Setting up SSH remote "my-sandbox"
[12:02:07.305] Using commit id "64bbfbf67ada9953918d72e1df2f4d8e537d340e" and quality "stable" for server
[12:02:07.306] Install and start server if needed
[12:02:07.310] Running script with connection command: ssh -T -D 64923 "my-sandbox" bash
[12:02:07.311] Terminal shell path: C:\WINDOWS\System32\cmd.exe
[12:02:24.325] Resolver error: Error: Connecting with SSH timed out
	at g.Timeout (c:\Users\gh.ng\.vscode\extensions\ms-vscode-remote.remote-ssh-0.84.0\out\extension.js:1:585348)
	at Timeout._onTimeout (c:\Users\gh.ng\.vscode\extensions\ms-vscode-remote.remote-ssh-0.84.0\out\extension.js:1:679743)
	at listOnTimeout (node:internal/timers:559:17)
	at process.processTimers (node:internal/timers:502:7)
[12:02:24.330] ------




[12:02:24.363] ------




[12:02:24.363] SSH Resolver called for "ssh-remote+my-sandbox", attempt 5, (Reconnection)
[12:02:24.364] SSH Resolver called for host: my-sandbox
[12:02:24.364] Setting up SSH remote "my-sandbox"
[12:02:24.366] Using commit id "64bbfbf67ada9953918d72e1df2f4d8e537d340e" and quality "stable" for server
[12:02:24.369] Install and start server if needed
[12:02:24.372] Running script with connection command: ssh -T -D 64930 "my-sandbox" bash
[12:02:24.374] Terminal shell path: C:\WINDOWS\System32\cmd.exe
[12:02:41.389] Resolver error: Error: Connecting with SSH timed out
	at g.Timeout (c:\Users\gh.ng\.vscode\extensions\ms-vscode-remote.remote-ssh-0.84.0\out\extension.js:1:585348)
	at Timeout._onTimeout (c:\Users\gh.ng\.vscode\extensions\ms-vscode-remote.remote-ssh-0.84.0\out\extension.js:1:679743)
	at listOnTimeout (node:internal/timers:559:17)
	at process.processTimers (node:internal/timers:502:7)
[12:02:41.391] ------




[12:02:41.550] ConfigFileWatcher: closing file:///c%3A/Users/gh.ng/.ssh/config
[12:02:41.550] ConfigFileWatcher: stop watching file:///c%3A/Users/gh.ng/.ssh/config
[12:02:41.550] ConfigFileWatcher: removing save listener
[12:02:41.551] ConfigFileWatcher: removing close listener
[12:02:44.015] > �]0;C:\WINDOWS\System32\cmd.exe�
[12:02:44.015] Got some output, clearing connection timeout
[12:02:44.211] > �]0;C:\WINDOWS\System32\cmd.exe�
[12:02:44.212] Got some output, clearing connection timeout
[12:02:44.311] > #
[12:02:44.328] > #########################################################################
> #           :o.                                 .o+                     #
> #           -s/o:                             `o+.y                     #
> #
[12:02:44.344] > #           .s `-o/`                         /s-` o-                    #
> #            h````-++`                     .s/-`` :o                    #
> #            h` ` ` ./+-                  /s:.`````h                    #
> #            s- ```````/+-              `s+:.` ` ` y.                   #
> #            //` ` ` ` ``:o:           -s/--`` ````+:                   #
> #            .s` ` ` ` ` ``:o/        /o:--.``` ```-o                   #
> #             h`````````` ` `-o/`    oo-:-- ` ` ` ``y                   #
> #             o-` ` ` ` ` ` ` `-o/``s/----``````````h                   #
> #             -o` ``````
[12:02:44.356] > #             -o` ```````````````:oh/--:-- ` ` ` ` `h                   #
> #              h`` ` ` ` ` ` ` ` ``:o+-:-. ` ` ` ```y`                  #
> #              +:` ` ` ` -.` ````````/s/-```````` ``y`                  #
> #              .y```````+:o+/+` ` ` ` .+o`` ` ` ` ` y`                  #
> #               s.` ` ` -h`:++- ` ` ` ``:.``````````y`                  #
> #               -o` ````:o:s.``````````` ``` ` ` ` `h                   #
> #                y.````````. ` ` ` ` ` ` ` ` ` ` ` `h                   #
> #                -o````.`.`.`.`````` ` `````````` `.s                   #
> #                 y.````` ` ` ``````.`.`.`.```` ` `//                   #
> #                 -o` ` ` ` ` ``
[12:02:44.371] > #                 -o` ` ` ` ` ``` ` ` ` ` ``..--::/s.                   #
> #                  s- ` ` `-/+oooo/:://++ossssyyyyhh-                   #
> #                  .y:://+so/-...-/sdyyyssssyhssshyyyo.                 #
> #                 .+dyyyymo+/     `-+dssssssho ../dssyy+`               #
> #              ./yddysssyd+so      .:dssssssyh+:/hdysssyy/`             #
> #            .oyhdyssssssdo-`     `-odyyssssyhhddhyssssssys-            #
> #          .oyyhdysssyyssyhy/:...:/ydhyssssssssssssssssso+/oo.          #
> #        `/yyyhdyssyhyysssyhddhhhhddhyyssssssssssssso+///////o+`        #
> #       .sysyhdysyhdmssssssyyyhhhhhhysssssssssssso+///+ooo////+s/`      #
> #      -hysyhdysydhhdsssyhssssssssssssssssssso+///////dmhsy+////+s:     #
> #     .hysyymysymhydyssyddhsssssssssssssso++//////////smNmyss/////oo-   #       
> #    `hyssydhsymhyhhssydysdhsssssssssso+///////////////+hNNhys//////so. #       
[12:02:44.380] > 
> #    +hssyhdssdhyhhsshdysssdhysssso++////+hys+//////////+yhhs+//////+s/ #       
> #    dyysodysydyyysyhhsssssdshyo+////////+mmhys//////////osso/////+o:`  #       
> #    -.` `dsshyssshdysssssshy/ss+/////////+hmmys///////////////+o/.     #       
[12:02:44.386] > 
> #        /hssyssydhsssssssyyo/+yyy+/////////sys+///////////+o+:.        #       
> #        syssyys/-:ssssssyd--o+:-shyy+//////+o+///////+oo+/-`           #       
> #        yyyy+.    shsssssydo``.+o:-ohyysssssoooooo+//-.                #
> #        //.       :dyssssshy+/y:`   d.:hs+//-`                         #       
> #                   .+sysssssym:`   :s` s-                              #       
[12:02:44.396] > 
> #                      /ssooosshs+.-h-` s-                              #       
> #                             `::/osooo+s.                              #       
> #-----------------------------------------------------------------------#       
[12:02:44.400] > 
> #                                                                       #       
> #                 Any connection attempt is recorded                    #       
> #             Any unauthorized access will be punished                  #       
> #                                                                       #       
> #########################################################################
[12:02:44.419] > 
[12:02:44.517] > �]0;C:\WINDOWS\System32\cmd.exe�
[12:02:44.517] Got some output, clearing connection timeout
[12:02:44.554] > #
[12:02:44.554] > 7b51ed843043: running
[12:02:44.571] > #########################################################################
> #           :o.                                 .o+                     #
> #           -s/o:                             `o+.y                     #
> #           .s `-o/`                         /s-` o-                    #
> #            h````-++`                     .s/-`` :o                    #
> #            h` ` ` ./+-                  /s:.`````h                    #
> #            s- ```````/+-              `s+:.` ` ` y.                   #
> #            //` ` ` ` ``:o:           -s/--`` ````+:                   #
> #            .s` ` ` ` ` ``:o/        /o:--.``` ```-o
[12:02:44.586] > #            .s` ` ` ` ` ``:o/        /o:--.``` ```-o                   #
> #             h`````````` ` `-o/`    oo-:-- ` ` ` ``y                   #
> #             o-` ` ` ` ` ` ` `-o/``s/----``````````h                   #
> #             -o` ```````````````:oh/--:-- ` ` ` ` `h                   #
> #              h`` ` ` ` ` ` ` ` ``:o+-:-. ` ` ` ```y`                  #
> #              +:` ` ` ` -.` ````````/s/-```````` ``y`                  #
> #              .y```````+:o+/+` ` ` ` .+o`` ` ` ` ` y`                  #
> #               s.` ` ` -h`:++- ` ` ` ``:.``````````y`                  #
> #               -o` ````:o:s.``````````` ``` ` ` ` `h                   #
> #
[12:02:44.602] > #                y.````````. ` ` ` ` ` ` ` ` ` ` ` `h                   #
> #                -o````.`.`.`.`````` ` `````````` `.s                   #
> #                 y.````` ` ` ``````.`.`.`.```` ` `//                   #
> #                 -o` ` ` ` ` ``` ` ` ` ` ``..--::/s.                   #
> #                  s- ` ` `-/+oooo/:://++ossssyyyyhh-                   #
> #                  .y:://+so/-...-/sdyyyssssyhssshyyyo.                 #
> #                 .+dyyyymo+/     `-+dssssssho ../dssyy+`               #
> #              ./yddysssyd+so      .:dssssssyh+:/hdysssyy/`             #
> #            .oyhdyssssssdo-`     `-odyyssssyhhddhyssssssys-            #
> #          .oyyhdysssyyssyh#          .oyyhdysssyyssyhy/:...:/ydhyssssssssssssssssso+/oo.          #
> #        `/yyyhdyssyhyysssyhddhhhhddhyyssssssssssssso+///////o+`        #
> #       .sysyhdysyhdmssssssyyyhhhhhhysssssssssssso+///+ooo////+s/`      #
> #      -hysyhdysydhhdsssyhssssssssssssssssssso+///////dmhsy+////+s:     #
[12:02:44.612] > 
> #     .hysyymysymhydyssyddhsssssssssssssso++//////////smNmyss/////oo-   #       
> #    `hyssydhsymhyhhssydysdhsssssssssso+///////////////+hNNhys//////so. #       
> #    +hssyhdssdhyhhsshdysssdhysssso++////+hys+//////////+yhhs+//////+s/ #       
[12:02:44.614] > Acquiring lock on /home/CDXXX/gh.ng/.vscode-server/bin/64bbfbf67ada9953
> 918d72e1df2f4d8e537d340e/vscode-remote-lock.gh.ng.64bbfbf67ada9953918d7
> 2e1df2f4d8e537d340e
[12:02:44.617] > 
> #    dyysodysydyyysyhhsssssdshyo+////////+mmhys//////////osso/////+o:`  #       
> #    -.` `dsshyssshdysssssshy/ss+/////////+hmmys///////////////+o/.     #
> #        /hssyssydhsssssssyyo/+yyy+/////////sys+///////////+o+:.        #       
> #        syssyys/-:ssssssyd--o+:-shyy+//////+o+///////+oo+/-`           #       
> #        yyyy+.    shsssssydo``.+o:-ohyysssssoooooo+//-.                #       
[12:02:44.619] > Found existing installation at /home/CDXXX/gh.ng/.vscode-server/bin/64b
> bfbf67ada9953918d72e1df2f4d8e537d340e...
> Checking /home/CDXXX/gh.ng/.vscode-server/.64bbfbf67ada9953918d72e1df2f
> 4d8e537d340e.log and /home/CDXXX/gh.ng/.vscode-server/.64bbfbf67ada9953
> 918d72e1df2f4d8e537d340e.pid for a running server
> Looking for server with pid: 35372
[12:02:44.628] > 
> #        //.       :dyssssshy+/y:`   d.:hs+//-`                         #       
> #                   .+sysssssym:`   :s` s-                              #       
> #                      /ssooosshs+.-h-` s-                              #       
> #                             `::/osooo+s.                              #       
[12:02:44.632] > 
> #-----------------------------------------------------------------------#       
> #                                                                       #
> #                 Any connection attempt is recorded                    #       
> #             Any unauthorized access will be punished                  #       
> #                                                                       #       
> #########################################################################       
[12:02:44.633] > 
[12:02:44.649] > 
[12:02:44.775] > Starting server with command... /home/CDXXX/gh.ng/.vscode-server/bin/64
> bbfbf67ada9953918d72e1df2f4d8e537d340e/bin/code-server --start-server --host=127
> .0.0.1 --accept-server-license-terms --enable-remote-auto-shutdown --port=0 --te
> lemetry-level all   &> "/home/CDXXX/gh.ng/.vscode-server/.64bbfbf67ada9
> 953918d72e1df2f4d8e537d340e.log" < /dev/null
> printenv:
>     SHELL=/bin/bash
>     SSH_CLIENT=10.10.209.141 64947 22
>     USER=gh.ng
>     VSCODE_AGENT_FOLDER=/home/CDXXX/gh.ng/.vscode-server
>     PATH=/usr/local/bin:/usr/bin:/bin:/usr/games
>     MAIL=/var/mail/gh.ng
>     PWD=/home/CDXXX/gh.ng
>     LANG=fr_FR.UTF-8
>     HOME=/home/CDXXX/gh.ng
>     SHLVL=2
>     LOGNAME=gh.ng
>     SSH_CONNECTION=10.10.209.141 64947 10.10.146.44 22
>     _=/usr/bin/printenv
> Removing old logfile at /home/CDXXX/gh.ng/.vscode-server/.64bbfbf67ada9
> 953918d72e1df2f4d8e537d340e.log
> Spawned remote server: 64670
> Waiting for server log...
[12:02:44.775] > 49d15bd4d70e: running
[12:02:44.801] > Waiting for server log...
[12:02:44.820] > #
[12:02:44.821] > Acquiring lock on /home/CDXXX/gh.ng/.vscode-server/bin/64bbfbf67ada9953
> 918d72e1df2f4d8e537d340e/vscode-remote-lock.gh.ng.64bbfbf67ada9953918d7
> 2e1df2f4d8e537d340e
> Installation already in progress...
> If you continue to see this message, you can try toggling the remote.SSH.useFloc
> k setting
> 49d15bd4d70e: start
> exitCode==24==
> listeningOn====
> osReleaseId==debian==
> arch==x86_64==
> tmpDir==/tmp==
> platform==linux==
> unpackResult====
> didLocalDownload==0==
> downloadTime====
> installTime====
> extInstallTime====
> serverStartTime====
> 49d15bd4d70e: end
[12:02:44.821] > �]0;C:\WINDOWS\System32\cmd.exe�
[12:02:44.821] Got some output, clearing connection timeout
[12:02:44.831] > 
[12:02:44.832] > #########################################################################
> #           :o.                                 .o+                     #
> #           -s/o:                             `o+.y                     #
> #           .s `-o/`                         /s-` o-                    #
> #            h````-++`
[12:02:44.836] > Waiting for server log...
[12:02:44.846] > #            h````-++`                     .s/-`` :o                    #
> #            h` ` ` ./+-                  /s:.`````h                    #
> #            s- ```````/+-              `s+:.` ` ` y.                   #
> #            //` ` ` ` ``:o:           -s/--`` ````+:                   #
> #            .s` ` ` ` ` ``:o/        /o:--.``` ```-o                   #
> #             h`````````` ` `-o/`    oo-:-- ` ` ` ``y                   #
> #             o-` ` ` ` ` ` ` `-o/``s/----``````````h                   #
> #             -o` ```````````````:oh/--:-- ` ` ` ` `h                   #
> #              h`` ` ` ` ` ` ` ` ``:o+-:-. ` ` ` ```y`                  #
> #              +:` ` ` ` -.` ````````/s/-`
[12:02:44.861] > #              +:` ` ` ` -.` ````````/s/-```````` ``y`                  #
> #              .y```````+:o+/+` ` ` ` .+o`` ` ` ` ` y`                  #
> #               s.` ` ` -h`:++- ` ` ` ``:.``````````y`                  #
> #               -o` ````:o:s.``````````` ``` ` ` ` `h                   #
> #                y.````````. ` ` ` ` ` ` ` ` ` ` ` `h                   #
> #                -o````.`.`.`.`````` ` `````````` `.s                   #
> #                 y.````` ` ` ``````.`.`.`.```` ` `//                   #
> #                 -o` ` ` ` ` ``` ` ` ` ` ``..--::/s.                   #
> #                  s- ` ` `-/+oooo/:://++ossssyyyyhh-                   #
> #                  .y:://+so/-...-/sdyyyssssyhssshyyyo.
[12:02:44.873] > #                  .y:://+so/-...-/sdyyyssssyhssshyyyo.                 #
> #                 .+dyyyymo+/     `-+dssssssho ../dssyy+`               #
> #              ./yddysssyd+so      .:dssssssyh+:/hdysssyy/`             #
> #            .oyhdyssssssdo-`     `-odyyssssyhhddhyssssssys-            #
> #          .oyyhdysssyyssyhy/:...:/ydhyssssssssssssssssso+/oo.          #
> #        `/yyyhdyssyhyysssyhddhhhhddhyyssssssssssssso+///////o+`        #
> #       .sysyhdysyhdmssssssyyyhhhhhhysssssssssssso+///+ooo////+s/`      #
> #      -hysyhdysydhhdsssyhssssssssssssssssssso+///////dmhsy+////+s:     #
> #     .hysyymysymhydyssyddhsssssssssssssso++//////////smNmyss/////oo-   #       
> #    `hyssydhsymhyhhssydysdhsssssssssso+///////////////+hNNhys//////so. #
[12:02:44.878] >  
> *
> * Reminder: You may only use this software with Visual Studio family products,
> * as described in the license (https://go.microsoft.com/fwlink/?linkid=2077057) 
> *
> 
> 7b51ed843043: start
> SSH_AUTH_SOCK====
> DISPLAY====
> webUiAccessToken====
> listeningOn==38715==
> osReleaseId==debian==
> arch==x86_64==
> tmpDir==/tmp==
> platform==linux==
[12:02:44.878] > 
> #    +hssyhdssdhyhhsshdysssdhysssso++////+hys+//////////+yhhs+//////+s/ #       
> #    dyysodysydyyysyhhsssssdshyo+////////+mmhys//////////osso/////+o:`  #       
> #    -.` `dsshyssshdysssssshy/ss+/////////+hmmys///////////////+o/.     #       
[12:02:44.882] > 
> unpackResult====
> didLocalDownload==0==
> downloadTime====
> installTime====
> extInstallTime====
> serverStartTime==116==
> connectionToken==aa1a1aa1-11aa-1a11-11a1-111111111a1a==
> 7b51ed843043: end
[12:02:44.884] > 
> #        /hssyssydhsssssssyyo/+yyy+/////////sys+///////////+o+:.        #       
> #        syssyys/-:ssssssyd--o+:-shyy+//////+o+///////+oo+/-`           #       
> #        yyyy+.    shsssssydo``.+o:-ohyysssssoooooo+//-.                #       
> #        //.       :dyssssshy+/y:`   d.:hs+//-`                         #       
[12:02:44.892] > 
> #                   .+sysssssym:` :s` s-                              #
> #                      /ssooosshs+.-h-` s-                              #       
> #                             `::/osooo+s.                              #       
> #-----------------------------------------------------------------------#       
[12:02:44.892] > 
[12:02:44.900] > 
> #                                                                       #       
> #                 Any connection attempt is recorded                    #       
> #             Any unauthorized access will be punished                  #       
> #                                                                       #       
> #########################################################################       
[12:02:44.908] > 
[12:02:45.077] > 249f9af19c28: running
[12:02:45.106] > Acquiring lock on /home/CDXXX/gh.ng/.vscode-server/bin/64bbfbf67ada9953
> 918d72e1df2f4d8e537d340e/vscode-remote-lock.gh.ng.64bbfbf67ada9953918d7
> 2e1df2f4d8e537d340e
[12:02:45.116] > Found existing installation at /home/CDXXX/gh.ng/.vscode-server/bin/64b
> bfbf67ada9953918d72e1df2f4d8e537d340e...
> Checking /home/CDXXX/gh.ng/.vscode-server/.64bbfbf67ada9953918d72e1df2f
> 4d8e537d340e.log and /home/CDXXX/gh.ng/.vscode-server/.64bbfbf67ada9953
> 918d72e1df2f4d8e537d340e.pid for a running server
> Looking for server with pid: 64670
[12:02:45.125] > 
[12:02:45.126] > #
[12:02:45.126] > �]0;C:\WINDOWS\System32\cmd.exe�
[12:02:45.127] Got some output, clearing connection timeout
[12:02:45.142] > #########################################################################
> #           :o.                                 .o+                     #
> #           -s/o:                             `o+.y                     #
> #           .s `-o/`                         /s-` o-                    #
> #            h````-++`                     .s/-`` :o                    #
> #            h` ` ` ./+-                  /s:.`````h
[12:02:45.154] > #            h` ` ` ./+-                  /s:.`````h                    #
> #            s- ```````/+-              `s+:.` ` ` y.                   #
> #            //` ` ` ` ``:o:           -s/--`` ````+:                   #
> #            .s` ` ` ` ` ``:o/        /o:--.``` ```-o                   #
> #             h`````````` ` `-o/`    oo-:-- ` ` ` ``y                   #
> #             o-` ` ` ` ` ` ` `-o/``s/----``````````h                   #
> #             -o` ```````````````:oh/--:-- ` ` ` ` `h                   #
> #              h`` ` ` ` ` ` ` ` ``:o+-:-. ` ` ` ```y`                  #
> #              +:` ` ` ` -.` ````````/s/-```````` ``y`                  #
> #              .y```````+:o+/+` ` ` ` .+o`` ` ` ` ` y`                  #
> #               s.` ` ` -h`
[12:02:45.168] > #               s.` ` ` -h`:++- ` ` ` ``:.``````````y`                  #
> #               -o` ````:o:s.``````````` ``` ` ` ` `h                   #
> #                y.````````. ` ` ` ` ` ` ` ` ` ` ` `h                   #
> #                -o````.`.`.`.`````` ` `````````` `.s                   #
> #                 y.````` ` ` ``````.`.`.`.```` ` `//                   #
> #                 -o` ` ` ` ` ``` ` ` ` ` ``..--::/s.                   #
> #                  s- ` ` `-/+oooo/:://++ossssyyyyhh-                   #
> #                  .y:://+so/-...-/sdyyyssssyhssshyyyo.                 #
> #                 .+dyyyymo+/     `-+dssssssho ../dssyy+`               #
> #              ./yddysssyd+so      .:dssssssy
[12:02:45.179] > #              ./yddysssyd+so      .:dssssssyh+:/hdysssyy/`             #
> #            .oyhdyssssssdo-`     `-odyyssssyhhddhyssssssys-            #
> #          .oyyhdysssyyssyhy/:...:/ydhyssssssssssssssssso+/oo.          #
> #        `/yyyhdyssyhyysssyhddhhhhddhyyssssssssssssso+///////o+`        #
> #       .sysyhdysyhdmssssssyyyhhhhhhysssssssssssso+///+ooo////+s/`      #
> #      -hysyhdysydhhdsssyhssssssssssssssssssso+///////dmhsy+////+s:     #
> #     .hysyymysymhydyssyddhsssssssssssssso++//////////smNmyss/////oo-   #       
> #    `hyssydhsymhyhhssydysdhsssssssssso+///////////////+hNNhys//////so. #       
[12:02:45.186] > 
> #    +hssyhdssdhyhhsshdysssdhysssso++////+hys+//////////+yhhs+//////+s/ #       
> #    dyysodysydyyysyhhsssssdshyo+////////+mmhys//////////osso/////+o:`  #
> #    -.` `dsshyssshdysssssshy/ss+/////////+hmmys///////////////+o/.     #       
> #        /hssyssydhsssssssyyo/+yyy+/////////sys+///////////+o+:.        #       
> #        syssyys/-:ssssssyd--o+:-shyy+//////+o+///////+oo+/-`           #       
[12:02:45.194] > 
> #        yyyy+.    shsssssydo``.+o:-ohyysssssoooooo+//-.                #       
> #        //.       :dyssssshy+/y:`   d.:hs+//-`                         #       
> #                   .+sysssssym:`   :s` s-                              #       
[12:02:45.200] > 
> #                      /ssooosshs+.-h-` s-                              #       
> #                             `::/osooo+s.         #
> #-----------------------------------------------------------------------#       
> #                                                                       #       
> #                 Any connection attempt is recorded                    #       
> #             Any unauthorized access will be punished                  #       
[12:02:45.205] > 
> #                                                                       #       
> #########################################################################       
[12:02:45.216] > 
[12:02:45.234] > 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) 
> *
> 
[12:02:45.249] > 
> Checking server status on port 38715 with wget
[12:02:45.265] > 
[12:02:45.279] > 249f9af19c28: start
> SSH_AUTH_SOCK====
> DISPLAY====
> webUiAccessToken====
> listeningOn==38715==
> osReleaseId==debian==
> arch==x86_64==
> tmpDir==/tmp==
> platform==linux==
> unpackResult====
> didLocalDownload==0==
> downloadTime====
> installTime====
> extInstallTime====
> serverStartTime====
> connectionToken==aa1a1aa1-11aa-1a11-11a1-111111111a1a==
> 249f9af19c28: end
[12:02:45.335] > 2866b3bf4072: running
[12:02:45.393] > Acquiring lock on /home/CDXXX/gh.ng/.vscode-server/bin/64bbfbf67ada9953
> 918d72e1df2f4d8e537d340e/vscode-remote-lock.gh.ng.64bbfbf67ada9953918d7
> 2e1df2f4d8e537d340e
[12:02:45.397] > Found existing installation at /home/CDXXX/gh.ng/.vscode-server/bin/64b
> bfbf67ada9953918d72e1df2f4d8e537d340e...
> Checking /home/CDXXX/gh.ng/.vscode-server/.64bbfbf67ada9953918d72e1df2f
> 4d8e537d340e.log and /home/CDXXX/gh.ng/.vscode-server/.64bbfbf67ada9953
> 918d72e1df2f4d8e537d340e.pid for a running server
> Looking for server with pid: 64670
[12:02:45.412] > #
[12:02:45.424] > 
[12:02:45.424] > #########################################################################
> #           :o.                                 .o+                     #
> #           -s/o:                             `o+.y                     #
> #           .s `-o/`                         /s-` o-                    #
> #            h````-++`                     .s/-`` :o                    #
> #            h` ` ` ./+-                  /s:.`````h                    #
> #            s- ```````/+-              `s+:.` ` ` y.                   #
> #            //
[12:02:45.439] > #            //` ` ` ` ``:o:           -s/--`` ````+:                   #
> #            .s` ` ` ` ` ``:o/        /o:--.``` ```-o                   #
> #             h`````````` ` `-o/`    oo-:-- ` ` ` ``y                   #
> #             o-` ` ` ` ` ` ` `-o/``s/----``````````h                   #
> #             -o` ```````````````:oh/--:-- ` ` ` ` `h                   #
> #              h`` ` ` ` ` ` ` ` ``:o+-:-. ` ` ` ```y`                  #
> #              +:` ` ` ` -.` ````````/s/-```````` ``y`
[12:02:45.457] > #              +:` ` ` ` -.` ````````/s/-```````` ``y`                  #
> #              .y```````+:o+/+` ` ` ` .+o`` ` ` ` ` y`                  #
> #               s.` ` ` -h`:++- ` ` ` ``:.``````````y`                  #
> #               -o` ````:o:s.``````````` ``` ` ` ` `h                   #
> #                y.````````. ` ` ` ` ` ` ` ` ` ` ` `h                   #
> #                -o````.`.`.`.`````` ` `````````` `.s                   #
> #                 y.````` ` ` ``````.`.`.`.```` ` `//                   #
> #                 -o` ` ` ` ` ``` ` ` ` ` ``..--::/s.                   #
> #                  s- ` ` `-/+oooo/:://++ossssyyyyhh-                   #
> #                  .y:://+so/-...-/sdyyyssssyhsss
[12:02:45.466] > #                  .y:://+so/-...-/sdyyyssssyhssshyyyo.                 #
> #                 .+dyyyymo+/     `-+dssssssho ../dssyy+`               #
> #              ./yddysssyd+so      .:dssssssyh+:/hdysssyy/`             #
> #            .oyhdyssssssdo-`     `-odyyssssyhhddhyssssssys-            #
> #          .oyyhdysssyyssyhy/:...:/ydhyssssssssssssssssso+/oo.          #
> #        `/yyyhdyssyhyysssyhddhhhhddhyyssssssssssssso+///////o+`        #
> #       .sysyhdysyhdmssssssyyyhhhhhhysssssssssssso+///+ooo////+s/`      #
> #      -hysyhdysydhhdsssyhssssssssssssssssssso+///////dmhsy+////+s:     #
> #     .hysyymysymhydyssyddhsssssssssssssso++//////////smNmyss/////oo- #
> #    `hyssydhsymhyhhssydysdhsssssssssso+///////////////+hNNhys//////so. #       
[12:02:45.473] > 
> #    +hssyhdssdhyhhsshdysssdhysssso++////+hys+//////////+yhhs+//////+s/ #       
> #    dyysodysydyyysyhhsssssdshyo+////////+mmhys//////////osso/////+o:`  #       
> #    -.` `dsshyssshdysssssshy/ss+/////////+hmmys///////////////+o/.     #       
> #        /hssyssydhsssssssyyo/+yyy+/////////sys+///////////+o+:.        #       
[12:02:45.479] > 
> #        syssyys/-:ssssssyd--o+:-shyy+//////+o+///////+oo+/-`           #       
> #        yyyy+.    shsssssydo``.+o:-ohyysssssoooooo+//-.                #       
[12:02:45.484] > 
> #        //.       :dyssssshy+/y:`   d.:hs+//-`                         #       
> #                   .+sysssssym:`   :s`s-                              #
> #                      /ssooosshs+.-h-` s-                              #       
> #                             `::/osooo+s.                              #       
[12:02:45.493] > 
> #-----------------------------------------------------------------------#       
> #                                                                       #       
> #                 Any connection attempt is recorded                    #       
> #             Any unauthorized access will be punished                  #       
> #                                                                       #       
> #########################################################################       
[12:02:45.500] > 
[12:02:45.538] > 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) 
> *
> 
[12:02:45.547] > 
> Checking server status on port 38715 with wget
[12:02:45.563] > 
> 2866b3bf4072: start
> SSH_AUTH_SOCK====
> DISPLAY====
> webUiAccessToken====
> listeningOn==38715==
> osReleaseId==debian==
> arch==x86_64==
> tmpDir==/tmp==
> platform==linux==
> unpackResult====
> didLocalDownload==0==
> downloadTime====
> installTime====
> extInstallTime====
> serverStartTime====
> connectionToken==aa1a1aa1-11aa-1a11-11a1-111111111a1a==
> 2866b3bf4072: end
[12:02:45.579] > 
[12:02:45.653] > 4eaa4ba00d96: running
[12:02:45.703] > Acquiring lock on /home/CDXXX/gh.ng/.vscode-server/bin/64bbfbf67ada9953
> 918d72e1df2f4d8e537d340e/vscode-remote-lock.gh.ng.64bbfbf67ada9953918d7
> 2e1df2f4d8e537d340e
[12:02:45.709] > Found existing installation at /home/CDXXX/gh.ng/.vscode-server/bin/64b
> bfbf67ada9953918d72e1df2f4d8e537d340e...
> Checking /home/CDXXX/gh.ng/.vscode-server/.64bbfbf67ada9953918d72e1df2f
> 4d8e537d340e.log and /home/CDXXX/gh.ng/.vscode-server/.64bbfbf67ada9953
> 918d72e1df2f4d8e537d340e.pid for a running server
> Looking for server with pid: 64670
[12:02:45.726] > 
[12:02:45.834] > 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) 
> *
> 
[12:02:45.849] > 
> Checking server status on port 38715 with wget
[12:02:45.860] > 4eaa4ba00d96: start
> SSH_AUTH_SOCK====
> DISPLAY====
> webUiAccessToken====
> listeningOn==38715==
> osReleaseId==debian==
> arch==x86_64==
> tmpDir==/tmp==
> platform==linux==
> unpackResult====
> didLocalDownload==0==
> downloadTime====
> installTime====
> extInstallTime====
> serverStartTime====
> connectionToken==aa1a1aa1-11aa-1a11-11a1-111111111a1a==
> 4eaa4ba00d96: end
[12:02:45.867] > 
[12:02:46.126] "install" terminal command done
[12:02:46.126] Install terminal quit with output: 

@p1gd0g
Copy link

p1gd0g commented Oct 11, 2022

Same here. it works when I move the remote code folder, so weird.

log.txt

@github-actions github-actions bot added the ssh Issue in vscode-remote SSH label Oct 11, 2022
@eleanorjboyd eleanorjboyd self-assigned this Oct 11, 2022
@roblourens
Copy link
Member

roblourens commented Oct 11, 2022

It seems like we tried to open a terminal to connect with ssh, and it did eventually connect, but took a really long time. Is there a difference if you set "remote.SSH.showLoginTerminal": true?

If that doesn't work, is there a difference if you set "remote.SSH.useLocalServer": true in your settings.json?

@Tyriar just a guess, is there any reason a local hidden terminal might take a long time to start when the remote resolver is running, in 1.72?

@Tyriar
Copy link
Member

Tyriar commented Oct 11, 2022

@roblourens not that I'm aware of, I think the main difference is the hidden terminal's dimensions would be different. Did something happen on the client side to trigger the connection working?

@giahung24
Copy link
Author

giahung24 commented Oct 12, 2022

@roblourens

It seems like we tried to open a terminal to connect with ssh, and it did eventually connect, but took a really long time. Is there a difference if you set "remote.SSH.showLoginTerminal": true?

I tried to set this to true but it doesn't work.

If that doesn't work, is there a difference if you set "remote.SSH.useLocalServer": true in your settings.json?

It has already been set true.

As in #7326, the issue comes with the new version 1.72 VSCode, I have to go back on 1.71.2 temporary for working.

@shkit
Copy link

shkit commented Oct 13, 2022

I may meet same issue.
Error message "The editor could not be opened due to an unexpected error: No file system provider found for resource 'vscode-remote://ssh-remote%2B....'" is shown in main window, a remote workspace cannot be opened and the same log (Connecting with SSH timed out) is shown in log buffer.
I found a workaround deleting %APPDATA%\Code\User\workspaceStorage<value>\state.vscdb, but workspace state is initialized, of course.

@shkit
Copy link

shkit commented Oct 13, 2022

I could reproduce with this.

  • create empty folder on remote host and open with Code using remote-ssh.
  • create "hello.c" and write following content.
    int main(void) { return 0; }
  • right click on "main" and select "Find All References"
  • move "References" panel to Secondary (Right) Side Bar.
  • close Code.
  • open Code.
    =>SSH timed out.

@ocimer
Copy link

ocimer commented Oct 13, 2022

I could reproduce with this.

  • create empty folder on remote host and open with Code using remote-ssh.
  • create "hello.c" and write following content.
    int main(void) { return 0; }
  • right click on "main" and select "Find All References"
  • move "References" panel to Secondary (Right) Side Bar.
  • close Code.
  • open Code.
    =>SSH timed out.

This same problem occurs for me as well - see issue 7327

@roblourens
Copy link
Member

Could someone do this

  • F1 > "Set Log Level" > Trace
  • Reproduce the issue
  • Share the logs from the "Log (Window)" output channel

Also, I was wondering whether Workspace Trust is relevant here - is anyone opening workspaces that are not trusted?

@shkit
Copy link

shkit commented Oct 14, 2022

Here is "Log (Window)" output in my environment.
log.txt

@roblourens
Copy link
Member

roblourens commented Oct 17, 2022

I can repro this. Sorry for the break, working on a fix. One workaround is to set "remote.SSH.useLocalServer": true. On windows this must be set explicitly in your settings.json file. Another workaround is to copy/rename your remote folder, so that you can open it without the saved workspace state that is causing the break.

Steps I'm using, adapted from above.

  • Set "remote.SSH.useLocalServer": false if on mac/linux
  • Connect to an SSH remote
  • Open some ts/js file
  • Right click, "find all references", put the list references view in a Secondary Sidebar
    • I think you just need an extension treeview visible
  • Reload the window
  • We can't connect

What I know right now:

  • Essentially the terminal that Remote-SSH starts to run the ssh command never starts up
  • I get the log message terminalnstance#ctor but not Terminal process ready
  • We never get to lifecycle: phase changed (value: 3)
  • I will keep debugging but it seems like we get stuck restoring the workbench views/layout @bpasero @sbatten @sandy081

@roblourens roblourens added bug Issue identified by VS Code Team member as probable bug important Issue identified as high-priority labels Oct 17, 2022
@roblourens roblourens added this to the October 2022 milestone Oct 17, 2022
@roblourens
Copy link
Member

I don't see what has changed, but I think something like this is happening:

None of this code has changed recently, I'll have to check out an old version.

@roblourens
Copy link
Member

https://github.com/microsoft/vscode/pull/159666/files is probably the culprit

@roblourens
Copy link
Member

@roblourens roblourens assigned Tyriar and meganrogge and unassigned eleanorjboyd Oct 17, 2022
@kczx3
Copy link

kczx3 commented Oct 20, 2022

One workaround is to set "remote.SSH.useLocalServer": true. On windows this must be set explicitly in your settings.json file.

Thanks for this. It seemingly was set to true for me in the Settings window but opening my user settings.json definitely showed that it was not listed there. Once I added it then I was able to open my remote workspace. Will track this for resolution.

@giahung24
Copy link
Author

One workaround is to set "remote.SSH.useLocalServer": true. On windows this must be set explicitly in your settings.json file.

Thanks for this. It seemingly was set to true for me in the Settings window but opening my user settings.json definitely showed that it was not listed there. Once I added it then I was able to open my remote workspace. Will track this for resolution.

The same for me.

@tsangal
Copy link

tsangal commented Oct 20, 2022

One workaround is to set "remote.SSH.useLocalServer": true. On windows this must be set explicitly in your settings.json file.

Thanks for this. It seemingly was set to true for me in the Settings window but opening my user settings.json definitely showed that it was not listed there. Once I added it then I was able to open my remote workspace. Will track this for resolution.

I tried explicitly setting this to true in my user settings.json on Windows but it still doesn't work for me.

@p1gd0g
Copy link

p1gd0g commented Oct 21, 2022

One workaround is to set "remote.SSH.useLocalServer": true. On windows this must be set explicitly in your settings.json file.

Thanks for this. It seemingly was set to true for me in the Settings window but opening my user settings.json definitely showed that it was not listed there. Once I added it then I was able to open my remote workspace. Will track this for resolution.

Works form me. And show tips:
image

@giahung24
Copy link
Author

One workaround is to set "remote.SSH.useLocalServer": true. On windows this must be set explicitly in your settings.json file.

Thanks for this. It seemingly was set to true for me in the Settings window but opening my user settings.json definitely showed that it was not listed there. Once I added it then I was able to open my remote workspace. Will track this for resolution.

Works form me. And show tips: image

Yeah, I have that pop up too. There is another open issue on this problem. But you can just ignore it.

@roblourens
Copy link
Member

This should be fixed in the latest VS Code Insiders, please let me know if not!

@citizenrich
Copy link

Thanks for the heads up. I see the same error as before, which is a successful connection then immediate time-out. Here's the log for one of the connections. I hid the hostname and MOTD but it connects successfully.

[14:26:20.896] Log Level: 2
[14:26:20.926] remote-ssh@0.93.2022111115
[14:26:20.927] darwin x64
[14:26:20.956] SSH Resolver called for "ssh-remote+host-hidden", attempt 1
[14:26:20.959] "remote.SSH.useLocalServer": true
[14:26:20.960] "remote.SSH.path": undefined
[14:26:20.960] "remote.SSH.configFile": undefined
[14:26:20.960] "remote.SSH.useFlock": true
[14:26:20.960] "remote.SSH.lockfilesInTmp": false
[14:26:20.960] "remote.SSH.localServerDownload": auto
[14:26:20.961] "remote.SSH.remoteServerListenOnSocket": false
[14:26:20.961] "remote.SSH.showLoginTerminal": false
[14:26:20.961] "remote.SSH.defaultExtensions": []
[14:26:20.961] "remote.SSH.loglevel": 2
[14:26:20.961] "remote.SSH.enableDynamicForwarding": true
[14:26:20.962] "remote.SSH.enableRemoteCommand": false
[14:26:20.962] "remote.SSH.serverPickPortsFromRange": {}
[14:26:20.962] "remote.SSH.serverInstallPath": {}
[14:26:20.995] SSH Resolver called for host:+host-hidden
[14:26:20.995] Setting up SSH remote +host-hidden"
[14:26:21.000] Acquiring local install lock: /var/folders/5g/qr2tyf4n7jbfcqbjh58mdwx00000gn/T/vscode-remote-ssh-9c0f0d8a-install.lock
[14:26:21.002] Looking for existing server data file at /Users/richard/Library/Application Support/Code - Insiders/User/globalStorage/ms-vscode-remote.remote-ssh/vscode-ssh-host-9c0f0d8a-ef415578d1b1019db585718968a303eeca4b8979-0.93.2022111115/data.json
[14:26:21.002] Using commit id "ef415578d1b1019db585718968a303eeca4b8979" and quality "insider" for server
[14:26:21.010] Install and start server if needed
[14:26:21.014] PATH: /Library/Frameworks/iio.framework/Tools:/usr/local/opt/ruby/bin:/usr/local/sbin:/usr/local/opt/openssl/bin:/Users/richard/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/VMware Fusion.app/Contents/Public:/usr/local/MacGPG2/bin:/opt/X11/bin:/Library/Apple/usr/bin:/Applications/Wireshark.app/Contents/MacOS:/usr/local/opt/go/libexec/bin:/Users/richard/.cargo/bin:/usr/local/opt/qt/bin:/Users/richard/.gem/ruby/3.0.0/bin
[14:26:21.014] Checking ssh with "ssh -V"
[14:26:21.039] > OpenSSH_8.6p1, LibreSSL 3.3.6

[14:26:21.044] askpass server listening on /var/folders/5g/qr2tyf4n7jbfcqbjh58mdwx00000gn/T/vscode-ssh-askpass-1ac992e13e716ee082fb90bf782e992c782e0d9f.sock
[14:26:21.045] Spawning local server with {"serverId":1,"ipcHandlePath":"/var/folders/5g/qr2tyf4n7jbfcqbjh58mdwx00000gn/T/vscode-ssh-askpass-ac121cf9e1bc07315961375ba43be8b167cff4fe.sock","sshCommand":"ssh","sshArgs":["-v","-T","-D","61290","-o","ConnectTimeout=15",+host-hidden"],"serverDataFolderName":".vscode-server-insiders","dataFilePath":"/Users/richard/Library/Application Support/Code - Insiders/User/globalStorage/ms-vscode-remote.remote-ssh/vscode-ssh-host-9c0f0d8a-ef415578d1b1019db585718968a303eeca4b8979-0.93.2022111115/data.json"}
[14:26:21.045] Local server env: {"SSH_AUTH_SOCK":"/private/tmp/com.apple.launchd.TRLTFwX8fk/Listeners","SHELL":"/bin/bash","DISPLAY":"/private/tmp/com.apple.launchd.tAoedN1zHH/org.xquartz:0","ELECTRON_RUN_AS_NODE":"1","SSH_ASKPASS":"/Users/richard/.vscode-insiders/extensions/ms-vscode-remote.remote-ssh-0.93.2022111115/out/local-server/askpass.sh","VSCODE_SSH_ASKPASS_NODE":"/Applications/Visual Studio Code - Insiders.app/Contents/Frameworks/Code - Insiders Helper (Plugin).app/Contents/MacOS/Code - Insiders Helper (Plugin)","VSCODE_SSH_ASKPASS_EXTRA_ARGS":"--ms-enable-electron-run-as-node","VSCODE_SSH_ASKPASS_MAIN":"/Users/richard/.vscode-insiders/extensions/ms-vscode-remote.remote-ssh-0.93.2022111115/out/askpass-main.js","VSCODE_SSH_ASKPASS_HANDLE":"/var/folders/5g/qr2tyf4n7jbfcqbjh58mdwx00000gn/T/vscode-ssh-askpass-1ac992e13e716ee082fb90bf782e992c782e0d9f.sock"}
[14:26:21.049] Spawned 43152
[14:26:21.256] > local-server-1> Spawned ssh, pid=43159
[14:26:21.260] stderr> OpenSSH_8.6p1, LibreSSL 3.3.6
[14:26:37.083] stderr> debug1: Server host key: ssh-ed25519 SHA256:STUFF...
[14:26:37.684] stderr> Authenticated to+host-hidden ([185.19.29.190]:22).
[14:26:38.001] > Linux host-hidden 5.18.0-0.deb11.4-amd64 #1 SMP PREEMPT_DYNAMIC Debian 5.18.16-1~bpo11+1 (2022-08-12) x86_64
> 
> The programs included with the Debian GNU/Linux system are free software;
> the exact distribution terms for each program are described in the
> individual files in /usr/share/doc/*/copyright.
> 
> Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
> permitted by applicable law.
[14:26:38.011] > 
> FIND PQ Environment -- As of: 2022-10-27 00:00:01.087730524 +0000
[14:26:38.012] > sut01: MOTD STUFF here showing successful SSH
[14:26:38.055] Terminating local server
[14:26:38.059] Resolver error: Error: Connecting with SSH timed out
	at g.Timeout (/Users/richard/.vscode-insiders/extensions/ms-vscode-remote.remote-ssh-0.93.2022111115/out/extension.js:1:583947)
	at Timeout._onTimeout (/Users/richard/.vscode-insiders/extensions/ms-vscode-remote.remote-ssh-0.93.2022111115/out/extension.js:1:629238)
	at listOnTimeout (node:internal/timers:559:17)
	at process.processTimers (node:internal/timers:502:7)
[14:26:38.063] Local server exit: 15
[14:26:38.071] ------

@eleanorjboyd
Copy link
Member

@citizenrich, this seems to be a different issue- could you please file a new bug in the remote-release repo. Thanks!

@citizenrich
Copy link

Thanks @eleanorjboyd. #7520 I would note that remote-ssh now connects successfully on two other hosts, just not two others.

@CMinHong
Copy link

#7324 (comment)

I have been able to replicate and mitigate this problem (...) If I have the sidebar open then reload the window I get SSH timeouts like the OP. At this point (when it fails to connect) you can close the sidebar and reload, the workspace loads up fine.

Works for me

  • Open broken workspace on remote

    • Any method to open it will work for this method, can connect to remote then open folder, or pick from your history
  • Remote times out / doesn't connect

  • [Ctrl/cmd]-Shift-P > View: Focus into Secondary Side Bar (workbench.action.focusAuxiliaryBar)

  • [Ctrl/cmd]-Shift-P > View: Close Secondary Side Bar (workbench.action.closeAuxiliaryBar)

  • [Ctrl/cmd]-Shift-P > Developer: Reload Window (workbench.action.reloadWindow)

  • Connects

This way works!

@eleanorjboyd
Copy link
Member

@CMinHong, is this issue you are experiencing on the new insiders? If not can you please try it there and let me know if the issue persists. Thanks!

@elad-eyal
Copy link

@roblourens wrote

Another workaround is to copy/rename your remote folder, so that you can open it without the saved workspace state that is causing the break.

@roblourens where is this state saved? I would have loved to just delete it altogether but I can't find it. thanks

@santhoshcameo
Copy link

I am facing this issue OSX ventura, I did not get any solution, but then even formatted my OSX and downgraded to Monterey , and still the same.

@MitchTalmadge
Copy link

MitchTalmadge commented Nov 28, 2022

I've experienced the same problem. Once it errored out, I closed the secondary sidebar, retried, and it worked perfectly fine. Thanks to those who figured this out.

@santhoshcameo
Copy link

@MitchTalmadge Thanks for the response, I read this couple of time, but not sure exactly what that means. Closing the secondary sidebar means ?? I have attached the screenshot of how it looks likes, could you please point out the next steps ??

Screenshot 2022-11-28 at 16 30 55

@webtroter
Copy link

#7324 (comment)

I have been able to replicate and mitigate this problem (...) If I have the sidebar open then reload the window I get SSH timeouts like the OP. At this point (when it fails to connect) you can close the sidebar and reload, the workspace loads up fine.

Works for me

* Open broken workspace on remote
  
  * Any method to open it will work for this method, can connect to remote then open folder, or pick from your history

* Remote times out / doesn't connect

* `[Ctrl/cmd]-Shift-P`  `> View: Focus into Secondary Side Bar` (`workbench.action.focusAuxiliaryBar`)

* `[Ctrl/cmd]-Shift-P` `> View: Close Secondary Side Bar` (`workbench.action.closeAuxiliaryBar`)

* `[Ctrl/cmd]-Shift-P` `> Developer: Reload Window` (`workbench.action.reloadWindow`)

* Connects

Oh My God! I can't believe all my troubles are caused by me using the secondary side bar!

I can't wait for this stupid bug to be fixed.

Thanks to the contributors.

@eleanorjboyd
Copy link
Member

@roblourens wrote

Another workaround is to copy/rename your remote folder, so that you can open it without the saved workspace state that is causing the break.

@roblourens where is this state saved? I would have loved to just delete it altogether but I can't find it. thanks

Hello @eladeyal-intel the place where you can find and delete this saved workspace state is different per machine type but here is the location for each type: https://code.visualstudio.com/docs/setup/uninstall#_clean-uninstall

@eleanorjboyd
Copy link
Member

Additionally for any of those still experiencing errors please make sure you try the new insiders version of VS Code. If you tried this version and it is still not working please submit another issue to this repo so we can reduce clutter in this thread. Thanks!

@strazto
Copy link

strazto commented Nov 29, 2022

@santhoshcameo

(...) not sure exactly what that means. Closing the secondary sidebar means ?? (...) could you please point out the next steps ??

See my comment linked below for exact steps to mitigate

#7324 (comment)

@CMinHong
Copy link

CMinHong commented Nov 29, 2022

@CMinHong, is this issue you are experiencing on the new insiders? If not can you please try it there and let me know if the issue persists. Thanks!

I'm using 1.73.1 (system setup),still have this problem.
@eleanorjboyd

@santhoshcameo
Copy link

@CMinHong Same issue

@CMinHong
Copy link

@santhoshcameo
I solved it by closing the sidebar.
I'm using win10.

@Chasson1992
Copy link

I have been able to replicate and mitigate this problem. I have narrowed it down to having the sidebar open. If I have the sidebar open then reload the window I get SSH timeouts like the OP. At this point (when it fails to connect) you can close the sidebar and reload, the workspace loads up fine. This is my VSCode versin information:

Version: 1.73.0 (user setup)
Commit: 8fa188b2b301d36553cbc9ce1b0a146ccb93351f
Date: 2022-11-01T15:34:06.111Z
Electron: 19.0.17
Chromium: 102.0.5005.167
Node.js: 16.14.2
V8: 10.2.154.15-electron.0
OS: Windows_NT x64 10.0.19044
Sandboxed: No

Using VS Code 1.73.1, also confirmed that closing the sidebar fixes the issue. @lurk26 you're a life saver thank you!

@eleanorjboyd
Copy link
Member

@CMinHong, is this issue you are experiencing on the new insiders? If not can you please try it there and let me know if the issue persists. Thanks!

I'm using 1.73.1 (system setup),still have this problem. @eleanorjboyd

1.73.1 is the stable build- 1.74 should have the fix! This build is only accessible via VS Code insiders.

@santhoshcameo
Copy link

Even in 1.74 I got the broken pipe issue, but then below solution solved in MAC OSX

The problem solved <3

this issue started since 1 month for me, and just now solved it by adding the following line into
.ssh/config file ( MAC OSX; Monterey)

Host *
  IPQoS=throughput

@sbatten sbatten added the verified Verification succeeded label Dec 1, 2022
@AdamReece-WebBox
Copy link

AdamReece-WebBox commented Dec 14, 2022

1.74 definitely does NOT have a fix. SSH use is now worse than ever, to the point whereby it starts up successfully then pies me off 10 seconds later claiming it's dropped, then doesn't connect again. (This is completely unusable.)

I noticed the command being used in the output terminal: ssh -T -D 51586 "dev-vm.example.tld" bash
I tried this with -vvv in a terminal to see what happens. It connects fine.

[Edit] Log from "Remote - SSH" output when it happens:

[15:36:45.520] Remote server is listening on 38813
[15:36:45.520] Parsed server configuration: {"serverConfiguration":{"remoteListeningOn":{"port":38813},"osReleaseId":"ubuntu","arch":"x86_64","webUiAccessToken":"","sshAuthSock":"/tmp/ssh-XXXX0VYSBX/agent.481919","display":"","tmpDir":"/run/user/1000","platform":"linux","connectionToken":"1111aa11-1111-111a-a11a-111a11a1a111"},"installUnpackCode":""}
[15:36:45.523] Starting forwarding server. localPort 52532 -> socksPort 52522 -> remotePort 38813
[15:36:45.523] Forwarding server listening on 52532
[15:36:45.523] Waiting for ssh tunnel to be ready
[15:36:45.524] [Forwarding server 52532] Got connection 0
[15:36:45.525] Tunneled 38813 to local port 52532
[15:36:45.525] Resolved "ssh-remote+dev-vm.example.tld" to "127.0.0.1:52532"
[15:36:45.526] Updating $SSH_AUTH_SOCK: ln -f -s "/tmp/ssh-XXXX0VYSBX/agent.481919" "/run/user/1000/vscode-ssh-auth-sock-685937747"
[15:36:45.526] Using cwd: vscode-remote://ssh-remote%2Bdev-vm.example.tld/
[15:36:45.526] Remote extension host environment: {"SSH_AUTH_SOCK":"/run/user/1000/vscode-ssh-auth-sock-685937747"}
[15:36:45.531] ------




[15:36:45.548] [Forwarding server 52532] Got connection 1
[15:36:45.624] [Forwarding server 52532] Got connection 2
[15:36:46.802] [Forwarding server 52532] Got connection 3
[15:36:46.877] [Forwarding server 52532] Got connection 4
[15:36:49.702] "Update SSH_AUTH_SOCK" terminal command done
[15:39:22.135] [Forwarding server 52532] Got connection 5
[15:39:25.432] ------




[15:39:25.433] SSH Resolver called for "ssh-remote+dev-vm.example.tld", attempt 2, (Reconnection)
[15:39:25.434] SSH Resolver called for host: dev-vm.example.tld
[15:39:25.434] Setting up SSH remote "dev-vm.example.tld"
[15:39:25.436] Using commit id "5235c6bb189b60b01b1f49062f4ffa42384f8c91" and quality "stable" for server
[15:39:25.438] Install and start server if needed
[15:39:25.441] Running script with connection command: ssh -T -D 52660 "dev-vm.example.tld" bash
[15:39:25.442] Terminal shell path: C:\WINDOWS\System32\cmd.exe

For some reason it just suddenly decided it was no longer fine?

(This is not a network issue. In parallel I've got another SSH session open to the same remote host for terminal use, and remains up and working all day.)

@Chasson1992
Copy link

This issue seems to be getting wrapped up into multiple different issues with the Remote - SSH extension.

I can confirm that, specifically, the issue with opening a Remote SSH session with the Secondary Side Bar open is fixed in 1.74.

Tested on:

Version: 1.74.0 (system setup)
Commit: 5235c6bb189b60b01b1f49062f4ffa42384f8c91
Date: 2022-12-05T16:38:16.075Z
Electron: 19.1.8
Chromium: 102.0.5005.167
Node.js: 16.14.2
V8: 10.2.154.15-electron.0
OS: Windows_NT x64 10.0.19044
Sandboxed: No

@tsangal
Copy link

tsangal commented Dec 14, 2022

I can also confirm that the issue with the secondary side bar and remote SSH has been fixed for me in 1.74.

@szotsaki
Copy link

+1, I can confirm it works. I suggest to create separate reports for SSH extension problems.

@eleanorjboyd
Copy link
Member

@AdamReece-WebBox if you could please file a new issue using this form, we can work to troubleshoot your issue, thanks!

@github-actions github-actions bot locked and limited conversation to collaborators Dec 24, 2022
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 important Issue identified as high-priority ssh Issue in vscode-remote SSH verified Verification succeeded
Projects
None yet
Development

Successfully merging a pull request may close this issue.