Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

NiFi - ListFTP on Unix (SunOs 4.1)

avatar
Contributor

Error on ListFTP, FTP to SunOS 4.1

13373-capture.png

1 ACCEPTED SOLUTION

avatar
Contributor

@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
Super 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
Contributor

@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
Super Mentor
@mel mendoza

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

Thanks,

Matt

avatar
Contributor

avatar
Contributor

@Matt Clarke

I created custom nifi processor to support FTPClientConfig

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