- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: CLOSE-WAIT
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
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
03-28-2004 07:30 PM
03-28-2004 07:30 PM
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-28-2004 07:35 PM
03-28-2004 07:35 PM
Re: CLOSE-WAIT
Read manpage of ndd. It should work but I never tested it because it seems a little tricky.
ndd -get /dev/tcp tcp_status |grep -e state -e TCP_CLOSE_WAIT
After that you can disconnect it like this:
ndd -set /dev/tcp tcp_discon 0x????????
HTH,
Peter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-28-2004 07:40 PM
03-28-2004 07:40 PM
Re: CLOSE-WAIT
# ndd -get /dev/tcp tcp_status | grep -e state -e CLOSE_WAIT
and clear it by
# ndd -set /dev/tcp tcp_discon 0x
HTH.
Best regards,
Ettore
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-28-2004 07:41 PM
03-28-2004 07:41 PM
Re: CLOSE-WAIT
I am writing when you posted the message. Please no points here for me...
Ettore
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-28-2004 07:42 PM
03-28-2004 07:42 PM
SolutionThe unorthodox method of using tcp_discon or tcp_discon_by_addr allows terminating of connections in the connections table without the need for a reboot. However, my advice is to use it only as a last resort.
To use the ndd -set /dev/tcp tcp_discon, you need the pointer to the TCP instance data. You can retrieve this via the ndd command tcp_status.
So, the scenario to find the TCP instance data and then use tcp_discon to remove
the instance is as follows:
# ndd -get /dev/tcp tcp_status
TCP dest snxt suna swnd cwnd rnxt rack rwnd rto mss [lport,fport] state
0183b8b4 015.043.233.086 533cb8ce 533cb8ce 00008000 00003000 533bc583 533bc583
00000000 02812 04096 [c00a,cea9] TCP_CLOSE_WAIT
So, if you wanted to remove this connection:
# ndd -set /dev/tcp tcp_discon 0x0183b8b4
If you want to use the tcp_discon_by_addr, you use a 24 byte string that contains the hex representation of the quadruple.
For example, if the connection that I want to delete is:
Local IP: 192.1.2.3 (0xc0010203)
Local Port: 1024 (0x0400)
Remote IP : 192.4.5.6 (0xc0040506)
Remote Port: 2049 (0x0801)
The "hex" string you pass to tcp_discon_by_addr is:
# ndd -set /dev/tcp tcp_discon_by_addr "c00102030400c00405060801"
NOTE: the preceding 0x that typically indicates a Hex number is NOT part of the
string passed.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-28-2004 07:45 PM
03-28-2004 07:45 PM
Re: CLOSE-WAIT
You still deserve points because you toulk the time to inverstigate this problem.
Regards,
Peter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-30-2004 05:11 AM
03-30-2004 05:11 AM
Re: CLOSE-WAIT
CLOSE_WAIT is the state a TCP connection enters when the remote TCP has sent a FIN. This is communicated to the local application (via a read call returning zero) and it is then up to the application to do something. Either the connection is a valid send-only connection (receipt of a FIN only means that the remote will not send any more data, it says nothing about willingness to receive data), or the local application should be calling close().
The application is doubly broken if this connection being in CLOSE_WAIT is preventing the application from restarting - in this case the bug is the application not setting SO_REUSEADDR before attempting to bind() to its well-known port number.
Sooo...
Your customer needs to fix their application.