Problems using FTP URL

D

Dave Rathnow

I've been banging my head against this one for a couple of days now
and need some help. We recenly started using the URL class to transfer
files via FTP. Our code works well with all servers we've run into,
except Solaris. When we try to FTP a file, we get the following error:

501 EPRT not allowed after EPSV ALL

I pulled the Java sourcs for the associated classes and moved them
into my own packages so I could modify and debug the code. I haven't
been using the URL class, however, instead I've been using my own
FtpURLConnection classes and a few other classes that lay between it
and java Sockets. I turned on debug and have gotten the following (some
overhead removed...):

Sending: TYPE I
200 Type set to I.
Sending: EPSV ALL
200 EPSV ALL command successful.
Sending: EPSV
229 Entering Extended Passive Mode (|||14389|)
Sending: EPRT |1|192.168.2.33|3861|
501 EPRT not allowed after EPSV ALL
Sending: PORT 192,168,2,33,15,21
501 PORT not allowed after EPSV ALL

Can anyone tell me what may be going on here? I'm not an expert in the
FTP RFC but from what little I've read, there is some incompatability
between the Java API and the Solaris server.

Thanks,
Dave.
 
D

Dave Rathnow

For the benefit of others that may hit this and search the archives.

I'm pretty sure the problem is that whoever wrote the FtpClient code
had a few too many coldies while he/she was reading rfc2428. The code
does not converse correctly with IPv6 FTP server and attempts to
issue an EPRT command after issuing an "EPSV ALL" command.
According to the rfc, this is verboten.

The bottom line, the code is broke, at least for Java 1.4.1_06. I
downloaded
and treif Jakarta's commons-net package and the FTPClient class works
fine.

Dave.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,781
Messages
2,569,615
Members
45,296
Latest member
HeikeHolli

Latest Threads

Top