develooper Front page | perl.libnet | Postings from October 2001

can't build data connection: connection refused

Thread Next
Terrence Monroe Brannon
October 18, 2001 16:18
can't build data connection: connection refused
Message ID:
I get an error when attempting to do a RETR with my Net::FTP script. 
source code and Debug log below... thanks for any help

use lib '/m/aru/aruforms/pm';
use Net::FTP;
use strict;

my $host = '';
my $file = '/d1/prepos/dev/apfrepos/NLS/rel11i/twncan/';

     my $n = Net::FTP->new($host, Debug => 1, Passive => 1);
#    $n->login('tmbranno','xxx');
#    $n->login('anonymous', 'tmbranno@ap555sun');
     $n->login; # use .netrc

     my $o = $n->cmd('retr', $file);

Net::FTP=GLOB(0x2b51e4)<<< 220 FTP server 
(Version wu-2.\
6.1(1) Thu Apr 26 13:07:30 PDT 2001) ready.
Net::FTP=GLOB(0x2b51e4)>>> user tmbranno^M
Net::FTP=GLOB(0x2b51e4)<<< 331 Password required for tmbranno.
Net::FTP=GLOB(0x2b51e4)>>> PASS ....
Net::FTP=GLOB(0x2b51e4)<<< 230 User tmbranno logged in.
Net::FTP=GLOB(0x2b51e4)>>> retr 
Net::FTP=GLOB(0x2b51e4)<<< 425 Can't build data connection: Connection refused.
::for 83 at line 18.
Net::FTP=GLOB(0x2b51e4)>>> QUIT^M
Net::FTP=GLOB(0x2b51e4)<<< 221-You have transferred 0 bytes in 0 files.
a ^M/2058255^[[71C  ^M%


Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About