Locked TCP port in Solaris 10


 
Thread Tools Search this Thread
Operating Systems Solaris Locked TCP port in Solaris 10
# 1  
Old 12-14-2006
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
# 2  
Old 12-14-2006
From netstat does the port show as in state CLOSE_WAIT ?

Secondly, what happens if you "preap" the zombie processes?
# 3  
Old 12-14-2006
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.
# 4  
Old 12-15-2006
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.)
# 5  
Old 12-15-2006
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.
# 6  
Old 12-15-2006
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.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Too much TCP retransmitted and TCP duplicate on server Oracle Solaris 10

I have problem with oracle solaris 10 running on oracle sparc T4-2 server. Os information: 5.10 Generic_150400-03 sun4v sparc sun4v Output from tcpstat.d script TCP bytes: out outRetrans in inDup inUnorder 6833763 7300 98884 0... (2 Replies)
Discussion started by: insatiable1610
2 Replies

2. IP Networking

Tcp ip port open but no such process (merged: Release A Port)

i want to kill a tcp connection by killing its pid with netstat -an i got the tcp ip connection on port 5914 but when i type ps -a or ps-e there is not such process running on port 5914 is it possible that because i do not log on with proper user account i can not see that process running? (30 Replies)
Discussion started by: alinamadchian
30 Replies

3. IP Networking

TCP port numbers reused

Hello all, I am loosing the diameter connection between two servers and when the connection is trying to comes up again i see the following message in the tracer. and after 1 second the connection resets. As far i know the connection stay in state TIME_WAIT for a while(60 seconds in my... (1 Reply)
Discussion started by: @dagio
1 Replies

4. Programming

Getting TCP Port status through C API

Does anyone know if there is a C API call to get the status of a TCP port? As opposed to running netstat and parsing the results. At the moment I have to attempt to bind() and pick up on the address in use error which isn't very elegant Thanks ---------- Post updated at 10:42 AM ----------... (0 Replies)
Discussion started by: janra
0 Replies

5. Shell Programming and Scripting

TCP port assignment

I have multiple processes running the same program on my linux machine. For each process I want to be able to use a unique (available) TCP port. I have thought of using netstat to check which ports are available for use however, the time-window between checking and selecting might expose some race... (1 Reply)
Discussion started by: timmylita
1 Replies

6. Programming

Port is locked

Hi, I am working with sun solaris sparc 5.9 and I want to use the serial port in my application..when I am trying to use it.it is throwing the message-- So how can I check the serial port is locked or not and how can I unlock the port?? Thanks in advance. (1 Reply)
Discussion started by: smartgupta
1 Replies

7. UNIX for Dummies Questions & Answers

close tcp port

Hello, I have a service running (ODBC) and every now and then it will hang and I will have to stop and restart the service. The problem is when I stop the service, it indeed stops the service, but netstat reports a tcp port still open with the fin_wait_2 status. Then I must close the client... (1 Reply)
Discussion started by: raidzero
1 Replies

8. SCO

tcp port always closed in inetd

sco unix 5.0.x, several weeks ago, I add a telnet-like service in inetd.conf, it runs well for 100 network terminals. But nowdays, the terminals can connect to server successfully after booting machine, but several hours later, can not connect. "netstat -p tcp -a" can NOT find the port in... (1 Reply)
Discussion started by: shark_gao
1 Replies

9. UNIX for Dummies Questions & Answers

Redirecting output to TCP port

Hi All, I suspect this is simple but I cannot find any info on it. I have a logfile on a solaris box (EMS) that I want to tail -f but I want the output of this to be redirected to a TCP port. I have a second solaris box (PEM) running patrol enterprise manager that I am using as an alarm... (1 Reply)
Discussion started by: mscomms
1 Replies

10. IP Networking

tcp problem with port

I am trying to connect via DBACCESS and Informix server to a server on a different computer. When I execute the connect command from dbaccess I get the following message, Exec format error cannot bind a name to the port. As far as I know the port is not being used by another client. How... (1 Reply)
Discussion started by: lopez
1 Replies
Login or Register to Ask a Question