Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
3.8k views
in Java FTP by (162k points)
A user writes:
Hi,

I have a question regarding the FTP file (open source) in your website. We are trying to make a 'Active' connection using the FTP.jar file. What method call should be used ?
What parameters and connection type should be passed to make an Active connection ?

thanks
nandini


You need to do the below:

FTPClient ftp = new FTPClient();
ftp.setRemoteHost("ftp.whatever.com");
ftp.connect();
ftp.setConnectMode(FTPConnectMode.ACTIVE);

4 Answers

0 votes
by
Bruce

Though we have set the connection parameter as
ftp.connect();
ftp.setConnectMode(FTPConnectMode.ACTIVE);

Still we are getting the same Error "Can't create PASV connection"

And second option we tried commenting the
//ftp.setConnectMode(FTPConnectMode.ACTIVE);

Still we are getting the same Error "Can't create PASV connection"

Could you pls suggest on this.Would be greatful.

Thanks
Anoop :(
0 votes
by
Hi,

I have tried to connect to ftp box. I have opend a seperate window for each connection. I could able to connect successfully to the ftp box for 5 window but when i tried to connect in 6 th window i was getting error message like below.

230 User wmftp logged in.
ftp> quote
Command line to send PASV
530 Can't open passive connection
ftp>

Please advise

Thanks
0 votes
by (162k points)
Post the log file and a code snippet

Bruce

Though we have set the connection parameter as
ftp.connect();
ftp.setConnectMode(FTPConnectMode.ACTIVE);

Still we are getting the same Error "Can't create PASV connection"

And second option we tried commenting the
//ftp.setConnectMode(FTPConnectMode.ACTIVE);

Still we are getting the same Error "Can't create PASV connection"

Could you pls suggest on this.Would be greatful.

Thanks
Anoop :(
0 votes
by (162k points)
FTP server probably has a 5 connection limit per user.

Hi,

I have tried to connect to ftp box. I have opend a seperate window for each connection. I could able to connect successfully to the ftp box for 5 window but when i tried to connect in 6 th window i was getting error message like below.

230 User wmftp logged in.
ftp> quote
Command line to send PASV
530 Can't open passive connection
ftp>

Please advise

Thanks

Categories

...