Deal with Closed Tunnels
Opened this issue · 5 comments
Keep tunnels alive or have a way to reopen them and/or diagnose them?
ssh.send_global_request("keep-alive@openssh.com")
I run into this all the time and it's frustrating to have to keep restarting TBM. It seems to occur most often when accessing remote web interfaces that use ajax or other methods to refresh part of the page. It would be nice if TBM was more resilient.
/Library/Ruby/Gems/1.8/gems/net-ssh-2.6.6/lib/net/ssh/service/forward.rb:89:in `close': closed stream (IOError)
from /Library/Ruby/Gems/1.8/gems/net-ssh-2.6.6/lib/net/ssh/service/forward.rb:89:in `local'
from /Library/Ruby/Gems/1.8/gems/net-ssh-2.6.6/lib/net/ssh/connection/channel.rb:522:in `call'
from /Library/Ruby/Gems/1.8/gems/net-ssh-2.6.6/lib/net/ssh/connection/channel.rb:522:in `do_open_failed'
from /Library/Ruby/Gems/1.8/gems/net-ssh-2.6.6/lib/net/ssh/connection/session.rb:541:in `channel_open_failure'
from /Library/Ruby/Gems/1.8/gems/net-ssh-2.6.6/lib/net/ssh/connection/session.rb:456:in `send'
from /Library/Ruby/Gems/1.8/gems/net-ssh-2.6.6/lib/net/ssh/connection/session.rb:456:in `dispatch_incoming_packets'
from /Library/Ruby/Gems/1.8/gems/net-ssh-2.6.6/lib/net/ssh/connection/session.rb:213:in `preprocess'
from /Library/Ruby/Gems/1.8/gems/net-ssh-2.6.6/lib/net/ssh/connection/session.rb:197:in `process'
from /Library/Ruby/Gems/1.8/gems/net-ssh-2.6.6/lib/net/ssh/connection/session.rb:161:in `loop'
from /Library/Ruby/Gems/1.8/gems/net-ssh-2.6.6/lib/net/ssh/connection/session.rb:161:in `loop_forever'
from /Library/Ruby/Gems/1.8/gems/net-ssh-2.6.6/lib/net/ssh/connection/session.rb:161:in `loop'
from /Library/Ruby/Gems/1.8/gems/tbm-0.3.0/lib/TBM/machine.rb:54:in `forward_ports'
from /Library/Ruby/Gems/1.8/gems/tbm-0.3.0/lib/TBM/machine.rb:26:in `bore'
from /Library/Ruby/Gems/1.8/gems/net-ssh-2.6.6/lib/net/ssh.rb:193:in `start'
from /Library/Ruby/Gems/1.8/gems/tbm-0.3.0/lib/TBM/machine.rb:24:in `bore'
from /Library/Ruby/Gems/1.8/gems/tbm-0.3.0/lib/TBM/cli.rb:41:in `parse_and_run'
from /Library/Ruby/Gems/1.8/gems/tbm-0.3.0/bin/tbm:5
from /usr/bin/tbm:19:in `load'
from /usr/bin/tbm:19
Can I ask what browser you're using when this happens? I use Safari most of the time, but I've noticed when I'm using Chrome, some apps tends to knock the tunnel out very regularly.
I could certainly add some kind of retry capability to TBM which would help, but it'd be nice if it wouldn't go down at all. It might also be that net-ssh-2.6.7 will resolve something, although I can't find any release notes on a quick search.
I'm using Firefox. Of course I'm not able to reproduce the problem now :-/. I'll try Chrome and Safari and see how they compare. I don't remember this being a problem when I used ssh directly, but there have also been changes to the network configuration on both sides of these connections since then, so it may be unrelated to TBM.
Well, in the meantime I added Issues #52 and #53 to the v1.0 milestone, which might help alleviate the pain somewhat even if the root cause remains. If you are able to make it reproducible, I'd be happy to know it. As I get into testing for v1.0, I'll try and use Chrome on a few of the apps where I've hit what seems like a similar issue in the past.