Operating System - HP-UX
1834244 Members
2825 Online
110066 Solutions
New Discussion

Re: FTP connection problems.

 
Dan DeHaan
Advisor

FTP connection problems.

Running HPUX-11.0 on server side.
A user has an application that establishes an FTP connection (from NT client) and sends/retrieves files from my server. He's designed it to never close the connection except if he receives an error. The program will run fine for about an hour (never the same period of time) sending and retrieving files (lots of them), then when he tries to send a file the server will boot him off and he gets the error "Can't build data connection: Connection timed out." He then re-establishes the connection, re-sends the file and the whole thing starts over.
I'm running ftpd with the -l -v -L flags and can't see anything in the syslog.log. There is nothing special about the files (all small), and no set time period for when he gets booted off; sometimes 20 minutes, sometimes several hours. There are no ftp timeouts on the network or the server. My tcp_keepalive_interval is 7200000 - 2 hours.
How can I find what is closing his session?
8 REPLIES 8
Steven E. Protter
Exalted Contributor

Re: FTP connection problems.

Suggestion:

ehanced logging

inetd -l


take some snapshots of netstat -an and see if you can trap some unusual data.


The be honest this could be as simple as an unstable network connection or intermittant dsl drop.

Check the logs on the NT side, they might prove revealing.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Sridhar Bhaskarla
Honored Contributor

Re: FTP connection problems.

Hi,

From the man page of 'ftpd'.

-t timeout Causes ftpd to timeout inactive sessions after
timeout seconds. By default, ftpd terminates an
inactive session after 15 minutes.

It's 15 mins idle after ftpd will disconnect the client.

You can specify a timeout value with the ftpd specification in /etc/inetd.conf. But that will effect all the ftp sessions which you may not want.

So, I suggest your client to keep running commands like 'ls' etc., inside the ftp session.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Abdul Rahiman
Esteemed Contributor

Re: FTP connection problems.

Try the -t (timeout) and -T (maxtimeout) options with ftpd daemon in the /etc/inetd.conf file.

Refer man ftpd for more info. on those options.
No unix, no fun
Mel Burslan
Honored Contributor

Re: FTP connection problems.

Another point to check is any kind of networkinng equipment which imposes timeouts. In the past, I worked at places, if you do not show any sign of activity for 30 minutes (1800 seconds) or longer, the connection was cutout, no questions asked to protect the data from unauthorized access. It may be a good idea to talk to your network administrator to see if such a restriction comes from network side of the picture.
________________________________
UNIX because I majored in cryptology...
Dan DeHaan
Advisor

Re: FTP connection problems.

Thanks for the fast replies!

Iâ ve turned on the logging for inetd and will monitor it.

The ftp session doesnâ t have much sustained idle time. Every minute it sends available files and picks up new files. So there is at least some file-list checking every 1 minute. Is there a parameter that would determine the maximum connection time (idle or busy)? How about a maximum number of files transferred of amount of data transferred?

Iâ ve been told by the network admin that there are no time restraints for ftp on the netw
Mel Burslan
Honored Contributor

Re: FTP connection problems.

as usual, most obvious has been forgotten to be asked :

is there any WAN connectivity in this picture, i.e., anything like a VPN tunnel over internet or a customer connection via an extranet etc.

if there is, all of the above goes down the drain as some congestion on the WAN link might be causing you this disconnect mishaps.

As far as I know there is no such thing as maximum transfer amount or maximum # of files transferred by default, if you are using the OS incorporated ftpd. And 1 minute is too short of a time slice to cause disconnects due to an idle connection. Default is about 15 min.s or 900 sec.s

________________________________
UNIX because I majored in cryptology...
Bharat Katkar
Honored Contributor

Re: FTP connection problems.

Yes if it's a WAN connectivity, need to check over Router's IP configuration as well.
Regards,
Bharat
You need to know a lot to actually know how little you know
Jim Keeble
Trusted Contributor

Re: FTP connection problems.

The best way to tell who or what is closing the connection is to trace the network traffic.

There is a free network trace utility called ethereal available from www.ethereal.com for both windows and hp-ux. The capabilities are similar to Netmon and other protocol analyzer products. Ethereal can also decode nettl traces from HP-UX.

What you need to do is capture a trace on the NT side with netmon or ethereal and on the HP side with either nettl or ethereal, and compare the two. FTP uses tcp ports 20 and 21, so you can use that and the server and client IP's to filter out uninteresting network traffic. If you want to use nettl on the HP side, the command to start tracing is:

nettl -tn pduin pduout -e ns_ls_ip -s 1024 -tm 99999 -f ftp

The traces go to ftp.TRC* files.

Given this, you can see 1) whether the network is passing everything necessary from one side to the other, or 2) which side is aborting the connection.