[COMPASS-5454] Tunneled connection entirely lost after Windows wakes up from sleep Created: 25/Jan/22  Updated: 10/Jan/24  Resolved: 17/May/22

Status: Closed
Project: Compass
Component/s: Compass, Connectivity
Affects Version/s: None
Fix Version/s: 1.31.3

Type: Bug Priority: Major - P3
Reporter: Yegor Petrov Assignee: Le Roux Bodenstein
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows 10 x64 19043.1466


Attachments: PNG File 2022-01-25_10-19-21.png     PNG File image-2022-01-25-10-21-06-199.png     PNG File image-2022-03-12-18-57-27-856.png    
Story Points: 3
Documentation Changes: Not Needed
Sprint: Iteration Xochimilco, Iteration Yonkers, Iteration Zanzibar, Iteration Barnacle

 Description   

Problem Statement/Rationale

MongoDB compass reports lost SSH connection after I wake up my Windows laptop from sleep. No options to reconnect are offered.

Steps to Reproduce

Connect to a MongoDB from Compass using its built-in SSH tunnel

Switch your PC to Sleep mode

Wait a little for the connection to "die" (I did not experiment a lot to determine the amount of time, but you have to give it some time)

Wake it up and try to use the MongoDB Compass instance (i.e. make it fetch some data throught the dead connection)

Expected Results

I'd expect the built-in SSH tunnel to be reinstated automatically, or at the very least to get some button for a manual attempt

Actual Results

A red message box is shown inside the data viewport with some low level message indicating an SSH tunnel failure.

Additional Notes

This issue poses a major usability problem for anyone routinely using the sleep mode and trying to continue their work afterwards. Like when you leave a bunch of tabs open with filters, projection and sorting options carefully crafted for some investigative task, and then you have to close them to re-establish the connection. It's a waste of time.

Please ignore the "Non-genuine MongoDB" label in the screenshot. The problem looks the same with genuine installations.



 Comments   
Comment by Githook User [ 19/May/22 ]

Author:

{'name': 'Le Roux Bodenstein', 'email': 'lerouxb@gmail.com', 'username': 'lerouxb'}

Message: fix(ssh-tunnel): reconnect the ssh tunnel when it gets disconnected COMPASS-5454 (#3096)

  • reconnect the ssh tunnel when it gets disconnected
  • closed
  • rm comment
  • close event called whenever error event called
  • unused
  • reconnect tests
  • :lipstick:
  • remove AbortController. Too much effort for now.
  • no need for try/finally
  • another unnecessary try/finally
  • :lipstick:
  • :lipstick:
  • pass DEBUG
  • clear the cached promise even if we throw
Comment by Githook User [ 17/May/22 ]

Author:

{'name': 'Le Roux Bodenstein', 'email': 'lerouxb@gmail.com', 'username': 'lerouxb'}

Message: fix(ssh-tunnel): reconnect the ssh tunnel when it gets disconnected COMPASS-5454 (#3096)

  • reconnect the ssh tunnel when it gets disconnected
  • closed
  • rm comment
  • close event called whenever error event called
  • unused
  • reconnect tests
  • :lipstick:
  • remove AbortController. Too much effort for now.
  • no need for try/finally
  • another unnecessary try/finally
  • :lipstick:
  • :lipstick:
  • pass DEBUG
  • clear the cached promise even if we throw
Comment by Githook User [ 17/May/22 ]

Author:

{'name': 'Le Roux Bodenstein', 'email': 'lerouxb@gmail.com', 'username': 'lerouxb'}

Message: fix(ssh-tunnel): reconnect the ssh tunnel when it gets disconnected COMPASS-5454 (#3096)

  • reconnect the ssh tunnel when it gets disconnected
  • closed
  • rm comment
  • close event called whenever error event called
  • unused
  • reconnect tests
  • :lipstick:
  • remove AbortController. Too much effort for now.
  • no need for try/finally
  • another unnecessary try/finally
  • :lipstick:
  • :lipstick:
  • pass DEBUG
  • clear the cached promise even if we throw
Comment by Githook User [ 17/May/22 ]

Author:

{'name': 'Le Roux Bodenstein', 'email': 'lerouxb@gmail.com', 'username': 'lerouxb'}

Message: fix(ssh-tunnel): reconnect the ssh tunnel when it gets disconnected COMPASS-5454 (#3096)

  • reconnect the ssh tunnel when it gets disconnected
  • closed
  • rm comment
  • close event called whenever error event called
  • unused
  • reconnect tests
  • :lipstick:
  • remove AbortController. Too much effort for now.
  • no need for try/finally
  • another unnecessary try/finally
  • :lipstick:
  • :lipstick:
  • pass DEBUG
  • clear the cached promise even if we throw
Comment by Yegor Petrov [ 12/Mar/22 ]

It looks like any network configuration change can lead to this. For example, when I switch OpenVPN on/off then SSH-tunneled instances of Compass become unusable. All I get in build aa675d2968d7caa9935677452a927c7c6cac16dc is "Socket closed". "Disconnect" does not do anything.

Generated at Wed Feb 07 22:39:37 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.