Skip Menu |

This queue is for tickets about the libnet CPAN distribution.

Report information
The Basics
Id: 105619
Status: open
Priority: 0/
Queue: libnet

People
Owner: Nobody in particular
Requestors: juan.castillo [...] meteologica.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



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
I have checked this using Net::FTP 3.07 and I can't seem to duplicate it. My protocol was to run netcat like this: nc -l -p 999 -c exit and use Net::FTP to connect to port 999, which results in netcat accepting the connection and then dropping it. The error message that I get in $@ is "[Net::FTP] Connection closed". Can you duplicate the issue in the latest version, and if so, can you give a complete test environment that replicates the problem?