Archives of Support Questions (Read Only)

This is an archived board for historical reference. Information and links may no longer be available or relevant
Announcements
This board is archived and read-only for historical reference. To ask a new question, please post a new topic on the appropriate active board.

NiFi - ListFTP on Unix (SunOs 4.1)

avatar

Error on ListFTP, FTP to SunOS 4.1

13373-capture.png

1 ACCEPTED SOLUTION

avatar

@Matt Clarke

I created custom nifi processor to support FTPClientConfig

https://github.com/clickha/nifi-tools.git

View solution in original post

5 REPLIES 5

avatar
Master Mentor

@mel mendoza

There appears to be some issue with your FTP server. The SYST command is a standard command that is passed when establishing a connection to the FTP server. The expected response would be the OS information of the target FTP server.

https://en.wikipedia.org/wiki/List_of_FTP_commands

The FTP server running on your SUN OS 4.1 is responding that it does not understand that command.

Thanks,

Matt

avatar

@Matt Clarke upon testing using simple pojo (see code below), I got the same error.

    public static void main(String[] args) throws SocketException, IOException {
        FTPClient client = new FTPClient();
        client.connect(IP_ADDRESS);
        client.login(USERNAME, PASSWORD);
        
        FTPFile[] files = client.    listFiles(DIRECTORY);
        
        for (FTPFile file : files) {
            System.out.println(file.getName());
        }
    }
Exception in thread "main" java.io.IOException: Unable to determine system type - response: 500 'SYST': command not understood.

    at org.apache.commons.net.ftp.FTPClient.getSystemType(FTPClient.java:2801)
    at org.apache.commons.net.ftp.FTPClient.__createParser(FTPClient.java:3369)
    at org.apache.commons.net.ftp.FTPClient.initiateListParsing(FTPClient.java:3338)
    at org.apache.commons.net.ftp.FTPClient.listFiles(FTPClient.java:3016)
    at me.mamendoza.java.tuts.ftp.BasicFTP.main(BasicFTP.java:35)

Then I added this line of code below,

        // add FTPClientconfig.SYST_UNIX to connect to SunOS v4.1 
        FTPClientConfig config = new FTPClientConfig(FTPClientConfig.SYST_UNIX);
        client.configure(config);

it returns the list of files.

I think ListFTP doesn't support SYST_UNIX.

avatar
Master Mentor
@mel mendoza

May I suggest that you open an Apache Jira against NiFi for this.

Thanks,

Matt

avatar

avatar

@Matt Clarke

I created custom nifi processor to support FTPClientConfig

https://github.com/clickha/nifi-tools.git