Solved

FTP logging errors

Posted on 2004-08-12
3
401 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Report: Liquid Web beats Amazon, Rackspace & More

A study by performance analyst firm Cloud Spectator finds that Liquid Web beats rivals Amazon, Rackspace and DigitalOcean when it comes to website and cloud application performance.

Question has a verified solution.

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

Even if you have implemented a Mobile Device Management solution company wide, it is a good idea to make sure you are taking into account all of the major risks to your electronic protected health information (ePHI).
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 …
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
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.

738 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