commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Konrad Garus (JIRA)" <>
Subject [jira] [Commented] (NET-476) FTP parser initialization from invalid line
Date Tue, 24 Jul 2012 09:32:34 GMT


Konrad Garus commented on NET-476:

What if my connection is terminated (because I keep it open until the FTP server or something
else terminates)?

To detect the interruption and reconnect, we use something like:

try {
	if (ftp.isConnected()) {
} catch (IOException e) {
	ftp.disconnect();// connection was broken

if (!ftp.isConnected()) {
	ftp.setTimeout((int) timeout);
	ftp.connect(server, port);
	ftp.setSoTimeout((int) timeout);
	ftp.login(userName, password);

Looking at the source of {{FTP.disconnect()}}, it does not reset {{_replyLines}}. Could that
be the reason?
> FTP parser initialization from invalid line
> -------------------------------------------
>                 Key: NET-476
>                 URL:
>             Project: Commons Net
>          Issue Type: Bug
>          Components: FTP
>    Affects Versions: 3.1
>         Environment: Ubuntu Linux 10.04 amd64, vsftpd 2.2.2
>            Reporter: Konrad Garus
> After upgrading from 1.4.1 to 3.1, we noticed the FTP client sometimes fails to list
files. It seems to occur intermittently, possibly when the system is under relatively high
load and does not respond immediately.
> From stacktraces, it seems like multithreading issues or trying to parse system type
from reply to another command than SYST:
> {code}
> Caused by: Unknown parser
type: PORT command successful. Consider using PASV.
>         at
>         at
>         at
>         at 
> {code}
> {code}
> Caused by: Unknown parser
type: Directory send OK.
>         at
>         at
>         at
>         at 
> {code}

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


View raw message