Robomongo: Connectivity NOT Closed to 'Disconnected' Hosts

Created on 16 Jan 2017  路  9Comments  路  Source: Studio3T/robomongo

Symptom:
RoboMongo has some form of lingering connectivity to disconnected hosts.

Reproduce:

  1. Open an SSH tunnel to a remote host with port forwarding for Mongo connections (Eg: -L 27017:localhost:27017)
  2. Connect to the SSH tunneled host using RoboMongo
  3. Close the connection in RoboMongo (Rightclick the connection, and click 'disconnect')
  4. Attempt to close the SSH session.

You'll notice that the SSH session will not close, a symptom that the port forward is still in use.

Workaround:
Entirely exit the RoboMongo client - the SSH connection will immediately terminate, confirming that there was some lingering activity.

Notes:
I've not had time to further investigate, but confirmed this happens on both Linux and Mac client.

needs investigation needs repro

Most helpful comment

I have the exact same problem. It might help debugging to switch process 3 and 4, and add 5:

  1. Close ssh session by typing exit or hitting Ctrl-D. It does log out, but note that the ssh process is now blocking, and not returning to the local shell.
  2. Disconnect from the host via RoboMongo. Notice no change to ssh. (This is the bug!)
  3. Quit RoboMongo. Ah! Now the ssh session finally closes, and you can see your local shell prompt. (This is what we expected in step 4.)

I am on Mac OS X with 0.9.0. Had the same with the previous version I was using, which was some RC less than 6. Cheers!

All 9 comments

Hi @dmblack , thanks a lot for reporting the problem with steps and all those details.
I have tried to reproduce the scenario.

1. Open an SSH tunnel to a remote host with port forwarding for Mongo connections (Eg: -L 27017:localhost:27017)

2. Connect to the SSH tunneled host using RoboMongo  // assuming SSH not enabled on Robomongo, since we are using terminal for SSH port forwarding

3. Close the connection in RoboMongo (Rightclick the connection, and click 'disconnect')

4. Attempt to close the SSH session.  // assuming it fails to exit from ssh forwarding session on terminal

I can close the SSH forwarding session on MAC terminal. Can you check my understanding (assumptions) above and maybe give a screenshot of the exact problem or error?

Note:
I also tested normal SSH connection (without port forwarding, using Robomongo SSH tab).
For this scenario also, disconnecting connection from Robomongo ends the SSH session as expected.

Jan 18 11:03:30 gman-mac sshd[57177]: Connection from 192.168.2.100 port 40670 on 192.168.2.176 port 22
Jan 18 11:03:30 gman-mac sshd[57177]: Accepted password for gsimsek from 192.168.2.100 port 40670 ssh2
...
...
// Disconnected connection from Robomongo
Jan 18 11:03:42 gman-mac sshd[57179]: Received disconnect from 192.168.2.100: 11: Client disconnecting normally
Jan 18 11:03:42 gman-mac sshd[57179]: Disconnected from 192.168.2.100

Hey @simsekgokhan

On two linux (Debian) boxes, and two mac's (One on Sierra, one El Capitan), when I attempt to 'exit' the ssh tunnel, the session does not close.

  1. Open the SSH tunnel with port forwarding.
  2. Connect via the forwarded ports using RoboMongo
  3. Disconnect from the host via RoboMongo
  4. Attempt to close the SSH tunnel exit.

My sessions all hang at 'logout'.

If I close the RoboMongo client, the ssh connection will immediately close.

I have the exact same problem. It might help debugging to switch process 3 and 4, and add 5:

  1. Close ssh session by typing exit or hitting Ctrl-D. It does log out, but note that the ssh process is now blocking, and not returning to the local shell.
  2. Disconnect from the host via RoboMongo. Notice no change to ssh. (This is the bug!)
  3. Quit RoboMongo. Ah! Now the ssh session finally closes, and you can see your local shell prompt. (This is what we expected in step 4.)

I am on Mac OS X with 0.9.0. Had the same with the previous version I was using, which was some RC less than 6. Cheers!

@simsekgokhan
Let me know if there's anything further you require. (Noted this ticket is still in 'waiting for information').

@dmblack
Thanks, changed the label. We are currently snowed under trying to release Robomongo 1.0 RC1 with Replica Set support. This issue is added into ' needs investigation' list.

@simsekgokhan
No worries. And no stress about workloads.

Don't hesitate to hit me up for any further testing / troubleshooting.

Thanks!

Some output I've noticed when running the application from command line.

These messages are shown after closing (disconnect) from host in GUI, and the SSH Tunnel is no longer available. Therefore likely the same cause keeping the SSH Session (tunnels) open.

These messages repeat every 1 minute.

2017-04-28T12:33:03.739+1000 I NETWORK  [thread20] trying reconnect to localhost:47017 (127.0.0.1) failed
2017-04-28T12:33:03.740+1000 W NETWORK  [thread20] Failed to connect to 127.0.0.1:47017, reason: errno:111 Connection refused
2017-04-28T12:33:03.740+1000 I NETWORK  [thread20] reconnect localhost:47017 (127.0.0.1) failed failed 

Additionally;

2017-04-28T13:11:29.790+1000 I NETWORK  [thread19] Socket say send() errno:32 Broken pipe 127.0.0.1:47017
2017-04-28T13:11:29.790+1000 I -        [thread19] caught exception (socket exception [SEND_ERROR] for 127.0.0.1:47017) in destructor (kill)

Hi @dmblack , thanks a lot for sharing.
I did try again to reproduce the problem with latest version Robomongo 1.0, but without success. I close the connection from Robomongo, and I am able to exit the ssh session without problems. And I do not see messages that you see every minute. I followed the steps from your comment https://github.com/Studio3T/robomongo/issues/1275#issuecomment-275001302 during my tests. Am I missing something?

@simsekgokhan
Thanks for your response!

I'm not able to test until Tuesday morning. Additionally; I'll install the latest version and test.

The only other thing I might suggest to reproduce; perfom a find query?

I will post an update ASAP.

Was this page helpful?
0 / 5 - 0 ratings