commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Konrad Garus (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (NET-476) FTP parser initialization from invalid line
Date Tue, 24 Jul 2012 08:16:35 GMT

    [ https://issues.apache.org/jira/browse/NET-476?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13421259#comment-13421259
] 

Konrad Garus commented on NET-476:
----------------------------------

With 1.4.1, we use the following workaround for when the FTP client is unable to determine
system type:

{code:java}
FTPFile[] files = null;
if (null == client.getSystemName()) {
    files = client.listFiles("UNIX", path);
} else {
    files = client.listFiles(path);
} 
{code}
I don't think it can work here, as apparently I can get "PORT command successful" as valid
system type. {{org.apache.commons.net.ftp.systemType.default}} does not work for the same
reason. I don't want to use {{org.apache.commons.net.ftp.systemType}} either, because my system
deals with more than one type of FTP hosts.
                
> FTP parser initialization from invalid line
> -------------------------------------------
>
>                 Key: NET-476
>                 URL: https://issues.apache.org/jira/browse/NET-476
>             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: org.apache.commons.net.ftp.parser.ParserInitializationException: Unknown parser
type: PORT command successful. Consider using PASV.
>         at org.apache.commons.net.ftp.parser.DefaultFTPFileEntryParserFactory.createFileEntryParser(DefaultFTPFileEntryParserFactory.java:118)
>         at org.apache.commons.net.ftp.FTPClient.initiateListParsing(FTPClient.java:2359)
>         at org.apache.commons.net.ftp.FTPClient.listFiles(FTPClient.java:2142)
>         at 
> {code}
> {code}
> Caused by: org.apache.commons.net.ftp.parser.ParserInitializationException: Unknown parser
type: Directory send OK.
>         at org.apache.commons.net.ftp.parser.DefaultFTPFileEntryParserFactory.createFileEntryParser(DefaultFTPFileEntryParserFactory.java:118)
>         at org.apache.commons.net.ftp.FTPClient.initiateListParsing(FTPClient.java:2359)
>         at org.apache.commons.net.ftp.FTPClient.listFiles(FTPClient.java:2142)
>         at 
> {code}

--
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

        

Mime
View raw message