Solved

FTP logging errors

Posted on 2004-08-12
3
388 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
3 Comments
 
LVL 40

Accepted Solution

by:
jlevie earned 250 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

Give your grad a cloud of their own!

With up to 8TB of storage, give your favorite graduate their own personal cloud to centralize all their photos, videos and music in one safe place. They can save, sync and share all their stuff, and automatic photo backup helps free up space on their smartphone and tablet.

Join & Write a Comment

Suggested Solutions

Meet the world's only “Transparent Cloud™” from Superb Internet Corporation. Now, you can experience firsthand a cloud platform that consistently outperforms Amazon Web Services (AWS), IBM’s Softlayer, and Microsoft’s Azure when it comes to CPU and …
If you're not part of the solution, you're part of the problem.   Tips on how to secure IoT devices, even the dumbest ones, so they can't be used as part of a DDoS botnet.  Use PRTG Network Monitor as one of the building blocks, to detect unusual…
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.
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

747 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now