Feature #248
stray SSH tunnel checker
Status: | Closed | Start: | 12/24/2009 | |
Priority: | Normal | Due date: | ||
Assigned to: | Mirco Bauer | % Done: | 100% |
|
Category: | Engine | |||
Target version: | 0.7 | |||
Complexity: | ||||
Votes: | 0 |
Description
- 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
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 5443 days ago
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 5443 days ago
Very interesting SSH options. I will try to integrate those in the 0.6.5 release. Thanks for the info!
Updated by Mirco Bauer 5443 days ago
- Target version set to 0.7
Updated by Mirco Bauer 5443 days ago
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 5443 days ago
You could set ServerAliveCountMax to a low value (1 or 2) and the interval to the number of seconds.
Updated by Mirco Bauer 5443 days ago
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 5439 days ago
- Status changed from New to Closed
- % Done changed from 0 to 100
Applied in changeset 08ff94a7626bf6247cb22873143d608e6a7dd151.