You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by salahzar <sa...@gmail.com> on 2008/06/26 17:04:43 UTC

[NET] Problems with FTPClient using active connections.

Trying to use commons.net 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 commons.net 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
following:

- until connection everything is fine, no errors
- then I need the outputstream for manually send chunks of bytes to remote
server
(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.
salahzar

-- 
View this message in context: http://www.nabble.com/-NET--Problems-with-FTPClient-using-active-connections.-tp18136159p18136159.html
Sent from the Commons - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org