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

Remote SSH stuck in a reconnect loop #7497

Open
Yelnats321 opened this issue Nov 10, 2022 · 23 comments
Open

Remote SSH stuck in a reconnect loop #7497

Yelnats321 opened this issue Nov 10, 2022 · 23 comments
Assignees

Comments

@Yelnats321
Copy link

  • VSCode Version: 1.73.1
  • Local OS Version: Windows 10 Enterprise 21H2 19044.2130
  • Remote OS Version: Ubuntu 20.04
  • Remote Extension/Connection Type: SSH/Containers/WSL/Server: SSH

Log (Window):

2022-11-10 14:33:14.111 [info] [attempt 1] Invoking resolveAuthority(ssh-remote)
2022-11-10 14:33:18.149 [error] [Extension Host] (node:27076) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
(Use Code --trace-deprecation ... to show where the warning was created)
2022-11-10 14:33:18.158 [info] [attempt 1] resolveAuthority(ssh-remote) returned '127.0.0.1:52840' after 4046 ms
2022-11-10 14:33:21.717 [info] [perf] Render performance baseline is 21ms
2022-11-10 14:33:46.435 [info] [remote-connection][ExtensionHost][1da39…][reconnect] received socket timeout event (unacknowledgedMsgCount: 5, timeSinceOldestUnacknowledgedMsg: 20013, timeSinceLastReceivedSomeData: 20012).
2022-11-10 14:33:46.438 [info] [remote-connection][ExtensionHost][1da39…][reconnect] starting reconnecting loop. You can get more information with the trace log level.
2022-11-10 14:33:46.438 [info] [remote-connection][ExtensionHost][1da39…][reconnect] resolving connection...
2022-11-10 14:33:46.439 [info] [remote-connection][ExtensionHost][1da39…][reconnect] connecting to 127.0.0.1:52840...
2022-11-10 14:33:47.131 [info] [remote-connection][ExtensionHost][1da39…][reconnect] reconnected!
2022-11-10 14:34:07.151 [info] [remote-connection][ExtensionHost][1da39…][reconnect] received socket timeout event (unacknowledgedMsgCount: 5, timeSinceOldestUnacknowledgedMsg: 20016, timeSinceLastReceivedSomeData: 20016).
2022-11-10 14:34:07.179 [info] [remote-connection][ExtensionHost][1da39…][reconnect] starting reconnecting loop. You can get more information with the trace log level.
2022-11-10 14:34:07.180 [info] [remote-connection][ExtensionHost][1da39…][reconnect] resolving connection...
2022-11-10 14:34:07.180 [info] [remote-connection][ExtensionHost][1da39…][reconnect] connecting to 127.0.0.1:52840...
2022-11-10 14:34:07.878 [info] [remote-connection][ExtensionHost][1da39…][reconnect] reconnected!

Log (Remote - SSH):

[14:33:14.094] Log Level: 2
[14:33:14.095] [email protected]
[14:33:14.096] win32 x64
[14:33:14.120] SSH Resolver called for "ssh-remote+fe20", attempt 1
[14:33:14.121] "remote.SSH.useLocalServer": false
[14:33:14.121] "remote.SSH.showLoginTerminal": false
[14:33:14.121] "remote.SSH.remotePlatform": {"fe20":"linux"}
[14:33:14.121] "remote.SSH.path": undefined
[14:33:14.121] "remote.SSH.configFile": undefined
[14:33:14.121] "remote.SSH.useFlock": true
[14:33:14.121] "remote.SSH.lockfilesInTmp": false
[14:33:14.122] "remote.SSH.localServerDownload": auto
[14:33:14.122] "remote.SSH.remoteServerListenOnSocket": false
[14:33:14.122] "remote.SSH.showLoginTerminal": false
[14:33:14.122] "remote.SSH.defaultExtensions": []
[14:33:14.122] "remote.SSH.loglevel": 2
[14:33:14.122] "remote.SSH.enableDynamicForwarding": true
[14:33:14.122] "remote.SSH.enableRemoteCommand": false
[14:33:14.122] "remote.SSH.serverPickPortsFromRange": {}
[14:33:14.122] "remote.SSH.serverInstallPath": {}
[14:33:14.126] SSH Resolver called for host: fe20
[14:33:14.126] Setting up SSH remote "fe20"
[14:33:14.141] Using commit id "6261075646f055b99068d3688932416f2346dd3b" and quality "stable" for server
[14:33:14.144] Install and start server if needed
[14:33:14.146] Checking ssh with "ssh -V"
[14:33:14.199] > OpenSSH_for_Windows_8.1p1
[14:33:14.200] > , LibreSSL 3.0.2

[14:33:14.204] Running script with connection command: ssh -T -D 52828 fe20 bash
[14:33:14.206] Terminal shell path: C:\Windows\System32\cmd.exe
[14:33:16.124] > �]0;C:\Windows\System32\cmd.exe�
[14:33:16.124] Got some output, clearing connection timeout
[14:33:17.963] > 170532b73608: running
[14:33:17.996] > Acquiring lock on /u/elnar/.vscode-server/bin/6261075646f055b99068d3688932416f23

46dd3b/vscode-remote-lock.elnar.6261075646f055b99068d3688932416f2346dd3b
[14:33:18.010] > Found existing installation at /u/elnar/.vscode-server/bin/6261075646f055b99068d
3688932416f2346dd3b...
Checking /u/elnar/.vscode-server/.6261075646f055b99068d3688932416f2346dd3b.log a
nd /u/elnar/.vscode-server/.6261075646f055b99068d3688932416f2346dd3b.pid for a r
unning server
Looking for server with pid: 543328
[14:33:18.045] > Found running server...
[14:33:18.055] >
*

[14:33:18.132] > Checking server status on port 46511 with wget

170532b73608: start
SSH_AUTH_SOCK====
DISPLAY====
webUiAccessToken====
listeningOn==46511==
osReleaseId==ubuntu==
arch==x86_64==
tmpDir==/run/user/10057971==
platform==linux==
unpackResult====
didLocalDownload==0==
downloadTime====
installTime====
extInstallTime====
serverStartTime====
connectionToken==a11aaaa1-a111-111a-1a1a-11a1aa111a11==
170532b73608: end
[14:33:18.133] Received install output:
SSH_AUTH_SOCK====
DISPLAY====
webUiAccessToken====
listeningOn==46511==
osReleaseId==ubuntu==
arch==x86_64==
tmpDir==/run/user/10057971==
platform==linux==
unpackResult====
didLocalDownload==0==
downloadTime====
installTime====
extInstallTime====
serverStartTime====
connectionToken==a11aaaa1-a111-111a-1a1a-11a1aa111a11==

[14:33:18.133] Remote server is listening on 46511
[14:33:18.133] Parsed server configuration: {"serverConfiguration":{"remoteListeningOn":{"port":46511},"osReleaseId":"ubuntu","arch":"x86_64","webUiAccessToken":"","sshAuthSock":"","display":"","tmpDir":"/run/user/10057971","platform":"linux","connectionToken":"a11aaaa1-a111-111a-1a1a-11a1aa111a11"},"installUnpackCode":""}
[14:33:18.135] Starting forwarding server. localPort 52840 -> socksPort 52828 -> remotePort 46511
[14:33:18.136] Forwarding server listening on 52840
[14:33:18.136] Waiting for ssh tunnel to be ready
[14:33:18.136] Tunneled 46511 to local port 52840
[14:33:18.137] Resolved "ssh-remote+fe20" to "127.0.0.1:52840"
[14:33:18.137] [Forwarding server 52840] Got connection 0
[14:33:18.144] ------

[14:33:18.162] [Forwarding server 52840] Got connection 1
[14:33:18.451] [Forwarding server 52840] Got connection 2
[14:33:19.771] [Forwarding server 52840] Got connection 3
[14:33:46.441] [Forwarding server 52840] Got connection 4
[14:34:07.181] [Forwarding server 52840] Got connection 5
[14:34:27.892] [Forwarding server 52840] Got connection 6
[14:34:48.560] [Forwarding server 52840] Got connection 7
[14:35:09.166] [Forwarding server 52840] Got connection 8
[14:35:30.270] [Forwarding server 52840] Got connection 9

Steps to Reproduce:

  1. Connect to remote host OR WSL
  2. The reconnect loop occurs, there is no way to fix it once it starts apart from reloading VS Code and hoping it fixes itself.

This is easiest to force with some extensions installed on the server as more communication seems to cause it, but the extension itself doesn't matter. GitLens, LLDB, clangd all have caused this, as well as no extensions installed.

Does this issue occur when you try this locally?: Yes, in that I can reproduce it connecting to a WSL instance instead. This is on a company computer with a VPN and DirectAccess, but I am able to reproduce it sans VPN.
Does this issue occur when you try this locally and all extensions are disabled?: Yes

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

Hello! Could you set the log level to trace, re-try with this connection, and then send those new logs? Secondly, could you send what extensions you have enabled and then try going through and disabling those to see if an extension might be the causing an issue. Thanks!

@eleanorjboyd eleanorjboyd removed the ssh Issue in vscode-remote SSH label Nov 16, 2022
@Yelnats321
Copy link
Author

I am currently using GitLens, clangd, and CodeLLDB on the remote server. I have been able to reproduce this with any one of these extensions enabled/disabled, and with no extensions at all. The problem is that the connection needs to be "annoyed" so to speak, and it's easier to do with an extension (say doing a git blame with GitLens) than without any extensions, so this repro uses that.

2022-11-17 14:14:34.592 [trace] CommandService#executeCommand gitlens.toggleFileBlame
2022-11-17 14:14:35.421 [info] [remote-connection][ExtensionHost][5abfc…][reconnect] received socket timeout event (unacknowledgedMsgCount: 126, timeSinceOldestUnacknowledgedMsg: 20152, timeSinceLastReceivedSomeData: 20153).
2022-11-17 14:14:35.421 [info] [remote-connection][ExtensionHost][5abfc…][reconnect] starting reconnecting loop. You can get more information with the trace log level.
2022-11-17 14:14:35.421 [info] [remote-connection][ExtensionHost][5abfc…][reconnect] resolving connection...
2022-11-17 14:14:35.421 [info] [remote-connection][ExtensionHost][5abfc…][reconnect] connecting to 127.0.0.1:55270...
2022-11-17 14:14:35.421 [trace] [remote-connection][ExtensionHost][5abfc…][reconnect][127.0.0.1:55270] 1/6. invoking socketFactory.connect().
2022-11-17 14:14:35.606 [trace] [remote-connection][ExtensionHost][5abfc…][reconnect][127.0.0.1:55270] 2/6. socketFactory.connect() was successful.
2022-11-17 14:14:35.607 [trace] [remote-connection][ExtensionHost][5abfc…][reconnect][127.0.0.1:55270] 3/6. sending AuthRequest control message.
2022-11-17 14:14:35.704 [trace] [remote-connection][ExtensionHost][5abfc…][reconnect][127.0.0.1:55270] 4/6. received SignRequest control message.
2022-11-17 14:14:35.708 [trace] [remote-connection][ExtensionHost][5abfc…][reconnect][127.0.0.1:55270] 5/6. sending ConnectionTypeRequest control message.
2022-11-17 14:14:35.801 [trace] [remote-connection][ExtensionHost][5abfc…][reconnect][127.0.0.1:55270] 6/6. handshake finished, connection is up and running after 380 ms!
2022-11-17 14:14:35.801 [info] [remote-connection][ExtensionHost][5abfc…][reconnect] reconnected!

@alexdima
Copy link
Member

From the logs, the client side doesn't receive any data from the extension host for over 20s. And that makes it begin reconnecting:

2022-11-17 14:14:35.421 [info] [remote-connection][ExtensionHost][5abfc…][reconnect] received socket timeout event (unacknowledgedMsgCount: 126, timeSinceOldestUnacknowledgedMsg: 20152, timeSinceLastReceivedSomeData: 20153).

So the client side sent 126 messages which were never acknowledged, and the extension host last send data 20.1s ago. This usually happens when the extension host process is unhealthy i.e. the event loop of the remote extension host is taken over by a long running (>20s) operation. Are you perhaps connecting to a particular slow machine?

@Yelnats321
Copy link
Author

The machine should be plenty capable, it's a server with 128 cores. Is it possible to diagnose anything from the extension host?

@alexdima
Copy link
Member

alexdima commented Dec 1, 2022

In my experience, such issues are virtually always caused by one of the installed extensions. Or perhaps by the remote machine being very busy and starving the extension host process. Could you please try launching code --logExtensionHostCommunication. If you open developer tools (F1 > Developer: Toggle Developer Tools), you will see all communication going on from the renderer and the extension hosts. The current logging doesn't do a good job distinguishing between messages going to the local extension host or to the remote extension host, but this should help reveal something peculiar, like very large messages, etc. I will push a change to improve logging.

@Yelnats321
Copy link
Author

I've got this capture, hopefully from when something starts acting up. I removed some personal information, so the file is just called file.h.

[Remote][Ext → Win][19663526][len: 72] 1324 - receiveRequest MainThreadCommands.$executeCommand( setContext Array(2) true )
workbench.desktop.main.js:1690 [Remote][Win → Ext][3472111][len: 5] 1324 - ack undefined
workbench.desktop.main.js:1690 [Remote][Ext → Win][19663598][len: 72] 1325 - receiveRequest MainThreadCommands.$executeCommand( setContext Array(2) true )
workbench.desktop.main.js:1690 [Remote][Win → Ext][3472116][len: 5] 1325 - ack undefined
workbench.desktop.main.js:1690 [Remote][Win → Ext][3472121][len: 5] 1324 - reply: undefined
workbench.desktop.main.js:1690 [Remote][Win → Ext][3472126][len: 5] 1325 - reply: undefined
workbench.desktop.main.js:1690 [Remote][Ext → Win][19663670][len: 72] 1326 - receiveRequest MainThreadCommands.$executeCommand( setContext Array(2) true )
workbench.desktop.main.js:1690 [Remote][Win → Ext][3472131][len: 5] 1326 - ack undefined
workbench.desktop.main.js:1690 [Remote][Ext → Win][20457816][len: 794146] 287 - receiveReply: *** REMOVED SRC CODE 794 KB ***

workbench.desktop.main.js:1690 [Remote][Win → Ext][3472136][len: 5] 1326 - reply: undefined
workbench.desktop.main.js:1690 [Remote][Ext → Win][20457888][len: 72] 1327 - receiveRequest MainThreadCommands.$executeCommand( setContext Array(2) true )
workbench.desktop.main.js:1690 [Remote][Win → Ext][3472141][len: 5] 1327 - ack undefined
workbench.desktop.main.js:1690 [Remote][Ext → Win][20457953][len: 65] 288 - receiveReply: Object
workbench.desktop.main.js:1690 [Remote][Win → Ext][3472146][len: 5] 1327 - reply: undefined
workbench.desktop.main.js:1690 [LocalProcess][Win → Ext][5888095][len: 865181] 238 - request: ExtHostDocumentsAndEditors.$acceptDocumentsAndEditorsDelta( Object )
workbench.desktop.main.js:1690 [Remote][Win → Ext][4337327][len: 865181] 289 - request: ExtHostDocumentsAndEditors.$acceptDocumentsAndEditorsDelta( Object )
workbench.desktop.main.js:1690 [LocalProcess][Ext → Win][ 32250][len: 5] 238 - ack undefined
workbench.desktop.main.js:1690 [LocalProcess][Ext → Win][ 32255][len: 5] 238 - receiveReply: undefined
workbench.desktop.main.js:1690 [Remote][Ext → Win][20457958][len: 5] 289 - ack undefined
workbench.desktop.main.js:1690 [Remote][Ext → Win][20457963][len: 5] 289 - receiveReply: undefined
workbench.desktop.main.js:1690 [Remote][Ext → Win][20464562][len: 6599] 1328 - receiveRequest MainThreadDiagnostics.$changeMany( generated_diagnostic_collection_name#0 Array(1) )
workbench.desktop.main.js:1690 [Remote][Win → Ext][4337332][len: 5] 1328 - ack undefined
workbench.desktop.main.js:1690 [Remote][Win → Ext][4337337][len: 5] 1328 - reply: undefined
workbench.desktop.main.js:1690 [LocalProcess][Win → Ext][5901800][len: 13705] 239 - request: ExtHostDiagnostics.$acceptMarkersChange( Array(1) )
workbench.desktop.main.js:1690 [LocalProcess][Ext → Win][ 32260][len: 5] 239 - ack undefined
workbench.desktop.main.js:1690 [LocalProcess][Ext → Win][ 32265][len: 5] 239 - receiveReply: undefined
workbench.desktop.main.js:1690 [Remote][Ext → Win][21186859][len: 722297] 279 - receiveReply: Array(450)
workbench.desktop.main.js:1690 [Remote][Ext → Win][21187291][len: 432] 284 - receiveReply: Object
workbench.desktop.main.js:1690 [Remote][Ext → Win][21187296][len: 5] 286 - receiveReply: undefined
workbench.desktop.main.js:1690 [Remote][Ext → Win][21187474][len: 178] 1329 - receiveRequest MainThreadStatusBar.$setEntry( 1 llvm-vs-code-extensions.vscode-clangd clangd (Extension) clangd: idle undefined Object undefined undefined true 10 undefined )
workbench.desktop.main.js:1690 [Remote][Win → Ext][4337342][len: 5] 1329 - ack undefined
workbench.desktop.main.js:1690 [Remote][Win → Ext][4337347][len: 5] 1329 - reply: undefined
workbench.desktop.main.js:1690 [Remote][Win → Ext][4337841][len: 494] 290 - request: ExtHostLanguageFeatures.$provideCodeActions( 8 vscode-remote://ssh-remote%2Bfile.h [10935,17 -> 10935,17] Object )
workbench.desktop.main.js:1690 [Remote][Ext → Win][21187584][len: 110] 1330 - receiveRequest MainThreadLanguageFeatures.$registerHoverProvider( 46 Array(1) )
workbench.desktop.main.js:1690 [Remote][Win → Ext][4337846][len: 5] 1330 - ack undefined
workbench.desktop.main.js:1690 [Remote][Ext → Win][21187694][len: 110] 1331 - receiveRequest MainThreadLanguageFeatures.$registerHoverProvider( 47 Array(1) )
workbench.desktop.main.js:1690 [Remote][Win → Ext][4337851][len: 5] 1331 - ack undefined
workbench.desktop.main.js:1690 [Remote][Ext → Win][21188168][len: 474] 1332 - receiveRequest MainThreadTextEditors.$trySetDecorations( vs.editor.ICodeEditor:1,$model11 TextEditorDecorationType2 Array(1) )
workbench.desktop.main.js:1690 [Remote][Win → Ext][4337856][len: 5] 1332 - ack undefined
workbench.desktop.main.js:1690 [Remote][Win → Ext][4337861][len: 5] 1330 - reply: undefined
workbench.desktop.main.js:1690 [Remote][Win → Ext][4337866][len: 5] 1331 - reply: undefined
workbench.desktop.main.js:1690 [Remote][Win → Ext][4337871][len: 5] 1332 - reply: undefined
workbench.desktop.main.js:1690 [Remote][Ext → Win][21188485][len: 317] 1333 - receiveRequest MainThreadStatusBar.$setEntry( 3 eamodio.gitlens.gitlens.blame GitLens Current Line Blame $(git-commit) *REMOVED Click to Show Commit Object undefined undefined false 1000 Object )
workbench.desktop.main.js:1690 [Remote][Win → Ext][4337876][len: 5] 1333 - ack undefined
workbench.desktop.main.js:1690 [Remote][Win → Ext][4337881][len: 5] 1333 - reply: undefined
workbench.desktop.main.js:1690 [LocalProcess][Win → Ext][5901956][len: 156] 240 - request: ExtHostFileSystemEventService.$onFileEvent( Object )
workbench.desktop.main.js:1690 [Remote][Win → Ext][4338037][len: 156] 291 - request: ExtHostFileSystemEventService.$onFileEvent( Object )
workbench.desktop.main.js:1690 [LocalProcess][Win → Ext][5902123][len: 167] 241 - request: ExtHostFileSystemEventService.$onFileEvent( Object )
workbench.desktop.main.js:1690 [Remote][Win → Ext][4338204][len: 167] 292 - request: ExtHostFileSystemEventService.$onFileEvent( Object )
workbench.desktop.main.js:1690 [LocalProcess][Ext → Win][ 32270][len: 5] 240 - ack undefined
workbench.desktop.main.js:1690 [LocalProcess][Ext → Win][ 32275][len: 5] 241 - ack undefined
workbench.desktop.main.js:1690 [LocalProcess][Ext → Win][ 32280][len: 5] 240 - receiveReply: undefined
workbench.desktop.main.js:1690 [LocalProcess][Ext → Win][ 32285][len: 5] 241 - receiveReply: undefined
workbench.desktop.main.js:1690 [Remote][Ext → Win][21188490][len: 5] 290 - ack undefined
workbench.desktop.main.js:1690 [Remote][Ext → Win][21188495][len: 5] 290 - receiveReply: undefined
workbench.desktop.main.js:1690 [Remote][Ext → Win][21188673][len: 178] 1334 - receiveRequest MainThreadStatusBar.$setEntry( 1 llvm-vs-code-extensions.vscode-clangd clangd (Extension) clangd: idle undefined Object undefined undefined true 10 undefined )
workbench.desktop.main.js:1690 [Remote][Win → Ext][4338209][len: 5] 1334 - ack undefined
workbench.desktop.main.js:1690 [Remote][Win → Ext][4338214][len: 5] 1334 - reply: undefined
workbench.desktop.main.js:1690 [Remote][Ext → Win][21188678][len: 5] 291 - ack undefined
workbench.desktop.main.js:1690 [Remote][Ext → Win][21188683][len: 5] 292 - ack undefined
workbench.desktop.main.js:1690 [Remote][Ext → Win][21188688][len: 5] 291 - receiveReply: undefined
workbench.desktop.main.js:1690 [Remote][Ext → Win][21188693][len: 5] 292 - receiveReply: undefined
workbench.desktop.main.js:1690 [Remote][Win → Ext][4338536][len: 322] 293 - request: ExtHostLanguageFeatures.$provideHover( 47 vscode-remote://ssh-remote%2Bfile.h (10931,22) )
workbench.desktop.main.js:1690 [Remote][Win → Ext][4338858][len: 322] 294 - request: ExtHostLanguageFeatures.$provideHover( 46 vscode-remote://ssh-remote%2Bfile.h (10931,22) )
workbench.desktop.main.js:1690 [Remote][Win → Ext][4339179][len: 321] 295 - request: ExtHostLanguageFeatures.$provideHover( 1 vscode-remote://ssh-remote%2Bfile.h (10931,22) )
workbench.desktop.main.js:1690 [Remote][Win → Ext][4339184][len: 5] 293 - cancel undefined
workbench.desktop.main.js:1690 [Remote][Win → Ext][4339189][len: 5] 294 - cancel undefined
workbench.desktop.main.js:1690 [Remote][Win → Ext][4339194][len: 5] 295 - cancel undefined
workbench.desktop.main.js:1690 [Remote][Ext → Win][21188698][len: 5] 293 - ack undefined
workbench.desktop.main.js:1690 [Remote][Ext → Win][21188703][len: 5] 294 - ack undefined
workbench.desktop.main.js:1690 [Remote][Ext → Win][21188708][len: 5] 295 - ack undefined
workbench.desktop.main.js:1690 [Remote][Ext → Win][21188713][len: 5] 293 - receiveReply: undefined
workbench.desktop.main.js:1690 [Remote][Ext → Win][21188718][len: 5] 294 - receiveReply: undefined
workbench.desktop.main.js:1690 [Remote][Win → Ext][4339488][len: 294] 296 - request: ExtHostLanguageFeatures.$provideCodeLenses( 36 vscode-remote://ssh-remote%2Bfile.h )
workbench.desktop.main.js:1690 [Remote][Win → Ext][4339782][len: 294] 297 - request: ExtHostLanguageFeatures.$provideCodeLenses( 33 vscode-remote://ssh-remote%2Bfile.h )
workbench.desktop.main.js:1690 [Remote][Ext → Win][21188983][len: 265] 295 - receiveReply: Object
workbench.desktop.main.js:1690 [Remote][Ext → Win][21189161][len: 178] 1335 - receiveRequest MainThreadStatusBar.$setEntry( 1 llvm-vs-code-extensions.vscode-clangd clangd (Extension) clangd: idle undefined Object undefined undefined true 10 undefined )
workbench.desktop.main.js:1690 [Remote][Win → Ext][4339787][len: 5] 1335 - ack undefined
workbench.desktop.main.js:1690 [Remote][Win → Ext][4339792][len: 5] 1335 - reply: undefined
workbench.desktop.main.js:1690 [Remote][Win → Ext][4340118][len: 326] 298 - request: ExtHostLanguageFeatures.$provideDefinition( 3 vscode-remote://ssh-remote%2Bfile.h (10934,18) )
workbench.desktop.main.js:1690 [Remote][Win → Ext][4340440][len: 322] 299 - request: ExtHostLanguageFeatures.$provideHover( 47 vscode-remote://ssh-remote%2Bfile.h (10934,18) )
workbench.desktop.main.js:1690 [Remote][Win → Ext][4340762][len: 322] 300 - request: ExtHostLanguageFeatures.$provideHover( 46 vscode-remote://ssh-remote%2Bfile.h (10934,18) )
workbench.desktop.main.js:1690 [Remote][Win → Ext][4341083][len: 321] 301 - request: ExtHostLanguageFeatures.$provideHover( 1 vscode-remote://ssh-remote%2Bfile.h (10934,18) )
workbench.desktop.main.js:1690 [Remote][Win → Ext][4341417][len: 334] 302 - request: ExtHostLanguageFeatures.$provideDocumentHighlights( 5 vscode-remote://ssh-remote%2Bfile.h (10934,18) )
workbench.desktop.main.js:1690 [LocalProcess][Win → Ext][5902471][len: 348] 242 - request: ExtHostEditors.$acceptEditorPropertiesChanged( vs.editor.ICodeEditor:1,$model11 Object )
workbench.desktop.main.js:1690 [Remote][Win → Ext][4341765][len: 348] 303 - request: ExtHostEditors.$acceptEditorPropertiesChanged( vs.editor.ICodeEditor:1,$model11 Object )
workbench.desktop.main.js:1690 [Remote][Win → Ext][4341770][len: 5] 299 - cancel undefined
workbench.desktop.main.js:1690 [Remote][Win → Ext][4341775][len: 5] 300 - cancel undefined
workbench.desktop.main.js:1690 [Remote][Win → Ext][4341780][len: 5] 301 - cancel undefined
workbench.desktop.main.js:1690 [LocalProcess][Ext → Win][ 32290][len: 5] 242 - ack undefined
workbench.desktop.main.js:1690 [LocalProcess][Ext → Win][ 32295][len: 5] 242 - receiveReply: undefined
workbench.desktop.main.js:1690 [Remote][Win → Ext][4342106][len: 326] 304 - request: ExtHostLanguageFeatures.$provideDefinition( 3 vscode-remote://ssh-remote%2Bfile.h (10934,18) )
workbench.desktop.main.js:1690 [Remote][Win → Ext][4342600][len: 494] 305 - request: ExtHostLanguageFeatures.$provideCodeActions( 8 vscode-remote://ssh-remote%2Bfile.h [10934,18 -> 10934,18] Object )
workbench.desktop.main.js:1690 [Remote][Win → Ext][4342922][len: 322] 306 - request: ExtHostLanguageFeatures.$provideHover( 47 vscode-remote://ssh-remote%2Bfile.h (10934,18) )
workbench.desktop.main.js:1690 [Remote][Win → Ext][4343244][len: 322] 307 - request: ExtHostLanguageFeatures.$provideHover( 46 vscode-remote://ssh-remote%2Bfile.h (10934,18) )
workbench.desktop.main.js:1690 [Remote][Win → Ext][4343565][len: 321] 308 - request: ExtHostLanguageFeatures.$provideHover( 1 vscode-remote://ssh-remote%2Bfile.h (10934,18) )
workbench.desktop.main.js:1690 [Remote][Win → Ext][4343570][len: 5] 306 - cancel undefined
workbench.desktop.main.js:1690 [Remote][Win → Ext][4343575][len: 5] 307 - cancel undefined
workbench.desktop.main.js:1690 [Remote][Win → Ext][4343580][len: 5] 308 - cancel undefined
workbench.desktop.main.js:1690 [Remote][Win → Ext][4343902][len: 322] 309 - request: ExtHostLanguageFeatures.$provideHover( 47 vscode-remote://ssh-remote%2Bfile.h (10937,13) )
workbench.desktop.main.js:1690 [Remote][Win → Ext][4344224][len: 322] 310 - request: ExtHostLanguageFeatures.$provideHover( 46 vscode-remote://ssh-remote%2Bfile.h (10937,13) )
workbench.desktop.main.js:1690 [Remote][Win → Ext][4344545][len: 321] 311 - request: ExtHostLanguageFeatures.$provideHover( 1 vscode-remote://ssh-remote%2Bfile.h (10937,13) )
workbench.desktop.main.js:1690 [Remote][Win → Ext][4344550][len: 5] 309 - cancel undefined
workbench.desktop.main.js:1690 [Remote][Win → Ext][4344555][len: 5] 310 - cancel undefined
workbench.desktop.main.js:1690 [Remote][Win → Ext][4344560][len: 5] 311 - cancel undefined
workbench.desktop.main.js:1690 [Remote][Win → Ext][4344882][len: 322] 312 - request: ExtHostLanguageFeatures.$provideHover( 47 vscode-remote://ssh-remote%2Bfile.h (10937,12) )
workbench.desktop.main.js:1690 [Remote][Win → Ext][4345204][len: 322] 313 - request: ExtHostLanguageFeatures.$provideHover( 46 vscode-remote://ssh-remote%2Bfile.h (10937,12) )
workbench.desktop.main.js:1690 [Remote][Win → Ext][4345525][len: 321] 314 - request: ExtHostLanguageFeatures.$provideHover( 1 vscode-remote://ssh-remote%2Bfile.h (10937,12) )
workbench.desktop.main.js:1690 [Remote][Win → Ext][4345530][len: 5] 312 - cancel undefined
workbench.desktop.main.js:1690 [Remote][Win → Ext][4345535][len: 5] 313 - cancel undefined
workbench.desktop.main.js:1690 [Remote][Win → Ext][4345540][len: 5] 314 - cancel undefined
workbench.desktop.main.js:1690 [LocalProcess][Win → Ext][5902512][len: 41] 243 - request: ExtHostWindow.$onDidChangeWindowFocus( false )
workbench.desktop.main.js:1690 [Remote][Win → Ext][4345581][len: 41] 315 - request: ExtHostWindow.$onDidChangeWindowFocus( false )
workbench.desktop.main.js:1690 [LocalProcess][Ext → Win][ 32300][len: 5] 243 - ack undefined
workbench.desktop.main.js:1690 [LocalProcess][Ext → Win][ 32305][len: 5] 243 - receiveReply: undefined
workbench.desktop.main.js:616 INFO [remote-connection][ExtensionHost][78e82…][reconnect] received socket timeout event (unacknowledgedMsgCount: 34, timeSinceOldestUnacknowledgedMsg: 20021, timeSinceLastReceivedSomeData: 20007).
workbench.desktop.main.js:616 INFO [remote-connection][ExtensionHost][78e82…][reconnect] starting reconnecting loop. You can get more information with the trace log level.
workbench.desktop.main.js:616 INFO [remote-connection][ExtensionHost][78e82…][reconnect] resolving connection...
workbench.desktop.main.js:616 INFO [remote-connection][ExtensionHost][78e82…][reconnect] connecting to 127.0.0.1:63376...
workbench.desktop.main.js:616 INFO [remote-connection][ExtensionHost][78e82…][reconnect] reconnected!
workbench.desktop.main.js:1690 [LocalProcess][Win → Ext][5903640][len: 1128] 244 - request: ExtHostDocuments.$acceptModelChanged( output:rendererLog Object false )
workbench.desktop.main.js:1690 [LocalProcess][Win → Ext][5903843][len: 203] 245 - request: ExtHostEditors.$acceptEditorPropertiesChanged( vs.editor.ICodeEditor:2,$model2 Object )
workbench.desktop.main.js:1690 [Remote][Win → Ext][4346709][len: 1128] 316 - request: ExtHostDocuments.$acceptModelChanged( output:rendererLog Object false )
workbench.desktop.main.js:1690 [Remote][Win → Ext][4346912][len: 203] 317 - request: ExtHostEditors.$acceptEditorPropertiesChanged( vs.editor.ICodeEditor:2,$model2 Object )
workbench.desktop.main.js:1690 [LocalProcess][Ext → Win][ 32310][len: 5] 244 - ack undefined
workbench.desktop.main.js:1690 [LocalProcess][Ext → Win][ 32315][len: 5] 245 - ack undefined
workbench.desktop.main.js:1690 [LocalProcess][Ext → Win][ 32320][len: 5] 244 - receiveReply: undefined
workbench.desktop.main.js:1690 [LocalProcess][Ext → Win][ 32325][len: 5] 245 - receiveReply: undefined
workbench.desktop.main.js:1690 [Remote][Win → Ext][4347062][len: 150] 318 - request: ExtHostLanguageFeatures.$provideDocumentLinks( 17 output:rendererLog )
workbench.desktop.main.js:1690 [LocalProcess][Win → Ext][5903883][len: 40] 246 - request: ExtHostWindow.$onDidChangeWindowFocus( true )
workbench.desktop.main.js:1690 [Remote][Win → Ext][4347102][len: 40] 319 - request: ExtHostWindow.$onDidChangeWindowFocus( true )
workbench.desktop.main.js:1690 [LocalProcess][Ext → Win][ 32330][len: 5] 246 - ack undefined
workbench.desktop.main.js:1690 [LocalProcess][Ext → Win][ 32335][len: 5] 246 - receiveReply: undefined
workbench.desktop.main.js:1690 [Remote][Win → Ext][4347107][len: 5] 296 - cancel undefined
workbench.desktop.main.js:1690 [Remote][Win → Ext][4347112][len: 5] 297 - cancel undefined
workbench.desktop.main.js:1690 [Remote][Win → Ext][4347406][len: 294] 320 - request: ExtHostLanguageFeatures.$provideCodeLenses( 36 vscode-remote://ssh-remote%2Bfile.h )
workbench.desktop.main.js:1690 [Remote][Win → Ext][4347700][len: 294] 321 - request: ExtHostLanguageFeatures.$provideCodeLenses( 33 vscode-remote://ssh-remote%2Bfile.h )
workbench.desktop.main.js:1690 [LocalProcess][Win → Ext][5903924][len: 41] 247 - request: ExtHostWindow.$onDidChangeWindowFocus( false )
workbench.desktop.main.js:1690 [Remote][Win → Ext][4347741][len: 41] 322 - request: ExtHostWindow.$onDidChangeWindowFocus( false )
workbench.desktop.main.js:1690 [LocalProcess][Ext → Win][ 32340][len: 5] 247 - ack undefined
workbench.desktop.main.js:1690 [LocalProcess][Ext → Win][ 32345][len: 5] 247 - receiveReply: undefined
workbench.desktop.main.js:616 INFO [remote-connection][ExtensionHost][78e82…][reconnect] received socket timeout event (unacknowledgedMsgCount: 43, timeSinceOldestUnacknowledgedMsg: 20008, timeSinceLastReceivedSomeData: 20008).
workbench.desktop.main.js:616 INFO [remote-connection][ExtensionHost][78e82…][reconnect] starting reconnecting loop. You can get more information with the trace log level.
workbench.desktop.main.js:616 INFO [remote-connection][ExtensionHost][78e82…][reconnect] resolving connection...
workbench.desktop.main.js:616 INFO [remote-connection][ExtensionHost][78e82…][reconnect] connecting to 127.0.0.1:63376...
workbench.desktop.main.js:616 INFO [remote-connection][ExtensionHost][78e82…][reconnect] reconnected!

@software-artisan
Copy link

I see this issue as well. Happens when the connection speed is slow: say 100 kBps or less. Can't this hard coded timeout of 20 seconds (described further above) be made configurable? 20s is too low on a slow connection. Only way out of this is to keep retrying and hope that it connects somehow or move to a faster connection.

@alexdima
Copy link
Member

@Yelnats321 apologies for the slow response here. In your log, I find interesting that the last requests the UI side made to the remote extension host were for asking it for code lenses:

> workbench.desktop.main.js:1690 [Remote][Win → Ext][4339488][len:   294]  296 - request: ExtHostLanguageFeatures.$provideCodeLenses( 36 vscode-remote://ssh-remote%2Bfile.h )
> workbench.desktop.main.js:1690 [Remote][Win → Ext][4339782][len:   294]  297 - request: ExtHostLanguageFeatures.$provideCodeLenses( 33 vscode-remote://ssh-remote%2Bfile.h )

After the above two requests, the remote extension host never comes back for 20s, thus triggering the reconnection logic.

Does it make a difference when disabling code lenses? "editor.codeLens": false

@software-artisan
Copy link

software-artisan commented Mar 6, 2023

I see this issue as well. Happens when the connection speed is slow: say 100 kBps or less. Can't this hard coded timeout of 20 seconds (described further above) be made configurable? 20s is too low on a slow connection. Only way out of this is to keep retrying and hope that it connects somehow or move to a faster connection.

Some additional observations
-- each time a timeout happens, a new ssh process is launched by vscode. And the old one also remains. So pretty soon, after a few timeouts, there are several ssh processes running, each still sending and receiving network traffic (seen using sysinternals process explorer)
-- If the remote connection is closed, using File > Close Remote workspace or similar, the network activity stops but the ssh process remains
-- only after exiting from vscode, the ssh processes go away.

@mmohdnowfal
Copy link

Is there a way to change the 20s timeout mentioned in this thread?

@fred-renner
Copy link

@alexdima thanks for the observation! I have the same issue and after uninstalling the GitLens extension I could reconnect.

@YahangWu
Copy link

I was able to work around this by turning off Remote.SSH: Use Local Server in the vscode settings.

@StephLee12
Copy link

I was able to work around this by turning off Remote.SSH: Use Local Server in the vscode settings.

Thank you so much! It worked!

@li1234yun
Copy link

I found the server log at the same time:

2024-02-03 08:57:50.876 [info] Extension host agent started.
2024-02-03 08:57:50.948 [info] [127.0.0.1][947993ef][ManagementConnection] New connection established.
2024-02-03 08:57:50.959 [info] [127.0.0.1][b634fab2][ExtensionHostConnection] New connection established.
2024-02-03 08:57:51.085 [info] [127.0.0.1][b634fab2][ExtensionHostConnection] <2994069> Launched Extension Host Process.
2024-02-03 08:57:58.870 [error] CodeExpectedError: Could not find pty on pty host
    at A.U (/home/lzy/.vscode-server/bin/05047486b6df5eb8d44b2ecd70ea3bdf775fd937/out/vs/platform/terminal/node/ptyHostMain.js:43:32407)
    at A.updateIcon (/home/lzy/.vscode-server/bin/05047486b6df5eb8d44b2ecd70ea3bdf775fd937/out/vs/platform/terminal/node/ptyHostMain.js:43:27592)
    at U.<computed> (/home/lzy/.vscode-server/bin/05047486b6df5eb8d44b2ecd70ea3bdf775fd937/out/vs/platform/terminal/node/ptyHostMain.js:43:22765)
    at Object.call (/home/lzy/.vscode-server/bin/05047486b6df5eb8d44b2ecd70ea3bdf775fd937/out/vs/platform/terminal/node/ptyHostMain.js:34:5041)
    at $.s (/home/lzy/.vscode-server/bin/05047486b6df5eb8d44b2ecd70ea3bdf775fd937/out/vs/platform/terminal/node/ptyHostMain.js:32:5153)
    at $.q (/home/lzy/.vscode-server/bin/05047486b6df5eb8d44b2ecd70ea3bdf775fd937/out/vs/platform/terminal/node/ptyHostMain.js:32:4662)
    at a.value (/home/lzy/.vscode-server/bin/05047486b6df5eb8d44b2ecd70ea3bdf775fd937/out/vs/platform/terminal/node/ptyHostMain.js:32:4064)
    at d.y (/home/lzy/.vscode-server/bin/05047486b6df5eb8d44b2ecd70ea3bdf775fd937/out/vs/platform/terminal/node/ptyHostMain.js:27:1906)
    at d.fire (/home/lzy/.vscode-server/bin/05047486b6df5eb8d44b2ecd70ea3bdf775fd937/out/vs/platform/terminal/node/ptyHostMain.js:27:2123)
    at process.ne (/home/lzy/.vscode-server/bin/05047486b6df5eb8d44b2ecd70ea3bdf775fd937/out/vs/platform/terminal/node/ptyHostMain.js:25:10072)
    at process.emit (node:events:514:28)
    at emit (node:internal/child_process:937:14)
    at process.processTicksAndRejections (node:internal/process/task_queues:83:21)
2024-02-03 08:58:07.125 [info] Getting Manifest... anweber.vscode-httpyac
2024-02-03 08:58:07.380 [info] Installing extension: anweber.vscode-httpyac
2024-02-03 08:58:09.409 [info] Extension signature is verified: anweber.vscode-httpyac
2024-02-03 08:58:09.462 [info] Extracted extension to file:///home/lzy/.vscode-server/extensions/anweber.vscode-httpyac-6.11.4: anweber.vscode-httpyac
2024-02-03 08:58:09.465 [info] Renamed to /home/lzy/.vscode-server/extensions/anweber.vscode-httpyac-6.11.4
2024-02-03 08:58:09.467 [info] Extracting extension completed. anweber.vscode-httpyac
2024-02-03 08:58:09.471 [info] Extension installed successfully: anweber.vscode-httpyac
2024-02-03 08:58:09.474 [info] Marked extension as uninstalled anweber.vscode-httpyac-6.11.3
2024-02-03 09:02:50.876 [info] New EH opened, aborting shutdown
2024-02-03 09:04:08.528 [info] [127.0.0.1][947993ef][ManagementConnection] The client has disconnected gracefully, so the connection will be disposed.
2024-02-03 09:04:08.600 [info] [127.0.0.1][b634fab2][ExtensionHostConnection] <2994069> Extension Host Process exited with code: 0, signal: null.
2024-02-03 09:04:08.601 [info] Last EH closed, waiting before shutting down
2024-02-03 09:04:09.967 [info] Got delay-shutdown request while in shutdown timeout, delaying
2024-02-03 09:04:09.967 [info] Cancelling previous shutdown timeout
2024-02-03 09:04:10.048 [info] [127.0.0.1][a201e897][ManagementConnection] New connection established.
2024-02-03 09:04:10.099 [info] [127.0.0.1][e90a3ee8][ExtensionHostConnection] New connection established.
2024-02-03 09:04:10.107 [info] [127.0.0.1][e90a3ee8][ExtensionHostConnection] <2997441> Launched Extension Host Process.
2024-02-03 09:09:09.968 [info] New EH opened, aborting shutdown
2024-02-03 09:50:03.185 [info] [127.0.0.1][e90a3ee8][ExtensionHostConnection] The client has reconnected.
2024-02-03 09:50:30.092 [info] [127.0.0.1][e90a3ee8][ExtensionHostConnection] The client has reconnected.
2024-02-03 09:50:50.611 [info] [127.0.0.1][e90a3ee8][ExtensionHostConnection] The client has reconnected.
2024-02-03 09:51:19.304 [info] [127.0.0.1][e90a3ee8][ExtensionHostConnection] The client has reconnected.
2024-02-03 09:51:39.352 [info] [127.0.0.1][e90a3ee8][ExtensionHostConnection] The client has reconnected.
2024-02-03 09:51:59.415 [info] [127.0.0.1][e90a3ee8][ExtensionHostConnection] The client has reconnected.
2024-02-03 09:52:19.475 [info] [127.0.0.1][e90a3ee8][ExtensionHostConnection] The client has reconnected.
2024-02-03 09:52:52.042 [info] [127.0.0.1][e90a3ee8][ExtensionHostConnection] The client has reconnected.
2024-02-03 09:53:12.163 [info] [127.0.0.1][e90a3ee8][ExtensionHostConnection] The client has reconnected.
2024-02-03 09:53:32.239 [info] [127.0.0.1][e90a3ee8][ExtensionHostConnection] The client has reconnected.
2024-02-03 09:53:52.299 [info] [127.0.0.1][e90a3ee8][ExtensionHostConnection] The client has reconnected.
2024-02-03 09:54:12.356 [info] [127.0.0.1][e90a3ee8][ExtensionHostConnection] The client has reconnected.
2024-02-03 09:54:32.481 [info] [127.0.0.1][e90a3ee8][ExtensionHostConnection] The client has reconnected.
2024-02-03 09:54:52.615 [info] [127.0.0.1][e90a3ee8][ExtensionHostConnection] The client has reconnected.
2024-02-03 09:55:12.683 [info] [127.0.0.1][e90a3ee8][ExtensionHostConnection] The client has reconnected.
2024-02-03 09:55:32.728 [info] [127.0.0.1][e90a3ee8][ExtensionHostConnection] The client has reconnected.

@tandem97
Copy link

tandem97 commented Mar 24, 2024

Same situation. I see this messages just after refresh source control. But i can't understand after what event vs code brokes.

@ACodingfreak
Copy link

Same issue observed with remote host as ubuntu 22.04 from visual studio code 1.89

@working-name
Copy link

Still a problem with a remote debian 12, local macOS. It's timer based, can't figure out how long, but not long at all, probably around 5 minutes. Then you can't save changes, and reconnecting to SSH: ... appears. And stays forever.

This seems to happen randomly after a prolonged uptime with Visual Studio Code running. Since it's a laptop mac, it's also going trough a bunch of network changes and sleep-wake cycles. Something about these changes messes up this extension. Nothing else as far as I have noticed.

Remote SSH 0.4.3 running on the remote system.
Remote.SSH: Use Local Server is off, does not fix the issue.
Visual Studio Code 1.90.1

No network issue, no ssh issue, no firewall issue. I can always resume working if I close this window and then reopen. For some unknown reason one can't open 2 VSC windows on the same remote folder path 🤷

Console messages complains about not being to resolve the host? After having resolved it and connected to it. Very odd.

 INFO [LocalProcess0][resolveAuthority(ssh-remote,2)][579006ms] waiting...
workbench.desktop.main.js:655  INFO [LocalProcess0][resolveAuthority(ssh-remote,2)][580006ms] waiting...
workbench.desktop.main.js:655  INFO [LocalProcess0][resolveAuthority(ssh-remote,2)][581006ms] waiting...
workbench.desktop.main.js:655  INFO [LocalProcess0][resolveAuthority(ssh-remote,2)][582006ms] waiting...
workbench.desktop.main.js:655  INFO [LocalProcess0][resolveAuthority(ssh-remote,2)][583006ms] waiting...
workbench.desktop.main.js:655  INFO [LocalProcess0][resolveAuthority(ssh-remote,2)][584006ms] waiting...
workbench.desktop.main.js:655  INFO [LocalProcess0][resolveAuthority(ssh-remote,2)][585006ms] waiting...
workbench.desktop.main.js:655  INFO [LocalProcess0][resolveAuthority(ssh-remote,2)][586007ms] waiting...
workbench.desktop.main.js:655  INFO [LocalProcess0][resolveAuthority(ssh-remote,2)][587006ms] waiting...
workbench.desktop.main.js:655  INFO [LocalProcess0][resolveAuthority(ssh-remote,2)][588006ms] waiting...
workbench.desktop.main.js:655  INFO [LocalProcess0][resolveAuthority(ssh-remote,2)][589006ms] waiting...
workbench.desktop.main.js:655  INFO [LocalProcess0][resolveAuthority(ssh-remote,2)][590006ms] waiting...
workbench.desktop.main.js:655  INFO [LocalProcess0][resolveAuthority(ssh-remote,2)][591007ms] waiting...
workbench.desktop.main.js:655  INFO [LocalProcess0][resolveAuthority(ssh-remote,2)][592006ms] waiting...
workbench.desktop.main.js:655  INFO [LocalProcess0][resolveAuthority(ssh-remote,2)][593006ms] waiting...
workbench.desktop.main.js:655  INFO [LocalProcess0][resolveAuthority(ssh-remote,2)][594006ms] waiting...
workbench.desktop.main.js:655  INFO [LocalProcess0][resolveAuthority(ssh-remote,2)][595006ms] waiting...
workbench.desktop.main.js:655  INFO [LocalProcess0][resolveAuthority(ssh-remote,2)][596006ms] waiting...
workbench.desktop.main.js:655  INFO [LocalProcess0][resolveAuthority(ssh-remote,2)][597006ms] waiting...
workbench.desktop.main.js:655  INFO [LocalProcess0][resolveAuthority(ssh-remote,2)][598006ms] waiting...
workbench.desktop.main.js:655  INFO [LocalProcess0][resolveAuthority(ssh-remote,2)][599006ms] waiting...
workbench.desktop.main.js:655  INFO [LocalProcess0][resolveAuthority(ssh-remote,2)][600006ms] waiting...
workbench.desktop.main.js:655  INFO [LocalProcess0][resolveAuthority(ssh-remote,2)][601006ms] waiting...
workbench.desktop.main.js:655  INFO [LocalProcess0][resolveAuthority(ssh-remote,2)][602006ms] waiting...
workbench.desktop.main.js:655  INFO [remote-connection][ExtensionHost][7b74c…][reconnect] received socket timeout event (unacknowledgedMsgCount: 296, timeSinceOldestUnacknowledgedMsg: 622654, timeSinceLastReceivedSomeData: 622731).

Turned on debug logging but can't find anything in ~/.vscode, don't know where you're writing the logfile.

@LGLG42
Copy link

LGLG42 commented Jul 10, 2024

I'm also facing this issue for some time now. Renders remote notebooks unstable causing countless hours of work lost since they're also not autosaved for some weird reason.

@davidavdav
Copy link

Same for me since a couple of days --- an unworkable situation. Remote ssh connections suddenly disconnect, after about one minute, and then an endless unsuccessful "reconnect" lower left status appears with an unusable editor. Restart of vscode locally fixes problem, but then problem kicks in after one minute again

@tangy1227
Copy link

I run into the same problem. Every time I edit something, VSCode reconnects. It seems the issue arises because of the AI code assistant I am using (the 'Continue' extension). Each time I edit something, the autocomplete function of this extension may be performing extensive processing, which causes the processing time to exceed the connection timeout in VSCode, leading to reconnections.

@davidavdav
Copy link

Ah --- that might explain things. I also recently installed that extension, for amusement purposes mainly, although I've had cases where it writes 2 or so lines according to my intentions.

I'll deactivate that and see if that helps, thanks!

@sdesojo
Copy link

sdesojo commented Aug 28, 2024

same issue here, but without using AI code assistants. I tried the solutions above: rm -rf ~/.vscode-server/ rm -rf ~/.vscode-remote/, and disabling remote.SSH.useExecServer, remote.SSH.useLocalServer, without any luck. VSCode Version: 1.92.2 (Universal), Local OS Version: Apple M1 macOS 14.6.1 (23G93, Remote OS Version: Debian GNU/Linux 12 (bookworm), Remote Extension/Connection Type: SSH

@MasterVegito
Copy link

rm -rf ~/.vscode-server/ Is a must have. It's not a problem with the host or SSH, it's VSC. Still not fixed after 2 years..... Microsoft quality at it's finest.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests