Can't Net::FTP - 425 Can't build data connection: Connection refused 
Author Message
 Can't Net::FTP - 425 Can't build data connection: Connection refused

Any idea why I get "425 Can't build data connection: Connection refused"
when I try to retrieve a file with Net::FTP?  This FTP connection works
with other FTP utilities.

It dawned on me that the install probably didn't want the name of my
typical FTP server when it asked "What is your local internet domain
name : []"  I don't _have_ a local internet domain name.  I'm assigned
an IP address via my PPP connection.  Is this the problem?

Thanks for any assistance.

#!/usr/bin/perl

#use strict ;

use CHSW::Config ;
use Net::FTP ;

my $host = 'myhost' ;
my $dir = '/home/me' ;
my $user = 'me' ;
my $pass = 'pw' ;
my $file = 'myfile' ;

my $ftp = new Net::FTP $host, Debug => 1 ;

$ftp->login($user, $pass) or die "login: $!" ;

$ftp->cwd($dir) or die "cwd: $!" ;
$ftp->ascii ;

$ftp->get($file, $file) ;

$ftp->quit ;

Quote:
>Net::FTP=GLOB(0xcb8b28)<<< 220 myhost FTP server (Version wu-2.4(8) Thu Feb 27 16:42:16 PST 1997) ready.
>Net::FTP=GLOB(0xcb8b28)>>> user me
>Net::FTP=GLOB(0xcb8b28)<<< 331 Password required for me.
>Net::FTP=GLOB(0xcb8b28)>>> PASS ....
>Net::FTP=GLOB(0xcb8b28)<<< 230 User me logged in.
>Net::FTP=GLOB(0xcb8b28)>>> CWD /home/me
>Net::FTP=GLOB(0xcb8b28)<<< 250 CWD command successful.
>Net::FTP=GLOB(0xcb8b28)>>> TYPE A
>Net::FTP=GLOB(0xcb8b28)<<< 200 Type set to A.
>Net::FTP=GLOB(0xcb8b28)>>> PORT 38,26,9,209,0,0
>Net::FTP=GLOB(0xcb8b28)<<< 200 PORT command successful.
>Net::FTP=GLOB(0xcb8b28)>>> NLST
>Net::FTP=GLOB(0xcb8b28)<<< 425 Can't build data connection: Connection refused.
>Net::FTP=GLOB(0xcb8b28)>>> PORT 38,26,9,209,0,0
>Net::FTP=GLOB(0xcb8b28)<<< 200 PORT command successful.
>Net::FTP=GLOB(0xcb8b28)>>> RETR myfile
>Net::FTP=GLOB(0xcb8b28)<<< 425 Can't build data connection: Connection refused.
>Net::FTP=GLOB(0xcb8b28)>>> QUIT
>Net::FTP=GLOB(0xcb8b28)<<< 221 Goodbye.



Fri, 27 Jul 2001 03:00:00 GMT  
 Can't Net::FTP - 425 Can't build data connection: Connection refused
Any idea why I get "425 Can't build data connection: Connection refused"
when I try to retrieve a file with Net::FTP?  This FTP connection works
with other FTP utilities.

It dawned on me that the install probably didn't want the name of my
typical FTP server when it asked "What is your local internet domain
name : []"  I don't _have_ a local internet domain name.  I'm assigned
an IP address via my PPP connection.  Is this the problem?

Thanks for any assistance.

#!/usr/bin/perl

#use strict ;

use CHSW::Config ;
use Net::FTP ;

my $host = 'myhost' ;
my $dir = '/home/me' ;
my $user = 'me' ;
my $pass = 'pw' ;
my $file = 'myfile' ;

my $ftp = new Net::FTP $host, Debug => 1 ;

$ftp->login($user, $pass) or die "login: $!" ;

$ftp->cwd($dir) or die "cwd: $!" ;
$ftp->ascii ;

$ftp->get($file, $file) ;

$ftp->quit ;

Quote:
>Net::FTP=GLOB(0xcb8b28)<<< 220 myhost FTP server (Version wu-2.4(8) Thu Feb 27 16:42:16 PST 1997) ready.
>Net::FTP=GLOB(0xcb8b28)>>> user me
>Net::FTP=GLOB(0xcb8b28)<<< 331 Password required for me.
>Net::FTP=GLOB(0xcb8b28)>>> PASS ....
>Net::FTP=GLOB(0xcb8b28)<<< 230 User me logged in.
>Net::FTP=GLOB(0xcb8b28)>>> CWD /home/me
>Net::FTP=GLOB(0xcb8b28)<<< 250 CWD command successful.
>Net::FTP=GLOB(0xcb8b28)>>> TYPE A
>Net::FTP=GLOB(0xcb8b28)<<< 200 Type set to A.
>Net::FTP=GLOB(0xcb8b28)>>> PORT 38,26,9,209,0,0
>Net::FTP=GLOB(0xcb8b28)<<< 200 PORT command successful.
>Net::FTP=GLOB(0xcb8b28)>>> NLST
>Net::FTP=GLOB(0xcb8b28)<<< 425 Can't build data connection: Connection refused.
>Net::FTP=GLOB(0xcb8b28)>>> PORT 38,26,9,209,0,0
>Net::FTP=GLOB(0xcb8b28)<<< 200 PORT command successful.
>Net::FTP=GLOB(0xcb8b28)>>> RETR myfile
>Net::FTP=GLOB(0xcb8b28)<<< 425 Can't build data connection: Connection refused.
>Net::FTP=GLOB(0xcb8b28)>>> QUIT
>Net::FTP=GLOB(0xcb8b28)<<< 221 Goodbye.



Mon, 30 Jul 2001 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Net::FTP - Cannot built Data connection

2. NET::SMTP Connection Refused & CHILD_MAX/OPEN_MAX

3. Net:Ftp and connection

4. Net::FTP: Determining the state of a connection.

5. Net::Ftp and connection

6. Net::FTP timeouts/dropped connections

7. parsing canned response

8. question about canned perl script

9. Troubles with a Canned script

10. canned reply script

11. canned reply??

12. canned replies

 

 
Powered by phpBB® Forum Software