IOError exception in Net::FTP using 1.0.0RC3 under WinXP
--------------------------------------------------------

                 Key: JRUBY-1108
                 URL: http://jira.codehaus.org/browse/JRUBY-1108
             Project: JRuby
          Issue Type: Bug
          Components: Core Classes/Modules
    Affects Versions: JRuby 1.0.0RC3
         Environment: WinXP, ftp to either a RS6000 host or a mainframe host 
supporting FTP,   This is in a corporate environment, but inside our firewall.
            Reporter: Thomas Porter
            Priority: Minor
             Fix For: JRuby 1.0.0RC3
         Attachments: frag_sample.rb

When doing Net::FTP.list command, I get an IOError exception after the last 
line of the list has been processed.  Occurs under jirb or jruby

frag.rb:

require 'net/ftp'
ftp = Net::FTP.open('ftpmvs','uid','pw')
ftp.debug_mode = true
ftp.list() {|line| p line}
ftp.close

jirb transcript:

d:\Documents and Settings\mi01txp\My Documents>%JRUBY_HOME%\bin\jirb
irb(main):001:0> require 'frag'
put: TYPE A
get: 200 Representation type is Ascii NonPrint
put: PORT 10,67,54,109,7,51
get: 200 Port request OK.
put: LIST
get: 125 List started OK
"Volume Unit    Referred Ext Used Recfm Lrecl BlkSz Dsorg Dsname"
"USER20 3390   2007/05/30  1    4  FB      80  3120  PO  ISPF.ISPPROF"
"Migrated                                                LIB.JCL"
"Migrated                                                LIB.PRINT"
"Migrated                                                LIB.SCRIPT"
"Migrated                                                SECURE.FTP"
"USER29 3390   2007/05/31  1    1  VA     125   129  PS  SPFLOG1.LIST"
IOError: No message available
       from D:/jruby/lib/ruby/1.8/net/ftp.rb:625:in `loop'
       from D:/jruby/lib/ruby/1.8/net/ftp.rb:431:in `retrlines'
       from D:/jruby/lib/ruby/1.8/net/ftp.rb:625:in `mon_synchronize'
       from D:/jruby/lib/ruby/1.8/net/ftp.rb:434:in `retrlines'
       from D:/jruby/lib/ruby/1.8/net/ftp.rb:625:in `list'
       from ./frag.rb:4
       from (irb):1:in `require'
       from (irb):1:in `binding'
       from D:/jruby/lib/ruby/1.8/irb.rb:150:in `eval_input'
       from D:/jruby/lib/ruby/1.8/irb.rb:70:in `signal_status'
       from D:/jruby/lib/ruby/1.8/irb.rb:189:in `eval_input'
       from D:/jruby/lib/ruby/1.8/irb.rb:70:in `each_top_level_statement'
       from D:/jruby/lib/ruby/1.8/irb.rb:190:in `loop'
       from D:/jruby/lib/ruby/1.8/irb.rb:190:in `catch'
       from D:/jruby/lib/ruby/1.8/irb.rb:190:in `eval_input'
       from D:/jruby/lib/ruby/1.8/irb.rb:70:in `start'
       from :-1:in `catch'
       from D:/jruby/lib/ruby/1.8/irb.rb:71:in `start'
       from :-1irb(main):002:0>

output from running under jruby witn -d flag:

d:\Documents and Settings\mi01txp\My Documents>%JRUBY_HOME%\bin\jruby -d frag.rb

put: TYPE A
get: 200 Representation type is Ascii NonPrint
put: PORT 10,67,54,109,5,6
get: 200 Port request OK.
put: LIST
get: 125 List started OK
"Volume Unit    Referred Ext Used Recfm Lrecl BlkSz Dsorg Dsname"
"USER20 3390   2007/05/30  1    4  FB      80  3120  PO  ISPF.ISPPROF"
"Migrated                                                LIB.JCL"
"Migrated                                                LIB.PRINT"
"Migrated                                                LIB.SCRIPT"
"Migrated                                                SECURE.FTP"
"USER29 3390   2007/05/31  1    1  VA     125   129  PS  SPFLOG1.LIST"
D:/jruby/lib/ruby/1.8/net/ftp.rb:625:in `loop': No message available (IOError)
        from D:/jruby/lib/ruby/1.8/net/ftp.rb:431:in `retrlines'
        from D:/jruby/lib/ruby/1.8/net/ftp.rb:625:in `mon_synchronize'
        from D:/jruby/lib/ruby/1.8/net/ftp.rb:434:in `retrlines'
        from D:/jruby/lib/ruby/1.8/net/ftp.rb:625:in `list'
        from frag.rb:4

Outpur from running under ruby:

d:\Documents and Settings\mi01txp\My Documents>ruby frag.rb
put: TYPE A
get: 200 Representation type is Ascii NonPrint
put: PORT 10,67,54,109,5,10
get: 200 Port request OK.
put: LIST
get: 125 List started OK
"Volume Unit    Referred Ext Used Recfm Lrecl BlkSz Dsorg Dsname"
"USER20 3390   2007/05/30  1    4  FB      80  3120  PO  ISPF.ISPPROF"
"Migrated                                                LIB.JCL"
"Migrated                                                LIB.PRINT"
"Migrated                                                LIB.SCRIPT"
"Migrated                                                SECURE.FTP"
"USER29 3390   2007/05/31  1    1  VA     125   129  PS  SPFLOG1.LIST"
get: 250 List completed successfully.

d:\Documents and Settings\mi01txp\My Documents>

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

Reply via email to