commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From salahzar <>
Subject [NET] Problems with FTPClient using active connections.
Date Thu, 26 Jun 2008 15:04:43 GMT

Trying to use to access ftp server everything's fine when using
passive communications as shown by examples.
However when using active modality I get strange errors.
Is there anybody using successfully ftpclient in active modality
showing me what is the correct way for accessing server?

The sequence used by my program (to store a new file on server) is the

- until connection everything is fine, no errors
- then I need the outputstream for manually send chunks of bytes to remote
(FTPClient: public OutputStream storeFileStream(String remote) )
This method returns null if using active connection (but it works correctly
if using passive connections).

Having put extra log instructions, I see that the error comes from the
result=sendCommand(command, arg);
if (!FTPReply.isPositivePreliminary(result))

where command is 14 i.e. STOR and arg is the filename, error returned is 425
(cannot open data connection).

NOTE: I'm using windows XP SP2, and the server is on the same machine AND
the firewall is disabled.
I'm working with the 669164 svn build.

Is there something I should do to be able to use active mode?

Thanks for any suggestions.

View this message in context:
Sent from the Commons - User mailing list archive at

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message