user1457393
user1457393

Reputation: 31

FTP org.apache.commons.net.MalformedServerReplyException: Could not parse response code

I'm having an issue trying to FTP a file to our server everyday.

Here is the response from the server...

org.apache.commons.net.MalformedServerReplyException: Could not parse response code. Server Reply: ma.

I'm not sure what the server reply 'ma' means? I can log in using a client like Filezilla no problem.

FTPClient client = new FTPClient(); 

try { 

    client.connect("IP Address");  

    boolean login = client.login("username", "password"); 

            if (login) {
                do something
            } 
    } catch (IOException e) { 
    e.printStackTrace(); 
    out.println(e.toString()); 

} finally { 

    try { 
        client.disconnect(); 
    } catch (IOException e) { 
        e.printStackTrace(); 
        out.println(e.toString()); 
    }
    }

Thanks for any suggestions.

Upvotes: 2

Views: 7998

Answers (1)

Chris Milburn
Chris Milburn

Reputation: 919

I had exactly the same problem, however it turned out the server was using SFTP, check that filezilla isnt actually using SFTP.

Upvotes: 2

Related Questions