Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

FTP logging errors

Posted on 2004-08-12
3
Medium Priority
?
410 Views
Last Modified: 2013-12-23
Hello,

I have narrowed down an issue with our symantec firewall which appears to be causing several of our ftp sessions from our UNIX TRU-64 script to fail to transmit data.  The problem is that my script doesn't report any error.  I have added verbose, trace, and debug but still cannot get the errors to come out.  I am concerned that perhaps ftp is getting an error, but is unable to report what the error is.  Does anyone know of any better tools for assuring that FTP drops of and picks up data successfully?

Here is a copy of the script which executes:

+ receive_ftp ftp.trad.partner.com *.TXT INET.IN vpd TPARTNER user logonid
+ MACHINE=ftp.trad.partner.com
+ FTPFILE=*.TXT
+ DATAFILE=INET.IN
+ FTPSERVER_DIR=vpd
+ TPARTNER=TPARTNER
+ USER_NAME=vpd
+ PASS_WORD=$logonid
+ max_rep=600
+ sleep_time=1
+ date
+ echo invoking FTP to receive EDI data from TPARTNER  Thu Aug 12 14:41:12 PDT 2
004
invoking FTP to receive EDI data from TPARTNER  Thu Aug 12 14:41:12 PDT 2004
+ [ -s /app/proedi/temp/comm-term.LCK ]
+ echo 313101
+ 1> /app/proedi/temp/comm-term.LCK
+ echo verbose
+ 1> /usr/users/edi/.netrc
+ echo debug
+ 1>> /usr/users/edi/.netrc
+ echo trace
+ 1>> /usr/users/edi/.netrc
+ echo machine ftp.trad.partner.com
+ 1>> /usr/users/edi/.netrc
+ echo login user
+ 1>> /usr/users/edi/.netrc
+ echo password $logonid
+ 1>> /usr/users/edi/.netrc
+ echo macdef init
+ 1>> /usr/users/edi/.netrc
+ echo cd vpd
+ 1>> /usr/users/edi/.netrc
+ echo type binary
+ 1>> /usr/users/edi/.netrc
+ echo mget *.TXT
+ 1>> /usr/users/edi/.netrc
+ echo quit
+ 1>> /usr/users/edi/.netrc
+ echo
+ 1>> /usr/users/edi/.netrc
+ chmod 600 /usr/users/edi/.netrc
+ cd /app/proedi/tin/tempftp
+ FTPPID=311917
+ ftp_count=0
+ [ ftp_count -lt 600 ]
+ ps -p 311917
+ ftp -i ftp.trad.partner.com
       PID TTY      S           TIME CMD
    311917 ??       R N      0:00.01 ftp -i ftp.trad.partner.com
+ echo Exit Status=0
Exit Status=0
+ (( ftp_count += 1 ))
+ echo Repcount: 1
Repcount: 1
+ ftp -i ftp.trad.partner.com
       PID TTY      S           TIME CMD
    311917 ??       R N      0:00.01 ftp -i ftp.trad.partner.com
+ echo Exit Status=0
Exit Status=0
+ (( ftp_count += 1 ))
+ echo Repcount: 1
Repcount: 1
+ sleep 1
+ [ ftp_count -lt 600 ]
+ ps -p 311917
       PID TTY      S           TIME CMD
+ echo Exit Status=1
Exit Status=1
+ (( ftp_count= 600 + 1 ))
+ [ ftp_count -lt 600 ]
+ [ ftp_count -eq 600 ]
+ [ -s TRAD040812142524.TXT ]
+ ls TRAD040812142524.TXT
+ 1>> /app/proedi/tin/tempftp/file_delete
+ read ftp_file
+ ls TRAD040812142524.TXT
+ cat TRAD040812142524.TXT
+ 1>> /app/tpartner/tin/INET.IN
+ mv TRAD040812142524.TXT /app/proedi/arc/TRADPARTNER.TRAD040812142524.TXT.04081214
4000
+ read ftp_file
0
Comment
Question by:eshapley
1 Comment
 
LVL 40

Accepted Solution

by:
jlevie earned 1000 total points
ID: 11789373
If you are behind a firewall you will almost certainly need to use Passive mode for FTP transfers. Your script doesn't set that, so unless the FTP client defaults to Passive mode any failure are likely to be a result of not using that mode.

Ordinary FTP clients really aren't suitable for scripted sessions. It is better to use a tool designed for scripted sessions like ncftpget/ncftpput (http://www.ncftp.com/) or wget (http://www.gnu.org/software/wget/wget.html).
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

WARNING:   If you follow the instructions here, you will wipe out your VTP and VLAN configurations.  Make sure you have backed up your switch!!! I recently had some issues with a few low-end Cisco routers (RV325) and I opened a case with Cisco TA…
This article is in regards to the Cisco QSFP-4SFP10G-CU1M cables, which are designed to uplink/downlink 40GB ports to 10GB SFP ports. I recently experienced this and found very little configuration documentation on how these are supposed to be confi…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…

876 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question