Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: NET::FTP - Unexpected EOF on command channel

by Eureka_sg (Monk)
on May 15, 2001 at 18:59 UTC ( [id://80553]=note: print w/replies, xml ) Need Help??


in reply to NET::FTP - Unexpected EOF on command channel

Try with Net::FTP debugging on ! It might give you a better idea of what's going on:

$ftp = Net::FTP->new($host, Debug => 1);

Replies are listed 'Best First'.
Re: Re: NET::FTP - Unexpected EOF on command channel
by Anonymous Monk on May 15, 2001 at 19:16 UTC

    I have, that's how I worked out it was an unexpected EOF!

    I don't have the log file available to post as I've gone and deleted it before running another version of the program which as yet hasn't gone wrong, however the bit of code reads like this...

    It gets the file and returns 0 if okay, otherwise the it returns code from the server. It doesn't delete yet to move files from the FTP server, it just copies at the moment, and it doesn't cope with EOFs...

    $exempt is 421 if I want it to try again later with a timeout...

    sub ftp_move() { my $exempt=-1; my $code; $exempt=$_[0] if $_[0]; &write_log("+ [$filename] interesting name, moving to incoming + directory.",0); if($ftp->get($filename,$rvf_incoming.$filename)) { $files_moved++; return 0; } $code=$ftp->code; if($code>=400) { &write_log("| [$filename] error getting from FTP site +- ".$code." $@",0) if $code!=$exempt; $files_error++ if $code!=$exempt; return $code; } return 0; }

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://80553]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (1)
As of 2024-04-24 23:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found