commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rory Winston <rwins...@eircom.net>
Subject Re: [jira] Commented: (NET-61) [net] FTPClient.listFiles() hangs on Red Hat Linux
Date Sat, 23 Dec 2006 13:35:52 GMT
Steve

The problem was with TelnetClient's reader thread blocking on read() and 
locking up - to be honest, I have yet to figure out exactly what caused 
the deadlock, but one of the initial changes I made on the 2.0 branch 
was to refactor FTPClient so it extended SocketClient directly, and thus 
with no reader thread, the issue does not seem to arise. I think we 
would need a detailed examination of TelnetClient to figure out what 
were the circumstances that caused it to deadlock in this manner.

Cheers
Rory

Steve Cohen (JIRA) wrote:
>     [ http://issues.apache.org/jira/browse/NET-61?page=comments#action_12460625 ] 
>             
> Steve Cohen commented on NET-61:
> --------------------------------
>
> Rory, sorry I've been too busy to be involved here, but could you briefly sum up what
the change was?  I banged my head on this one for quite awhile when it was first logged.
>
>   
>> [net] FTPClient.listFiles() hangs on Red Hat Linux
>> --------------------------------------------------
>>
>>                 Key: NET-61
>>                 URL: http://issues.apache.org/jira/browse/NET-61
>>             Project: Commons Net
>>          Issue Type: Bug
>>    Affects Versions: 1.4 Final
>>         Environment: Operating System: Linux
>> Platform: PC
>>            Reporter: George Van Treeck
>>            Priority: Blocker
>>             Fix For: 2.0
>>
>>
>> A Java app that uses FTPClient to download a file from a website to Windows XP 
>> works properly. But, when the same app runs on Linux to download the same file 
>> from the same website, it hangs at listFiles().
>> Using Java 1.5.0_03 on both the Windows XP and Linux. The version of Linux 
>> used is Fedor Red Hat Linux Core 3 with all the latest updates. The following 
>> segment of code from the program demonstrates the problem:
>>               FTPClient ftp = new FTPClient();
>>               ftp.connect(host);
>>               reply = ftp.getReplyCode();
>>               if (!FTPReply.isPositiveCompletion(reply)) {
>>                 final String ftpStatus = ftp.getReplyString();
>>                 ftp.disconnect();
>>                 throw new IOException(
>>                     "FTP server refused connection. Status: " +
>>                    ftpStatus);
>>               }
>>               ftp.login(user, password);
>>               reply = ftp.getReplyCode();
>>               if (!FTPReply.isPositiveCompletion(reply)) {
>>                 final String ftpStatus = ftp.getReplyString();
>>                 ftp.disconnect();
>>                 throw new IOException(
>>                     "FTP server refused username/password. Status: " +
>>                    ftpStatus);
>>               }
>>               String[] list = ftp.listNames();
>>     
>
>   



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message