1855278 Members
5307 Online
104109 Solutions
New Discussion

FTP abort on hp 10.20

 
Jasper Lai
Occasional Advisor

FTP abort on hp 10.20

Hi all,
We are using HP-UX 10.20, we run a script by cron, the script call ftp to connect a WinNT4 FTP server to get some files.
Rarely, the script will abort with no reasons. We are sure the script abort during FTP everytime, since we keep the FTP log.

Is the FTP we use have bug on 10.20?
Here is the what output about the ftp
=======================
/usr/bin/ftp:
Copyright (c) 1985, 1989 Regents of the University of California.
main.c based on 5.13 (Berkeley) 3/14/89
Revision 1.1.212.3 Wed Jul 14 10:27:17 GMT 1999
cmds.c 5.18 (Berkeley) 4/20/89
cmdtab.c 5.9 (Berkeley) 3/21/89
ftp.c 5.28 (Berkeley) 4/20/89
glob.c 5.7 (Berkeley) 12/14/88
ruserpass.c 5.1 (Berkeley) 3/1/89
domacro.c 1.6 (Berkeley) 2/28/89
===================

Thanks.
Jasper.
14 REPLIES 14
RAC_1
Honored Contributor

Re: FTP abort on hp 10.20

First 10.20 is obsolete. Check you are up to date on patches (particulary ftp patches) for 10.20.

Also do you get any messages in syslog for this?? Try using passive command on ftp.

Anil
There is no substitute to HARDWORK
Jasper Lai
Occasional Advisor

Re: FTP abort on hp 10.20

Hi Anil,

Thanks, I am a newbie, what is the syslog and where is it?

Thanks,
-Jasper.
RAC_1
Honored Contributor

Re: FTP abort on hp 10.20

Syslog is /var/adm/syslog/syslog.log

Check if there are any errors.

Anil
There is no substitute to HARDWORK
Jasper Lai
Occasional Advisor

Re: FTP abort on hp 10.20

Hi Anil,

Thanks for the syslog.
But the syslog have no logging about the problem ftp process.

You suggest me to use passive mode, I type help in ftp but no command like passive, how can i use it?

About the problem event, Here is the FTP command input and the output for your reference
====input=====
user xxxxxxxx pppppppp
ascii
lcd /projectA/jasper/data_in
cd /jasperprojecta/export/data
get file_1.dat
quit
=====end======
=====output=====
Connected to xx.xx.xxx.xx
220 xxxxxxxx Microsoft FTP Service (Version 4.0).
331 Password required for xxxxxxxx.
230 User xxxxxxxx logged in.
200 Type set to A.
Local directory now /projectA/jasper/data_in
250 CWD command successful.
200 PORT command successful.
150 Opening ASCII mode data connection for file_1.dat(17 bytes).
=====end=====

It seems abort at the get command. the quit command have never execute.
Other FTP command also abort before in other log, such as prompt and ls command.

Thanks,
-Jasper.
RAC_1
Honored Contributor

Re: FTP abort on hp 10.20

I checked on my 10.20 box and found that this ftp version does not have passive command.

Does Windows box log anything???

Also it would be better to do binary transfer instead of ascii.

Check file /etc/inetd.conf and check ftp line. Does it -l option(to log)

If does not have it put otion -l and restart inetd. inetd -c

This should log ftp messages in syslog.log file.

Anil
There is no substitute to HARDWORK
Steve Steel
Honored Contributor

Re: FTP abort on hp 10.20

Hi

Point of interest.This could be name resolution or even a bad router/hub

Do you get a problem if you run this from the command prompt or type the commands in 1 by 1


Steve Steel
If you want truly to understand something, try to change it. (Kurt Lewin)
Bill Hassell
Honored Contributor

Re: FTP abort on hp 10.20

You need to enable detailed logging on the Windows side since your script originates on the HP-UX side. However, I would start by running the commands by hand rather than by your script. Also, make sure your script enables detailed information from ftp by changing the ftp command to add -v so you'll see more details. You may find that your network admin has made some router changes without notice and the connection is broken by the router.


Bill Hassell, sysadmin
Jasper Lai
Occasional Advisor

Re: FTP abort on hp 10.20

Hi Anil,

I have check the file inetd.conf
it contain a line
=========
ftp stream tcp nowait root /usr/lbin/ftpd.10.20 ftpd -1
=========
is it correct?

Thanks,
-Jasper
Jasper Lai
Occasional Advisor

Re: FTP abort on hp 10.20

Hi Steve and Bill,

Thanks, you are very nice.
I am sorry to mislead you both in my first message that the script abort "everytime".
Actually it doesn't abort everytime, it run hundard times a day, it always have no problem, just one or two times a week or a month it will abort. Also I have try manually FTP to that FTP server with no problems.
It abort completely to OS since all the statments after FTP statment can't run, including the outer calling script. So The outer calling script can't capture the return code to handle error.

Thanks, I will try to contact that Microsoft FTP server administrator , see if he can let me exam the log.

I am very grateful you have give me more ideal.

Thanks,
-Jasper.
Jasper Lai
Occasional Advisor

Re: FTP abort on hp 10.20

Dear all expert,

After discuss with my colleague, we guess the job is not abort or 'dead', it may just hang in the FTP process, so the script also hang.
I agree with him, because I remember one time that I think it is 'abort' for several hours, I type ps -ef to check. I did see the ftp and that script in the list.

do you have any suggestion?

very thanks.
-Jasper
Jasper Lai
Occasional Advisor

Re: FTP abort on hp 10.20

Hi All,

I have got the NT 4 FTP log, and exam that when our script put/get file to that FTP server and 'hang', the FTP server log error 425 and/or 426.

Is it a problem on the network connection?
It seem the connection is lost, and our script wait a whole day(hang).
The file we put/get are very small, about serveral K.
Can the ftp command in our script timeout for a specific seconds of no network activity?
I have exam the ftp man page, there is a command 'idle' , is it useful to my case?
and can 'passive' command useful?

Thanks,

-Jasper
Steve Steel
Honored Contributor

Re: FTP abort on hp 10.20

Hi


look at nettune

TCP Keepalive 10 minutes
abort 2 minutes later:
nettune
nettune -s tcp_keepstart 600
nettune -s tcp_keepfreq 5
nettune -s tcp_keepstop 120


Steve Steel
If you want truly to understand something, try to change it. (Kurt Lewin)
Jasper Lai
Occasional Advisor

Re: FTP abort on hp 10.20

Hi Steve,

What is nettune?
How I can use it to debug my problem?

This is very great to discuss with experts here, I have learn so much!

Thanks,
-Jasper
Steve Steel
Honored Contributor

Re: FTP abort on hp 10.20

Hi

A new network node-management tool called nettune. It is used to modify certain kernel parameters that control networking defaults such as keepalive timers. nettune is in /usr/contrib/bin.

nettune has a manpage on 10.20 and you can use it to force the connections to break after a time

NETTUNE

At HP-UX 10.0, there was a new command called nettune that provides an interface for configuration and tuning of various network parameters. nettune supports a consistent, reliable, and secure method for you to use to tune network parameters based on your performance and configuration needs. nettune allows you to view (get) or change (set) the value of many networking parameters, such as the TCP keep-alive timeout value(s), default socket buffer sizes, or the enabling/disabling of IP forwarding. All users may view the values of supported configurable network parameters, but only those with super-user capability can update a parameter. nettune is command-line driven and has an online help facility that briefly describes the available configurable values. nettune is in /usr/contrib/bin, and is not supported by Hewlett-Packard.

For more information on nettune, refer to the nettune(1) manpage in /usr/contrib/man/man1.


Steve Steel

If you want truly to understand something, try to change it. (Kurt Lewin)