Google 网上论坛不再支持新的 Usenet 帖子或订阅项。历史内容仍可供查看。

Problems using FTP URL

已查看 164 次
跳至第一个未读帖子

Dave Rathnow

未读,
2004年8月30日 16:14:592004/8/30
收件人

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.


Dave Rathnow

未读,
2004年8月31日 23:04:022004/8/31
收件人
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.

"Dave Rathnow" <drat...@yahoo.com> wrote in message
news:7VLYc.76401$X12.9276@edtnps84...

0 个新帖子