Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

NiFi - ListFTP on Unix (SunOs 4.1)

Solved Go to solution

NiFi - ListFTP on Unix (SunOs 4.1)

Contributor

Error on ListFTP, FTP to SunOS 4.1

13373-capture.png

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Re: NiFi - ListFTP on Unix (SunOs 4.1)

Contributor

@Matt Clarke

I created custom nifi processor to support FTPClientConfig

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

5 REPLIES 5

Re: NiFi - ListFTP on Unix (SunOs 4.1)

Master Guru

@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

Re: NiFi - ListFTP on Unix (SunOs 4.1)

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.

Re: NiFi - ListFTP on Unix (SunOs 4.1)

Master Guru
@mel mendoza

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

Thanks,

Matt

Re: NiFi - ListFTP on Unix (SunOs 4.1)

Contributor
Highlighted

Re: NiFi - ListFTP on Unix (SunOs 4.1)

Contributor

@Matt Clarke

I created custom nifi processor to support FTPClientConfig

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