You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Sebb (Resolved) (JIRA)" <ji...@apache.org> on 2012/01/05 19:56:39 UTC
[jira] [Resolved] (NET-434) FTPClient fails to close local
listener socket when command socket channel encounter
"ReadTimeoutException"
[ https://issues.apache.org/jira/browse/NET-434?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sebb resolved NET-434.
----------------------
Resolution: Fixed
Fix Version/s: 3.1
> FTPClient fails to close local listener socket when command socket channel encounter "ReadTimeoutException"
> ------------------------------------------------------------------------------------------------------------
>
> Key: NET-434
> URL: https://issues.apache.org/jira/browse/NET-434
> Project: Commons Net
> Issue Type: Bug
> Components: FTP
> Affects Versions: 2.2, 3.0.1
> Environment: Red Hat Enterprise Linux Server release 5.6 (Tikanga) x64
> java version "1.6.0_26"
> Java(TM) SE Runtime Environment (build 1.6.0_26-b03)
> Java HotSpot(TM) 64-Bit Server VM (build 20.1-b02, mixed mode)
> Reporter: zhangyong
> Fix For: 3.1
>
>
> FtpClient connect to an ftp server and login successfully, call ftpClient.listFiles() method to list remote directory,
> and ftp server is vsftp and use active mode.
> on commons-net-3.0.1 class org.apache.commons.net.ftp.FTPClient at line 680 :
> if (!FTPReply.isPositivePreliminary(sendCommand(command, arg)))
> {
> server.close();
> return null;
> }
> call sendCommand throw an exception blow:
> java.net.SocketTimeoutException: Read timed out
> at java.net.SocketInputStream.socketRead0(Native Method)
> at java.net.SocketInputStream.read(SocketInputStream.java:129)
> at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:264)
> at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:306)
> at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:158)
> at java.io.InputStreamReader.read(InputStreamReader.java:167)
> at java.io.BufferedReader.fill(BufferedReader.java:136)
> at java.io.BufferedReader.readLine(BufferedReader.java:299)
> at java.io.BufferedReader.readLine(BufferedReader.java:362)
> at org.apache.commons.net.ftp.FTP.__getReply(FTP.java:299)
> at org.apache.commons.net.ftp.FTP.sendCommand(FTP.java:500)
> class org.apache.commons.net.ftp.FTPClient at line 648 : ServerSocket server = _serverSocketFactory_.createServerSocket(getActivePort(), 1, getHostAddress());
> the local listener socket "server" is not close when sendCommand method throws exception.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira