[ftpclient] stacktrace from hang, on zOS, trying to connect

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[ftpclient] stacktrace from hang, on zOS, trying to connect

blatt, lew
the simple app, below, fails on a read timeout after 900 seconds trying to
connect to a (Unix) server.  the same timeout also occurs trying to connect
to local server.  on the other hand, IBM's ftp client works fine on the same
platform to Unix and local servers.  the app also works successfully from a
Windows platform.  i've included stack trace, source, and copy/paste of IBM
FTP connect.  if someone has some suggs, i'm ready.

version info:
ant 1.6.5
commons-net-1.4.0
java 1.4.2

stack trace:
java.net.SocketTimeoutException: Read timed out
        at java.net.SocketInputStream.socketRead0(Native Method)
        at java.net.SocketInputStream.read(SocketInputStream.java:153)
        at java.io.BufferedInputStream.fill(BufferedInputStream.java:200)
        at java.io.BufferedInputStream.read(BufferedInputStream.java:218)
        at java.io.FilterInputStream.read(FilterInputStream.java:86)
        at java.io.PushbackInputStream.read(PushbackInputStream.java:135)
        at
org.apache.commons.net.io.FromNetASCIIInputStream.__read(FromNetASCII
InputStream.java:75)
        at
org.apache.commons.net.io.FromNetASCIIInputStream.read(FromNetASCIIIn
putStream.java:170)
        at java.io.BufferedInputStream.fill(BufferedInputStream.java:200)
        at java.io.BufferedInputStream.read(BufferedInputStream.java:218)
        at
org.apache.commons.net.telnet.TelnetInputStream.__read(TelnetInputStr
eam.java:114)
        at
org.apache.commons.net.telnet.TelnetInputStream.run(TelnetInputStream
.java:535)
        at java.lang.Thread.run(Thread.java:568)
bash-2.03$


(note i used x.y.z.a notation, replacing the explicit ip address used in the
calls and o/p below)
source:
import org.apache.commons.net.ftp.*;
import java.io.IOException;
import java.io.*;

public class ftpit {
        public static void main(String a[]) {
                ftpit f=new ftpit();
        }
        ftpit(){
           FTPClient ftp=new FTPClient();
           String server = new String("x.y.z.a");
           ftp.setDefaultTimeout(10000) <ftp.setDefaultTimeout(10000)> ;
           try {
            ftp.connect(server) <ftp.connect(server)> ;  
            System.out.println("Connected to " + server + ".");
            System.out.print(ftp.getReplyString());
           } catch(IOException ioe)
{ioe.printStackTrace();ioe.printStackTrace();System.out.println("exception")
;}
        }
}


IBM's ftp client:
bash-2.03$ ftp x.y.z.a
IBM FTP CS V1R4
FTP: using TCPIP
Connecting to:   x.y.z.a port: 21.
220 localhost.localdomain FTP server (Version wu-2.6.2-5) ready.
NAME (x.y.z.a:LBLATT1):

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]