#29 OS/2 ftp server not supported

closed-fixed
nobody
None
5
2004-03-18
2004-02-05
Mark Hale
No

When logging in to an OS/2 ftp server I get the
following log messages:

Java Web Start 1.2 Console, started Thu Feb 05 20:32:02
GMT 2004
Java 2 Runtime Environment: Version 1.4.1_02 by Sun
Microsystems Inc.
> Connecting to testhost
> 220 testhost IBM TCP/IP for OS/2 - FTP Server ver
17:36:19 on Oct 8 2001 ready.
> Connection established...
> > USER testuser
> 331 Password required for testuser.
> > PASS ****
> 230 User testuser logged in.
> Logged in...
> > SYST
> 215 OS/2 operating system
> > TYPE I
> 200 Type set to I (Image/Binary).
> > PWD
> 257 "D:/download" is current directory.
> > MODE S
> 200 MODE S ok.
> > TYPE A
> 200 Type set to A.
> > PASV
> 227 Entering Passive Mode (192,168,0,1,200,91)
> > LIST -laL
> Old connection removed
java.net.SocketException: Connection reset
at
java.net.SocketInputStream.read(SocketInputStream.java:168)
at
java.io.BufferedInputStream.read1(BufferedInputStream.java:220)
at
java.io.BufferedInputStream.read(BufferedInputStream.java:277)
at
java.io.FilterInputStream.read(FilterInputStream.java:90)
at
net.sf.jftp.net.DataConnection.run(DataConnection.java:281)
at java.lang.Thread.run(Thread.java:536)
> 550 No files found
> > TYPE I
> 200 Type set to I (Image/Binary).
> > QUIT
> java.net.SocketException: Software caused connection
abort: recv failed @FtpConnection::getLine

I'm intrigued by the LIST -laL, is the -laL a unix thing???

Discussion

  • Jake Kasprzak

    Jake Kasprzak - 2004-02-12

    Logged In: YES
    user_id=691521

    Hello.

    Thank you for sending this information, and I apologize for not
    getting back to you sooner. This is something we can look
    into, and we'll hopefully have a fix available soon.
    Unfortunately, I don't know of any non-*nix FTP servers that
    I can connect to, so that would be an obstacle for me testing
    out any solution. But there are a few things that we may be
    able to do.

    To answer the last question that you have, it does seem
    quite possible that the -laL could be solely a "Unix thing" and
    that this could be causing this exception to be thrown. As
    you may know, the *nix command "ls -laL" would display all
    files in a directory, including files that symlinks in the
    directory point to, and all information the listed files as well. I
    was quite sure that the source code in FtpConnection.java
    and FtpConstants.java was compliant with RFC959 and
    RFC2228, but I may have been wrong. After looking through
    RFC959, it appears that the LIST command can optionally
    specify a directory, but nothing additional to that. The
    documentation on FtpConstants.java mentions RFC2228
    (which mentions RFC959) but the code may not be perfectly
    compliant with RFC959. I noticed that the server responded
    with code 550, which is a "file unavailable" error, and this
    could be caused by it looking for a directory that does not
    exist. We may need to work to make the code cooperate with
    non-*nix servers. That is what the issue appears to be now.

    Anyway, I have dealt primarily with the GUI in terms of
    coding, but I might be able to help out here. A good idea
    might be to take out the "-laL" from the FtpConstants.java
    file, recompile, and see what happens. But for this to be more
    robust, and compliant with other operating systems, we may
    have to make a few significant changes.

    Thank you for your interest in JFtp.

    J.K.

     
  • Cyberdemon

    Cyberdemon - 2004-03-13

    Logged In: YES
    user_id=164594

    I'm not sure the LIST command is the cause for your problems -
    "550 No files found" sounds to me that the directory is
    empty and it seems that the server does not provide a zero
    byte listing but instead closes the socket. Please test a
    normal LIST command using Options->Advanced Options in
    1.42-pre1 or later.

    If your directory was empty and you initiated the disconnect
    we'll probably ignore the behaviour since these stacktraces
    can be important in other cases. Otherwise, please remind us
    to reopen the bug and, if you are able to, please provide us
    an ip where we can test the client with.

     
  • Cyberdemon

    Cyberdemon - 2004-03-13
    • status: open --> closed-remind
     
  • Mark Hale

    Mark Hale - 2004-03-15
    • status: closed-remind --> open-remind
     
  • Mark Hale

    Mark Hale - 2004-03-15

    Logged In: YES
    user_id=133877

    I can confirm the LIST command is the problem, since -IaL is
    interpreted as a directory name (as per RFC 959).I tested a
    normal LIST command as suggested, it works fine.

    Now that works, I have a new bug :) It doesn't seem to parse
    correctly the LIST reply, so here is a sample ftp directory
    listing:
    127635 A 07-31-03 13:21
    features.html
    0 A DIR 08-01-03 13:58 graphics
    0 A DIR 08-01-03 13:58 images
    23515 A 07-31-03 13:21 index.html
    34912 A 07-31-03 13:21
    install.html
    0 A DIR 08-01-03 13:58 javadocs
    11256 A 07-31-03 13:21
    limitations.html
    55414 A 07-31-03 13:21
    properties.html
    87212 A 07-31-03 13:22
    releases.html
    0 A DIR 08-01-03 13:58 resources
    62896 A 07-31-03 13:21
    samples-dom.html
    44794 A 07-31-03 13:21
    samples-sax.html
    26982 A 07-31-03 13:21
    samples-socket.html
    9427 A 07-31-03 13:21
    samples-ui.html
    89745 A 07-31-03 13:21
    samples-xni.html
    14179 A 07-31-03 13:21
    samples.html
    20270 A 07-31-03 13:21
    xml-schema.html
    104124 A 07-31-03 13:21
    xni-config.html
    60347 A 07-31-03 13:21
    xni-core.html
    20482 A 07-31-03 13:21
    xni-design.html
    52384 A 07-31-03 13:21
    xni-xerces2.html
    22359 A 07-31-03 13:21 xni.html

     
  • Cyberdemon

    Cyberdemon - 2004-03-15

    Logged In: YES
    user_id=164594

    I made an attempt to fix it and it should work now (if you
    use the LIST compatibility checkbox now present in the
    HostChooser), in 1.42-pre4, please tell me if it works for
    you now :)

     
  • Mark Hale

    Mark Hale - 2004-03-16

    Logged In: YES
    user_id=133877

    The "Ftp Connection..." dialog hangs when I try
    compatibility mode.

    Sort mismatch - hopefully ignoring it...
    ArrayIndexOutOfBounds: 94
    RemoteDir.setDirList(RemoteDir.java:338)
    RemoteDir.gui(RemoteDir.java:281)
    RemoteDir.updateRemoteDirectory(RemoteDir.java:757)
    .
    .
    .

     
  • Cyberdemon

    Cyberdemon - 2004-03-16

    Logged In: YES
    user_id=164594

    Can you please enable "Verbose console logging" and then
    send me the output and the raw directory listing
    (preformatted, with every space and possible newline
    present) again? There should be more messages regarding the
    OS/2 parser if the verbose logging is enabled, and while
    this is a common error if the parser is not working
    correctly I need this info to fix it :)

    My email is: hansmann.d@debitel.net

     
  • Cyberdemon

    Cyberdemon - 2004-03-18
    • status: open-remind --> closed-fixed
     
  • Cyberdemon

    Cyberdemon - 2004-03-18

    Logged In: YES
    user_id=164594

    Fixed in 1.42 :)

     

Log in to post a comment.