Locked TCP port in Solaris 10

Hi all

I haven't had much experience with Solaris 10 but we've started running into a problem where a process hangs, it is killed and leaves a zombie process. The sysadmins are saying this zombie process is locking a tcp port and not allowing the process to start up.

The process is a usually a weblogic java app.

This is happening across multiple servers but one that it is happening on is:

SunOS sedm3239 5.10 Generic_118833-17 sun4v sparc SUNW,Sun-Fire-T200

Is there any way to kill this process or free the port? The sysadmins are just rebooting the server, which seems a little extreme and I'm sure there is something else available.

Any information would be good.

Thanks

From netstat does the port show as in state CLOSE_WAIT ?

Secondly, what happens if you "preap" the zombie processes?

I think normally when apps are started they first check for existence of whether the same application is already running to avoid corrupting data.

If it isn't running they start the app and create temp files under /tmp or /var/tmp or under some app folder normally name is as ".something" so that later if somebody tried to run the same app twice they could not do so.

So If you suddenly killed a running app without a clean shutdown the temp file is probably still there I think you have to find the ".something" and remove it.

few ways to find,

truss: using truss together while starting the app at the same time will give long listing but use nohup truss <app>, the nohup.out ascii log can sometimes reveal why the app cannot be started.

ptree: unless the zombie is really a zombie you cannot see anything but sometimes you may still find the parent process, the parent process will give a clue abt the app, from the app you can find which folder it is running out from, then search those folders.

Um, zombies have exited (past tense). exit() will close any open files including sockets. But sometimes people use "zombie" to mean "unkillable process" or "annoying process" etc. Like reborg says, you need to determine the state of the port at the time of trouble. But rather than netstat, I prefer the freeware program lsof. Let's say that it is port 80. You would use:
lsof -i :80
to see that status of all sockets involving port 80. If the socket is in use, you will get the pid of the process. Also, have you tried waiting 15 minutes or so to see if it clears up on its own? (This rarely works, but it really does once in a while, so it's worth a try.)

mm .. what abt using fg command to try bringing a zombie process into the foreground. Then from there see whether it dies on it's own.

According to man pages.

fg will move a background job from the current environment
into the foreground. Using fg to place a job in the fore-
ground will remove its process ID from the list of those
"known in the current shell execution environment." The fg
command is available only on systems that support job con-
trol. If job_id is not specified, the current job is brought
into the foreground.

The bg/fg commands can only be used for processes (jobs actually) that have a controlling terminal. The java process in question here probably isn't associated with a terminal.