em-ssh
em-ssh copied to clipboard
Net::SSH::ChannelOpenFailed doesn't call errback, but crashes EM
/home/deploy/myapp/shared/bundle/ruby/1.9.1/gems/net-ssh-2.6.2/lib/net/ssh/connection/channel.rb:524:in `do_open_failed': open failed (1) (Net::SSH::ChannelOpenFailed)
from /home/deploy/myapp/shared/bundle/ruby/1.9.1/gems/net-ssh-2.6.2/lib/net/ssh/connection/session.rb:541:in `channel_open_failure'
from /home/deploy/myapp/shared/bundle/ruby/1.9.1/gems/em-ssh-0.4.3/lib/em-ssh/session.rb:87:in `channel_open_failure'
from /home/deploy/myapp/shared/bundle/ruby/1.9.1/gems/em-ssh-0.4.3/lib/em-ssh/session.rb:67:in `block in register_callbacks'
from /home/deploy/myapp/shared/bundle/ruby/1.9.1/gems/em-ssh-0.4.3/lib/em-ssh/callbacks.rb:81:in `call'
from /home/deploy/myapp/shared/bundle/ruby/1.9.1/gems/em-ssh-0.4.3/lib/em-ssh/callbacks.rb:81:in `call'
from /home/deploy/myapp/shared/bundle/ruby/1.9.1/gems/em-ssh-0.4.3/lib/em-ssh/callbacks.rb:37:in `block in fire'
from /home/deploy/myapp/shared/bundle/ruby/1.9.1/gems/em-ssh-0.4.3/lib/em-ssh/callbacks.rb:37:in `map'
from /home/deploy/myapp/shared/bundle/ruby/1.9.1/gems/em-ssh-0.4.3/lib/em-ssh/callbacks.rb:37:in `fire'
from /home/deploy/myapp/shared/bundle/ruby/1.9.1/gems/em-ssh-0.4.3/lib/em-ssh/connection.rb:311:in `block in register_data_handler'
from /home/deploy/myapp/shared/bundle/ruby/1.9.1/gems/em-ssh-0.4.3/lib/em-ssh/callbacks.rb:81:in `call'
from /home/deploy/myapp/shared/bundle/ruby/1.9.1/gems/em-ssh-0.4.3/lib/em-ssh/callbacks.rb:81:in `call'
from /home/deploy/myapp/shared/bundle/ruby/1.9.1/gems/em-ssh-0.4.3/lib/em-ssh/callbacks.rb:37:in `block in fire'
from /home/deploy/myapp/shared/bundle/ruby/1.9.1/gems/em-ssh-0.4.3/lib/em-ssh/callbacks.rb:37:in `map'
from /home/deploy/myapp/shared/bundle/ruby/1.9.1/gems/em-ssh-0.4.3/lib/em-ssh/callbacks.rb:37:in `fire'
from /home/deploy/myapp/shared/bundle/ruby/1.9.1/gems/em-ssh-0.4.3/lib/em-ssh/connection.rb:137:in `receive_data'
from /home/deploy/myapp/shared/bundle/ruby/1.9.1/gems/eventmachine-1.0.0/lib/eventmachine.rb:187:in `run_machine'
from /home/deploy/myapp/shared/bundle/ruby/1.9.1/gems/eventmachine-1.0.0/lib/eventmachine.rb:187:in `run'
from /home/deploy/myapp/shared/bundle/ruby/1.9.1/gems/thin-1.4.1/lib/thin/backends/base.rb:63:in `start'
from /home/deploy/myapp/shared/bundle/ruby/1.9.1/gems/thin-1.4.1/lib/thin/server.rb:159:in `start'
from /home/deploy/myapp/shared/bundle/ruby/1.9.1/gems/thin-1.4.1/lib/thin/controllers/controller.rb:86:in `start'
from /home/deploy/myapp/shared/bundle/ruby/1.9.1/gems/thin-1.4.1/lib/thin/runner.rb:185:in `run_command'
from /home/deploy/myapp/shared/bundle/ruby/1.9.1/gems/thin-1.4.1/lib/thin/runner.rb:151:in `run!'
from /home/deploy/myapp/shared/bundle/ruby/1.9.1/gems/thin-1.4.1/bin/thin:6:in `<top (required)>'
from bin/thin:16:in `load'
from bin/thin:16:in `<main>'
Could you please provide a little more context? What kind of channel were you trying to open? What code were you calling that resulted in the stacktrace? What type of host were you connecting to?
when connecting to a server that's either booting or shutting down.
as my code isn't in the stacktrace it's hard to know exactly which line that (indirectly) caused it but i guess it was this:
ssh.exec "tail -n 50 -f /var/log/messages" do |ch, stream, data|
blk.call(data)
end
@carlhoerberg do you still experience this issue?