Details
Description
The following code generates an IOError: closed stream under JRuby 1.6.6 but not under MRI 1.9.3:
require 'rubygems'; require 'net/sftp'
ssh = Net::SSH.start('172.16.17.37', 'root', :password => 'toto1234', :verbose => :debug)
sftp = ssh.sftp.connect
The environments I'm testing under are two rubies installed via RVM:
jruby 1.6.6 (ruby-1.8.7-p357) (2012-01-30 5673572) (Java HotSpot(TM) 64-Bit Server VM 1.6.0_29) [darwin-x86_64-java]
amon:triage dom$ gem list
-
-
- LOCAL GEMS ***
-
bouncy-castle-java (1.5.0146.1)
bundle (0.0.1)
bundler (1.0.22)
i18n (0.6.0)
jruby-openssl (0.7.5)
json (1.6.5 java)
mail (2.4.1)
mime-types (1.17.2)
net-sftp (2.0.5)
net-ssh (2.3.0)
polyglot (0.3.3)
rake (0.9.2.2)
rdoc (3.12)
syslogger (1.2.6)
treetop (1.4.10)
AND for MRI:
amon:triage dom$ ruby --version
ruby 1.9.3p125 (2012-02-16 revision 34643) [x86_64-darwin10.8.0]
amon:triage dom$ gem list
-
-
- LOCAL GEMS ***
-
archive-tar-minitar (0.5.2)
bundler (1.0.22)
childprocess (0.3.1)
erubis (2.7.0)
ffi (1.0.11)
i18n (0.6.0)
json (1.6.5)
log4r (1.1.10)
mail (2.4.1)
mime-types (1.17.2)
net-scp (1.0.4)
net-sftp (2.0.5)
net-ssh (2.3.0)
polyglot (0.3.3)
rake (0.9.2.2)
rdoc (3.12)
syslogger (1.2.6)
treetop (1.4.10)
Detailed sessions with debugs and stack trace are attached to the bug. I'm not familiar at all with Net/Sftp so I'm at a loss to debug further but would be happy to provider more information if needed.