Ok, if I remove ftps.enterLocalPassiveMode(), it works. Not sure why??


On Oct 30, 2006, at 11:33 AM, Susanne Lefvert wrote:


On Oct 30, 2006, at 10:48 AM, Niklas Gustavsson wrote:

Susanne Lefvert wrote:
Ok, I'll give this a try. Just fyi, I'm running the client in passive mode but I still get this error. These are the commands I'm using:
FTPSClient ftps = new FTPSClient(true);
ftps.addProtocolCommandListener(new PrintCommandListener(log));
ftps.connect(host, port);
ftps.login(user, password);
ftps.enterLocalPassiveMode();
ftps.execPROT("P");
ftps.setFileType(FTP.BINARY_FILE_TYPE);
ftps.storeFile(file.getName(), input);
ftps.logout();
ftps.disconnect();

What's the error you're seeing?

The major difference between my code and yours is that you running with implicit security. If I turned that on and configure FtpServer to use a SSLFtpSocketFactory it does work for me. This is still in my Eclipse environment. The passive mode however, also works in my Maven build.


The first upload works, on the second upload the server just hangs on the PASV command. Here's the print from the client:

[java] 31303 [Thread-5] INFO (PrintCommandListener.java:23) sidgrid.upload.UploadThread - null: 200 Command PROT okay. [java] 31304 [Thread-5] INFO (PrintCommandListener.java:18) sidgrid.upload.UploadThread - TYPE: TYPE I [java] 31309 [Thread-5] INFO (PrintCommandListener.java:23) sidgrid.upload.UploadThread - null: 200 Command TYPE okay. [java] 31310 [Thread-5] INFO (PrintCommandListener.java:18) sidgrid.upload.UploadThread - PASV: PASV

Is there a way to get logging from the ftp server?



I've added a new test case which uses implicit security and commited into our SVN.

/niklas



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to