Solved

FTP logging errors

Posted on 2004-08-12
3
397 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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

PRTG Network Monitor lets you monitor your bandwidth usage, so you know who is using up your bandwidth, and what they're using it for.
When it comes to security, there are always trade-offs between security and convenience/ease of administration. This article examines some of the main pros and cons of using key authentication vs password authentication for hosting an SFTP server.
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…
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…

828 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