Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

While running some kind of automated tests on our AIX 6.1 machine we are facing the problem that a port seems to be in use although the corresponding process has already terminated.

E.g. if we kill a hanging application using port 9999 we’ll get the following:

user@aix:~/EP$ netstat -Aan | grep 9999
…
f1000700149ec3b0 tcp        0      0  *.9999             *.*                LISTEN
…
user@aix:~/EP$ rmsock f1000700149ec3b0 tcpcb
Wait for exiting processes to be cleaned up before removing the socket

Currently, we only can recover from this state by rebooting the machine.

We already tried to set SO_REUSEADDR but we still get this strange kind of error.

The error is not application specific - it happens with different applications.

user@aix:/etc$ oslevel -s
6100-04-01-0944
share|improve this question
    
How are you killing the processes? Are you sure they have actually died, and aren't zombies (or just taking a while to exit)? –  Michael Hampton Nov 12 '12 at 6:09
    
We are killing the process with kill -9. When listing the processes using ps the process is not available anymore. –  Stefan Nov 12 '12 at 8:43
    
Terminating process by SIGKILL (9) leaves ports open / they will be freed first after timeout... the time depends on your system configuration (usually several hours). Consider using a proper way to terminate your app. –  Kamil Šrot Nov 12 '12 at 10:31
    
Hi, i am a colleague of Stefan. The processes are killed with -9 after a normal shutdown of the application has been tried and did not work. This is a kind of fallback to make sure the processes are gone after testruns. This is working on all other platforms we are using (linux, solaris, windows, hp-ux, z-linux). @Kamil: How can this timeout be configured on aix, or is there a way to explicitely close those ports? –  Ron Nov 13 '12 at 8:05
    
@Ron I'm not AIX expert, but rmsock could help to free the port –  Kamil Šrot Nov 13 '12 at 9:59

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.