commons-user mailing list archives

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

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


Mime
View raw message