Subject: | Net::FTP and error at connect |
Date: | Thu, 2 Jul 2015 14:58:19 +0200 |
To: | bug-libnet [...] rt.cpan.org |
From: | Juan Antonio Castillo Dayer <juan.castillo [...] meteologica.com> |
Perl v5.20.2 from "perl-4:5.20.2-326.fc22.x86_64" package.
Net::FTP v2.79 (according to /usr/share/perl5/Net/FTP.pm file)
Fedora 4.0.6-300.fc22.x86_64.
Hi,
When I try to connect to a out of reach service, "Net::FTP->new "
return undef, but I can't find the error message in $@ (or $EVAL_ERROR
if I use English) like in the constructor section[1] it's said.
However, when I try to connect to that server with ftp system command,
I get some of information.
Example:
my $ftp = Net::FTP->new( q{xxx.xxx.xxx.xxx},
Timeout => 120,
Passive => 1,
) or print qq{Error at connect: "$EVAL_ERROR"};
Produce:
Error at connect: ""
But if I execute $ ftp -pv xxx.xxx.xxx.xxx
it produces:
Connected to (xxx.xxx.xxx.xxx).
421 Service not available, remote server has closed connection
Show quoted text
ftp>
I've also tried with "Debug => 1" argument and I get:
Net::FTP>>> Net::FTP(2.79)
Net::FTP>>> Exporter(5.70)
Net::FTP>>> Net::Cmd(2.30)
Net::FTP>>> IO::Socket::INET(1.35)
Net::FTP>>> IO::Socket(1.38)
Net::FTP>>> IO::Handle(1.35)
Net::FTP: Unexpected EOF on command channel at ./script.pl line 74.
Error at connect: ""
Is there an error?
Thanks.
Regards,
[1] http://search.cpan.org/~shay/libnet-3.06/lib/Net/FTP.pm#CONSTRUCTOR
--
Juan Antonio Castillo Dayer
Meteologica, S.A.
juan.castillo@meteologica.com
www.meteologica.com