Feature #248

avatar

stray SSH tunnel checker

Added by Mirco Bauer 5481 days ago. Updated 5472 days ago.

Status:Closed Start:12/24/2009
Priority:Normal Due date:
Assigned to:avatarMirco Bauer % Done:

100%

Category:Engine
Target version:0.7
Complexity:

Votes: 0

Description

From time to time the following scenario happens:
  • Frontend connects to remote engine using a SSH tunnel
  • Frontend dies (say SIGTERM or crash -> SEGV)
  • Restarting the frontend will cause an error message about "Connection refused" because an old SSH tunnel is still active and blocking the new one
  • User is annoyed

This scenario can be prevented if the smuxi-server process watches all SSH tunnels by checking if the smuxi-frontend is still alive (TCP port). If not, it can kill the SSH tunnel process from the server-side which will force the client to close the tunnel and thus releasing the port needed for a fresh SSH tunnel.

Associated revisions

Revision 08ff94a7626bf6247cb22873143d608e6a7dd151
Added by Mirco Bauer 5472 days ago

Make use of the SSH keep-alive feature for the SSH tunnel to detect network issues faster. (closes: #258, #248)

History

Updated by Ingo Saitz 5476 days ago

avatar

This can be automated by ssh using KeepAlive messages, which are part of the ssh protocol, by setting ServerAliveInterval and ServerAliveContMax as aggressive as neccessary.

Updated by Mirco Bauer 5475 days ago

avatar

Very interesting SSH options. I will try to integrate those in the 0.6.5 release. Thanks for the info!

Updated by Mirco Bauer 5475 days ago

avatar
  • Target version set to 0.7

Updated by Mirco Bauer 5475 days ago

avatar

What would be even better if I could tell SSH that the tunneled port has to be used within X seconds/minutes, if not -> kill the tunnel....

Updated by Ingo Saitz 5475 days ago

avatar

You could set ServerAliveCountMax to a low value (1 or 2) and the interval to the number of seconds.

Updated by Mirco Bauer 5475 days ago

avatar

Ingo Saitz wrote:

You could set ServerAliveCountMax to a low value (1 or 2) and the interval to the number of seconds.

Yeah I plan to set ServerAliveCountMax to 3 and ServerAliveInterval to 30, then it would kill it after 120 seconds.

Updated by Mirco Bauer 5472 days ago

avatar
  • Status changed from New to Closed
  • % Done changed from 0 to 100

Also available in: Atom PDF