Today i came across a problem in solaris. The problem was that while starting my application server, it was throwing an error "Address already in use".
My app server is a java process and there are many other java process which are running on my zone. But the issue is, how may i know that which java process is using that particular port?
I followed following steps:
1. List all the java process running on my zone ( ps -eaf |grep vagrawal| grep java )
2. Go through each java process and check if it using that particular port ( pfiles $pid|grep 1182
(here $pid is the process id of the java process and
Above method works fine but it is bit a long process, as i have to run step 2 for all java processes, so i ran a folowing command on my console:
Above command/script will list out all the process ID and will tell if any process is using port 1188
Now i have process ID of the process which is occupying my port, and i can kill that by kill -9 pid
Wednesday, September 5, 2007
Soalris: Kill a process which is using a particular port number
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment