- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- FIN_WAIT_2 Connections
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2003 06:19 AM
06-17-2003 06:19 AM
I have a server running HPUX 11.00 that has a Microslop server connecting to it.
We seem to have a lot(407) of FIN_WAIT_2 connections when I run a netstat -a.
I've read that this is known problem from Microsoft servers and also the default timeout is 10 minutes for FIN_WAIT_2's on Solaris, is HPUX the same? Is it possible for me to change the default timeout to something like 3 minutes, if so what kind of impacts will this have and how do I do it?
If there are any other recommended solutions (short of hitting the Microsoft box with a hammer!)
Thanks,
Colin.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2003 06:26 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2003 06:26 AM
06-17-2003 06:26 AM
Re: FIN_WAIT_2 Connections
for the HPUX site you can change all this values using
ndd
there are a lot of other thread with full specs about the parameter and their use.
ndd -h supported
or
ndd -h unsupported
to have the simple list...
HTH,
Massimo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2003 06:28 AM
06-17-2003 06:28 AM
Re: FIN_WAIT_2 Connections
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2003 06:29 AM
06-17-2003 06:29 AM
Re: FIN_WAIT_2 Connections
Can I do this while the server is being used or do I need to do this at a quiet time?
Colin.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2003 06:32 AM
06-17-2003 06:32 AM
Re: FIN_WAIT_2 Connections
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2003 06:33 AM
06-17-2003 06:33 AM
Re: FIN_WAIT_2 Connections
# ndd -get /dev/tcp tcp_fin_wait_2_timeout
The /etc/rc.config.d/nddconf file would look like this ..(if you want to set to to say 30mins)..
TRANSPORT_NAME[0]=tcp
NDD_NAME[0]=tcp_fin_wait_2_timeout
NDD_VALUE[0]=1800000
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2003 06:35 AM
06-17-2003 06:35 AM
Re: FIN_WAIT_2 Connections
...
Run the script, at the log produced contains the exact line to run to kill off an offending item. It's nice.
#
# Temporary files used to compare netstat output
#
MYSCRIPTNAME=${0##*/}
TMPFILE1=/var/tmp/$MYSCRIPTNAME.1
TMPFILE2=/var/tmp/$MYSCRIPTNAME.2
#
# Create a log file to keep track of connection that were removed
#
LOGFILE=/var/adm/$MYSCRIPTNAME.log
function getFinWait2 {
/usr/bin/printf "%.2x%.2x%.2x%.2x%.4x%.2x%.2x%.2x%.2x%.4x\n" $(/usr/bin/netstat -an -f inet | /usr/bin/grep FIN_WAIT_2 | /usr/bin/awk '{print $4,$5}' | /usr/bin/sed 's/\./ /g') > $TMPFILE1
}
function compareFinWait2 {
FIRST_TIME=1
cp $TMPFILE1 $TMPFILE2
getFinWait2
comm -12 $TMPFILE1 $TMPFILE2 | while read CONN
do
if [[ $CONN != "000000000000000000000000" ]]
then
if [ $FIRST_TIME -eq 1 ]
then
print >> $LOGFILE
date >> $LOGFILE
FIRST_TIME=0
fi
print "/usr/bin/ndd -set /dev/tcp tcp_discon_by_addr
\"$CONN\""
>> $LOGFILE
/usr/bin/ndd -set /dev/tcp tcp_discon_by_addr $CONN
fi
done
getFinWait2
}
#
# Main
#
touch $TMPFILE1
touch $TMPFILE2
compareFinWait2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2003 06:41 AM
06-17-2003 06:41 AM
Re: FIN_WAIT_2 Connections
I have ran
# ndd -get /dev/tcp tcp_fin_wait_2_timeout
and the output is 0
Does this mean I have no current setting or does it mean that it is actually 0.
If so is it worth me changing it to 3 minutes?
Also will this have an impact on anything else?
Thanks,
Colin.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2003 06:43 AM
06-17-2003 06:43 AM
Re: FIN_WAIT_2 Connections
A value of zero (0) signifies an infintite wait. Values of around 10-minutes (or more) are recommended.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2003 06:45 AM
06-17-2003 06:45 AM
Re: FIN_WAIT_2 Connections
$ ndd -h tcp_fin_wait_2_timeout
tcp_fin_wait_2_timeout:
Determines how long a TCP connection will be in FIN_WAIT_2.
Normally one end of a connection initiates the close of its end
of the connection (indicates that it has no more data to send) by
sending a FIN. When the remote TCP acknowledges the FIN, TCP
goes to the FIN_WAIT_2 state and will remain in that state until
the remote TCP sends a FIN.
If the FIN_WAIT_2 timer is used, TCP will close the connection
when it has remained in the FIN_WAIT_2 state for the length of
the timer value.
The FIN_WAIT_2 timer must be used with caution because when TCP
is in the FIN_WAIT_2 state the remote is still allowed to send
data. In addition, if the remote TCP would terminate normally
(it is not hung nor terminating abnormally) and the connection is
closed because of the FIN_WAIT_2 timer, the connection may be
closed prematurely. Data may be lost if the remote sends a
window update or FIN after the local TCP has closed the
connection. In this situation, the local TCP will send a RESET.
According to the TCP protocol specification, the remote TCP
should flush its receive queue when it receives the RESET. This
may cause data to be lost.
[0-2147483647 Milliseconds] Default: 0 (indefinite)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2003 06:51 AM
06-17-2003 06:51 AM
Re: FIN_WAIT_2 Connections
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2003 06:56 AM
06-17-2003 06:56 AM
Re: FIN_WAIT_2 Connections
Yes, reducing the 'tcp_fin_wait_2_timeout' value would mean that connections exceeding this timeout would procedure to closure.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2003 06:56 AM
06-17-2003 06:56 AM
Re: FIN_WAIT_2 Connections
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-18-2003 09:51 AM
06-18-2003 09:51 AM
Re: FIN_WAIT_2 Connections
Now, if those FIN_WAIT_2's are associated with open file descriptors (that is the app has only called shutdown() and not close(), then it could be an issue for the app. However, if the app has called close(), it is only a non-issue for the transport.
If the app calls close(), then the tcp_keepalive_detached_interval will come into play - after a default of two minutes, keepalive probes will be sent for up to tcp_ip_abort_interval milliseconds. If no response to the keepalive probe, then the connection is terminated.
If there are responses to the probes, it implies that the other side did not do the typical, kludgey abortive close, but is simply not remembering to call shutdown or close - IE an application bug on the other side.
It should be _really_ rare that the tcp_fine_wait_timeout kludge (imo) should be required - that is only required to workaround application bugs.
Also, while I'm on the soapbox, one should _NEVER_ need to use the tcp_discon stuff. That is a massive kludge that should have never left the lab. All it takes is nuking the wrong connection and knuth only knows what might happen. All it does is treat symptom, not root cause, and in treating symptom, it delays resolution of root cause...
ftp://ftp.cup.hp.com/dist/networking/briefs/annotated_ndd.txt