Solved

FTP logging errors

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

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

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

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 …
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
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…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

679 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