- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Reset / reclaim port
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
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
тАО04-29-2009 01:06 AM
тАО04-29-2009 01:06 AM
Reset / reclaim port
I have an application running on my server rp4440, run hp-ux 11.11 with port 5501. The application is become hang and cannot be shutdown and kill.
# netstat -an |grep 5501
tcp 0 0 10.2.245.13.63151 10.2.224.49.5501 FIN_WAIT_2
55013540 stream 0 0 0 5b5de9c0 0 0
550139c0 stream 0 0 0 54e14680 0 0
55013b40 stream 0 0 0 54e14600 0 0 /tmp/.AgentSockets/A
# lsof -i:5501
#
how to reset this port ? should i reboot my server ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-29-2009 01:52 AM
тАО04-29-2009 01:52 AM
Re: Reset / reclaim port
reboot is always a clean solution.
You also can try to change boot level to 'init 2' or 'init 1', then go back to 'init 3'.
HTH
Volkmar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-29-2009 01:57 AM
тАО04-29-2009 01:57 AM
Re: Reset / reclaim port
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-29-2009 03:01 AM
тАО04-29-2009 03:01 AM
Re: Reset / reclaim port
With default settings, the solution should be simple: just wait 2 minutes. The system should automatically remove this socket in that time.
This behaviour is controlled by the ndd parameter "tcp_keepalive_detached_interval". To check it, run:
ndd -get /dev/tcp tcp_keepalive_detached_interval
The default value for this parameter is 120000, which means 120 seconds (=2 minutes).
If the socket does not go away and/or your tcp_keepalive_detached_interval is currently set to an unreasonably long time, you might use the attached Perl script. It will use an *unsupported* ndd parameter "tcp_discon_by_addr" to force disconnect *all* connections that are currently in state FIN_WAIT_2. It was originally created for HP-UX 11.00, but should work on 11.11 too.
MK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-29-2009 03:17 AM
тАО04-29-2009 03:17 AM
Re: Reset / reclaim port
the port state of 5501 still FIN_WAIT_2. it's happened for about 1 month ago.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-29-2009 03:42 AM
тАО04-29-2009 03:42 AM
Re: Reset / reclaim port
To use tcp_discon_by_addr directly, you would have to convert the local IP address, local port number, remote IP address and remote port number to hexadecimal and concatenate all of them together in this order. (always 2 hex digits for each part of an IP address, and always 4 hex digits for the port number; add leading zeroes if necessary)
For your specific case, the command line would be:
ndd -set /dev/tcp tcp_discon_by_addr 0a02f50df6af0a02e031157d
The conversion:
10.2.245.13 = 0a 02 f5 0d
63151 = f6af
10.2.224.49 = 0a 02 e0 31
5501 = 157d
(I was hoping I would not have to do this conversion by hand by providing the script. Oh well, slow day... :-)
MK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-29-2009 11:25 PM
тАО04-29-2009 11:25 PM
Re: Reset / reclaim port
# netstat -an |grep 5501
tcp 0 0 10.2.245.13.1556 10.2.245.13.55010 ESTABLISHED
tcp 0 0 10.2.245.13.55010 10.2.245.13.1556 ESTABLISHED
550139c0 stream 0 0 0 54e14680 0 0
55013b40 stream 0 0 0 54e14600 0 0 /tmp/.AgentSockets/A
hmm...i'm confuse, how to use port 5501 again ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-30-2009 12:42 AM
тАО04-30-2009 12:42 AM
Re: Reset / reclaim port
not all ports are used every time.
The port will be used again after restart of your application.
Volkmar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-30-2009 12:54 AM
тАО04-30-2009 12:54 AM
Re: Reset / reclaim port
the applicaiton cannot be killed or shutdown and port 5501 is used for it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-30-2009 01:18 AM
тАО04-30-2009 01:18 AM
Re: Reset / reclaim port
yes, but you says it's hanging ....
so it can't (and don't need to) use the port now.
It seems like you have to investigate how to stop the application.
Have you tried 'kill -9
Any error message?
What kind of application?
Have you tried to kill the parent process?
Volkmar