The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Special Forums > Hardware > Filesystems, Disks and Memory
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #3 (permalink)  
Old 04-28-2009
kishorepotta kishorepotta is offline
Registered User
  
 

Join Date: Apr 2009
Posts: 2
Not able to FTP the files to a FTP server

Hi, Thaks for your quick response.

Our Linux box OS ---> Red Hat Enterprise Linux 2.4.21-47.0.1 (release 3 )
Remote FTP server OS ---> Ubuntu 6.06.1

Below is Perl code,which we are using to connect to remote FTP server and to transfer the files.

eval { $ftp = Net::FTP->new($remoteServerIP, Debug => 0) or $exitModule='TRUE' };
if ($@ or $exitModule eq 'TRUE') {

log_error("ERROR: Failed to connect to " ) ;
eval { $ftp->close() }

}else{
eval { $ftp -> login($User,$Pwd) or $exitModule='TRUE' };
if ($@ or $exitModule eq 'TRUE') {
log_error ("ERROR: (" . $ftp->message . ") Failed to login");
eval { $ftp->close()}
}else{
eval { $ftp->put($sourceFile , $targetFile) or $status = 'ERROR' };
my $ftp_message = $ftp->message;
if ($@ or $status eq 'ERROR') {
log_error ("WARNING: (" . $ftp_message . ") Error during transmission");
}
}
};


We are getting the error "WARNING: Failed to transfer file. Error during transmission" (when tried to push the files using above Perl code) since two months before that we were able to transfer the files. We haven't made any changes on our server and remote severt for the last 12 months. We are not able to figure out what suddenly causing the issue.

Thanks.