1

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
Michael Hampton
  • 244,070
  • 43
  • 506
  • 972
Stefan
  • 11
  • 1
  • 2
  • 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 06: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 08: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 08:05
  • @Ron I'm not AIX expert, but rmsock could help to free the port – Kamil Šrot Nov 13 '12 at 09:59
  • rmsock is exactly what we have tried if you look at my first posting ... – Stefan Nov 14 '12 at 11:54

0 Answers0