Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
3.2k views
in Java FTP by (160 points)
does free version 2.3.0 support ipv6?

I'm trying an upload and I'm getting an error. the code is:

FileTransferClient ftp = new FileTransferClient();
ftp.setRemoteHost("remotehost");
ftp.setUserName("username");
ftp.setPassword("password");
ftp.connect();
ftp.setContentType(FTPTransferType.BINARY);
System.out.println(ftp.isConnected()); // prints true

// okay until here:
FileTransferOutputStream ftos = ftp.uploadStream("myfilename");

//then:
com.enterprisedt.net.ftp.FTPException: 500 Illegal PORT command.
at com.enterprisedt.net.ftp.FTPControlSocket.validateReply(FTPControlSocket.java:1223)
at com.enterprisedt.net.ftp.FTPControlSocket.setDataPort(FTPControlSocket.java:815)
at com.enterprisedt.net.ftp.FTPControlSocket.sendPORTCommand(FTPControlSocket.java:669)
at com.enterprisedt.net.ftp.FTPControlSocket.createDataSocketActive(FTPControlSocket.java:616)
at com.enterprisedt.net.ftp.FTPControlSocket.createDataSocket(FTPControlSocket.java:583)
at com.enterprisedt.net.ftp.FTPClient.setupDataSocket(FTPClient.java:2648)
at com.enterprisedt.net.ftp.FTPClient.initPut(FTPClient.java:2704)
at com.enterprisedt.net.ftp.FTPOutputStream.<init>(FTPOutputStream.java:136)
at com.enterprisedt.net.ftp.FileTransferClient.uploadStream(FileTransferClient.java:849)
at com.enterprisedt.net.ftp.FileTransferClient.uploadStream(FileTransferClient.java:826)
....

2 Answers

0 votes
by (160 points)
I tested:

ftp.getAdvancedFTPSettings().setConnectMode(FTPConnectMode.PASV);

and it appears to work. is this a correct approach? is it necessary for ipv6 only?

my server is vsftpd under RHEL 5.5.

regards
0 votes
by (162k points)
Yes passive mode should work with IPV6

Categories

...