![]() |
|
|
google unix.com
|
|||||||
| Forums | Casino | Register | Forum Rules | Links | Albums | FAQ | Members List | Search | Today's Posts | Mark Forums Read |
| HP-UX HP-UX (Hewlett Packard UniX) is Hewlett-Packard's proprietary implementation of the Unix operating system, based on System V. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| rcp gets hung for long time | panchpan | AIX | 0 | 01-09-2008 09:02 PM |
| Server hung | biznatch | HP-UX | 6 | 01-20-2006 04:49 PM |
| SUN is hung/dead | ireeneek | SUN Solaris | 11 | 12-12-2003 06:05 PM |
| SCSI bus is hung | saucierm | UNIX for Dummies Questions & Answers | 2 | 10-23-2003 11:11 PM |
| system hung | talib alsaadi | IP Networking | 2 | 09-04-2002 11:40 AM |
![]() |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
| Sponsored Links |
|
||||
|
The usual reason for asking this question is that you want to restart a server but can't because you get a message "can't bind to port". There are adb scripts to close a FIN_WAIT_2 socket, I don't understand why you're having trouble with it. HP also has a program called ndd which can close a connection. But you shouldn't have to do this. Instead you address the real problem which is that the server has a bug that should be fixed.
There are two ways to ignore FIN_WAIT_2 sockets under unix. First, a program like inetd can do the bind at boot-up time and pass off new connections to the server as they arrive. Second, the server can simply set the SO_REUSEADDR option to indicate that it would prefer to ignore them. You must have a server that does not want to run under inetd and it doesn't set SO_REUSEADDR. Ask whoever wrote the server to fix that. It takes one line of code to set SO_REUSEADDR and then you will have no more problem. |
|
||||
|
Thanks for the insight. I will see if I can get the program changed, which I am sure will take some time. In the mean time I will keep working the the adb script and check out ndd. If anyone has tips on adb troubleshooting, let me know.
|
|
||||
|
Wha't up Doeboy, Long time no see
I think you are right. I thought there might be tuning parm to set the TTL on the connection, but all settings I could see are global so this would not help me. I think adb is the only way out. Guess I will keep searching for a working script and keep trying to tweak the one I have (which was created on HPUX 8 by the way, I have tried to update it for 11 but must be missing something in the adb command). |
|
||||
|
Remember that we are talking HP-UX here. HP's man page for ndd mentions "ndd -h unsupported". If you run:
ndd -h unsupported | grep disco you will see: tcp_discon - Terminate a TCP connection tcp_discon_by_addr - Terminate a TCP connection I have never had a TCP connection that I want to terminate, so I have never tried them. But I know several people who claim that they do work. Why are you saying that ndd can't do this? Did you guys try these and find that they don't work? |
|
|||
|
Hung Port
Hi,
I used the below script to clear the FIN_WAIT socket connections. ( HP unix ) for i in $(ndd -get /dev/tcp tcp_status | grep xxx.xxx.xxx.xxx | grep TCP_FIN_WAIT | awk '{print $1}' ) do ndd -set /dev/tcp tcp_discon 0x${i} if [ $? -eq 0 ] then echo "Cleared $i" else echo "Unable to clear $i" fi done xxx.xxx.xxx.xxx = the destination server IP. |
|||
| Google The UNIX and Linux Forums |
![]() |
| Bookmarks |
| Tags |
| None |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|