You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Raj (JIRA)" <ji...@apache.org> on 2014/07/15 14:25:04 UTC

[jira] [Created] (NET-548) FTPClient Hangs on connect method and never timeout

Raj created NET-548:
-----------------------

             Summary: FTPClient Hangs on connect method and never timeout
                 Key: NET-548
                 URL: https://issues.apache.org/jira/browse/NET-548
             Project: Commons Net
          Issue Type: Bug
          Components: FTP
    Affects Versions: 2.0
            Reporter: Raj


Periodically, we are experiencing the FTP client thread is hang when we
initiate a connection to the FTP server. See the following thread dump from WAS server. It seem like
after the common net FTP.sendCommand, it will call the
"FTP.__getReply()" to get the status code, and this should be the point that causing the thread hang.

There is no Socket connection timeout error be thrown, and the thread justhang there forever.

here is the Thread Dump.. Please provide your guidance as to what is wrong here and how can we fix it.


at java/net/SocketInputStream.socketRead0(Native Method)
 at java/net/SocketInputStream.read(SocketInputStream.java:155(Compiled Code))
 at java/net/SocketInputStream.read(SocketInputStream.java:116(Compiled Code))
 at sun/nio/cs/StreamDecoder$ConverterSD.implRead(StreamDecoder.java:346(Compiled Code))
 at sun/nio/cs/StreamDecoder.read(StreamDecoder.java:252(Compiled Code))
 at java/io/InputStreamReader.read(InputStreamReader.java:212(Compiled Code))
 at java/io/BufferedReader.fill(BufferedReader.java:126(Compiled Code))
 at java/io/BufferedReader.readLine(BufferedReader.java:320(Compiled Code))
 at java/io/BufferedReader.readLine(BufferedReader.java:383(Compiled Code))
 at org/apache/commons/net/ftp/FTP.__getReply(FTP.java:291(Compiled Code))
 at org/apache/commons/net/ftp/FTP.sendCommand(FTP.java:490(Compiled Code))
 at org/apache/commons/net/ftp/FTP.sendCommand(FTP.java:534(Compiled Code))
 at org/apache/commons/net/ftp/FTP.pass(FTP.java:701(Compiled Code))
 at org/apache/commons/net/ftp/FTPClient.login(FTPClient.java:630(Compiled Code))


In the Code..

we are setting connection timeout & data timeout before FTPClient.connect method being called.



--
This message was sent by Atlassian JIRA
(v6.2#6252)