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 > Filesystems, Disks and Memory
.
google unix.com



Filesystems, Disks and Memory Discuss NAS, SAN, RAID, Robotic Libraries, backups, RAM, DRAM, SCSI, IDE, EIDE topics here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
FTP Files from one server to another samit_9999 UNIX for Dummies Questions & Answers 2 04-01-2009 03:33 PM
transfer files from the server 1 to server 2 bomozah Linux 2 11-03-2008 07:11 AM
copying files from one server to another server manoj.solaris Shell Programming and Scripting 4 10-19-2008 06:20 AM
FTP multiple files from remote server to local server berlin_germany Shell Programming and Scripting 2 12-20-2006 03:24 AM
files of dns server themask UNIX for Advanced & Expert Users 2 01-01-2002 11:38 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 04-24-2009
kishorepotta kishorepotta is offline
Registered User
  
 

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

Hi ,

We are facing a weird problem in our project. we need to send some xml & audio files to a remote FTP server from a Linux box, we are doing this in Perl script using Net::FTP->. Issue here is.. when FTPed the files using Perl scripts, only empty files ( 0 byte) are getting created on the remote server and data is not getting written onto the server. But we are able to manually transfer files to FTP server through a FTP tool but they fail when we try to do the same through Perl script. We checked on the remote server and there is a lot of free space on the server.

Our script is returning 'Bad File Descriptor' error where as it is working fine for all the rest of the other 50 FTP servers we have.

Any help /inputs regards this issue would be greatly appreciated.

Thanks
  #2 (permalink)  
Old 04-26-2009
sysgate's Avatar
sysgate sysgate is offline Forum Advisor  
Unix based
  
 

Join Date: Nov 2006
Location: Bulgaria
Posts: 1,318
Hello, you have done the fisrt good steps for troubleshooting this issue. It seems that only the perl script cannot interact properly with this FTP server and this OS, the remote one. Please let us know the versions of the OS, FTPD and post some perl code, if possible. Looks like a compatibility issue, since the script is working against other OSes and some other FTP servers. It is important to answer the following questions as well - Have I changed the script, what OSes and FTP servers my script works with, and what's the difference on the remote end, in this particular task. Can you execute the same task against other machine ? Are there any special characters or Windows-like paths in the script ? I have seen "bad file descriptor" with either corrupted test source file, or against Windows FTP - I was missing the correct Windows path represenation. HTH.
  #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.



Sponsored Links
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 04:49 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language translation by Google.
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0