- 论坛徽章:
- 0
|
如题,俺用Net::FTP 去下载WIN FTPserver 下面的文件,总是提示timeout
帐户和密码没问题,用FileZilla 却可以下载下来。不知道是什么原因
同样的代码下载另一个server下面的文件却正常。
FTPSERVER 的端口是2110
my $ftp = Net::FTP->new($host,Timeout=>120,Debug=>1,Port=>2110)
Net::FTP=GLOB(0x85f9d74)<<< 331 User name okay, need password.
Net::FTP=GLOB(0x85f9d74)>>> PASS ....
Net::FTP=GLOB(0x85f9d74)<<< 230 User logged in, proceed.
main: extract_user.pl:46): $ftp->get("$file"
main: extract_user.pl:47): or die print FLOG "ERROR : Cannot change working directory\n\n ";
DB<2> n
Net::FTP=GLOB(0x85f9d74)>>> PASV
Net::FTP=GLOB(0x85f9d74)<<< 227 Entering Passive Mode (192,168,20,114,17,233)
Net::FTP=GLOB(0x85f9d74)>>> RETR mms_2009-01-16.txt
Net::FTP=GLOB(0x85f9d74): Timeout at extract_user.pl line 46
at /usr/lib/perl5/5.8.8/Net/Cmd.pm line 306
Net::Cmd::getline('Net::FTP=GLOB(0x85f9d74)') called at /usr/lib/perl5/5.8.8/Net/Cmd.pm line 345
Net::Cmd::response('Net::FTP=GLOB(0x85f9d74)') called at /usr/lib/perl5/5.8.8/Net/FTP.pm line 1080
Net::FTP::response('Net::FTP=GLOB(0x85f9d74)') called at /usr/lib/perl5/5.8.8/Net/FTP.pm line 1015
Net::FTP::_data_cmd('Net::FTP=GLOB(0x85f9d74)', 'RETR', 'mms_2009-01-16.txt') called at /usr/lib/perl5/5.8.8/Net/FTP.pm line 678
Net::FTP::retr('Net::FTP=GLOB(0x85f9d74)', 'mms_2009-01-16.txt') called at /usr/lib/perl5/5.8.8/Net/FTP.pm line 458
Net::FTP::get('Net::FTP=GLOB(0x85f9d74)', 'mms_2009-01-16.txt') called at extract_user.pl line 46
Died at extract_user.pl line 46.
恳求赐教,在此谢过!
[ 本帖最后由 changejun 于 2009-1-17 14:12 编辑 ] |
|