em-ssh icon indicating copy to clipboard operation
em-ssh copied to clipboard

Net::SSH::ChannelOpenFailed doesn't call errback, but crashes EM

Open carlhoerberg opened this issue 12 years ago • 3 comments

/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>'

carlhoerberg avatar Dec 03 '12 03:12 carlhoerberg

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?

gruis avatar Dec 03 '12 15:12 gruis

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 avatar Dec 04 '12 00:12 carlhoerberg

@carlhoerberg do you still experience this issue?

kt97679 avatar Jul 22 '18 16:07 kt97679