- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Sockets stuck at FIN_WAIT_1/2
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
Discussions
Discussions
Discussions
Forums
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
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
тАО08-04-2004 01:55 AM
тАО08-04-2004 01:55 AM
I have a system running HP-UX 10.20 that is connected to a PC running Red Hat Linux. Our system sets up a socket connection to a process running on the Linux box. When the network connection is broken or the Linux system is rebooted, the socket on the HP-UX side goes to FIN_WAIT_1 and then FIN_WAIT_2 and doesn't always close. Sometimes we have a bunch of sockets at FIN_WAIT.
I need to get a better understanding of how HP-UX handles sockets and whether there are any kernel parameters that control the behavior.
Thanks for any help.
Mike
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-04-2004 02:21 AM
тАО08-04-2004 02:21 AM
Solutionsee man nettune to
modify certain kernel parameters that control networking defaults
such as keepalive timers.
Nettune is found in /usr/contrib/bin.
type: "nettune -h" for help
type: "nettune -l" to display current values
To set the keepalive start time to 60 seconds type:
"nettune -s tcp_keepstart 60"
To set the keepalive frequency to sending every 10 second type:
"nettune -s tcp_keepfreq 10"
To set the keepalive stop time to 3 minutes type:
"nettune -s tcp_keepstop 180"
For help on these three variables type:
"nettune -h tcp_keepstart"
"nettune -h tcp_keepfreq"
"nettune -h tcp_keepstop"
Steve Steel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-04-2004 03:07 AM
тАО08-04-2004 03:07 AM
Re: Sockets stuck at FIN_WAIT_1/2
http://support.microsoft.com/default.aspx?scid=kb;en-us;q137984 (it is from ms :) )
or see linux man netstat.8 man page
After data transactions,
After connection setup from HP-UX client to Linux server data's transaction are made. After it's completion,
Hp-ux client sends a active close(FIN) to server as (FIN_WAIT_1) and server goes to passive close (CLOSE_WAIT) to make active close. It sends ACK to FIN_WAIT_1. After getting this acknowledgement client went to FIN_WAIT_2 stage to get the postive close from server. Until that client is at TIMED_WAIT stage. After successful active close on server, server sends LAST_ACK (FIN) to the client. After recieving this client sends CLOSED message (ACK) to server
To avoid to get FIN_WAIT_2 state of sockets use, setsockopt() with SO_KEEPALIVE option to keep tcp connection alive.
To make finite timeout to get LAST_ACK from server then tune tcp_fin_wait_2_timeout parameter with ndd
by default ndd -h tcp_fin_wait_2_timeout will be infinite. Change to your requirement.
Regards
MuthuYou can know the socket connections report on netstat over at,
http://support.microsoft.com/default.aspx?scid=kb;en-us;q137984 (it is from ms :) )
or see linux man netstat.8 man page
After data transactions,
After connection setup from HP-UX client to Linux server data's transaction are made. After it's completion,
Hp-ux client sends a active close(FIN) to server as (FIN_WAIT_1) and server goes to passive close (CLOSE_WAIT) to make active close. It sends ACK to FIN_WAIT_1. After getting this acknowledgement client went to FIN_WAIT_2 stage to get the postive close from server. Until that client is at TIMED_WAIT stage. After successful active close on server, server sends LAST_ACK (FIN) to the client. After recieving this client sends CLOSED message (ACK) to server
To avoid to get FIN_WAIT_2 state of sockets use, setsockopt() with SO_KEEPALIVE option to keep tcp connection alive.
To make finite timeout to get LAST_ACK from server then tune tcp_fin_wait_2_timeout parameter with ndd
by default ndd -h tcp_fin_wait_2_timeout will be infinite. Change to your requirement.
Regards
Muthu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-04-2004 03:16 AM
тАО08-04-2004 03:16 AM
Re: Sockets stuck at FIN_WAIT_1/2
Thanks you both for the information. I have quite a lot to work with now. I'm going to defer assigning points til I go through the info you provided, but you both get somewhere from 7-10.
Mike D'.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-04-2004 04:42 AM
тАО08-04-2004 04:42 AM
Re: Sockets stuck at FIN_WAIT_1/2
My friend and colleague Pat Kilfoyle recently put together a presentation on Network Troubleshooting, and part of the presentation was to document the various TCP connection states and how connections transition from one state to another state.
I've stripped out the 4 slides that detailed the connection states and how/why they transition between them into the attached .PDF file.
Hope this helps,
Dave
I work at HPE
HPE Support Center offers support for your HPE services and products when and how you need it. Get started with HPE Support Center today.
[Any personal opinions expressed are mine, and not official statements on behalf of Hewlett Packard Enterprise]

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-04-2004 11:59 PM
тАО08-04-2004 11:59 PM
Re: Sockets stuck at FIN_WAIT_1/2
Mike, we once had this problem on HPUX 10.20 , to close these FIN_WAIT_2 we added patch PHNE_19936 and in /sbin/init.d/net added the line
/usr/contrib/bin/nettune -s tcp_fin_wait_timer 675
This will clear the statuses (normally) without reboot
Thanks
Paul
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-05-2004 08:47 AM
тАО08-05-2004 08:47 AM
Re: Sockets stuck at FIN_WAIT_1/2
Dave, you must be running on an 800 series. We run on a HP744. The latest equivalent 700 series patch is PHNE_22506.
Muthu, I couldn't find the ndd command (must be for 11.x). I'm trying the nettune command as Steve and Dave suggested.
Thank you all again.