Process killing trouble

Posted by Aditya Singh on Server Fault See other posts from Server Fault or by Aditya Singh
Published on 2011-11-25T00:46:18Z Indexed on 2011/11/25 1:59 UTC
Read the original article Hit count: 536

Filed under:
|
|

I am trying to program a server software which involves a lot of testing on java / scala platform. Whenever i compile and execute the code. It starts listening on port 80. Sometimes i need to terminate it by Ctrl+C when it hangs. In that case, ubuntu is not freeing the port. So in order to run the process, i have to restart the machine.

I see this at ps aux

root      1924  0.0  0.0   5796  1660 pts/0    T    05:44   0:00 sudo scala -
root      1925  0.2  1.5 491448 40796 pts/0    Tl   05:44   0:03 java -Xmx256M -Xms16M

So process 1924 and 1925. I did sudo kill on both these. But then they keep on persisting even after a long time.

sudo nmap -T Aggressive -A -v 127.0.0.1 -p 1-65000

Scanning localhost (127.0.0.1) [65000 ports]

Discovered open port 80/tcp on 127.0.0.1

It means its still there !

sudo netstat --tcp --udp --listening --program

tcp6       0      0 [::]:www                [::]:*                  LISTEN      1925/java
tcp6       0      0 ip6-localhost:ipp       [::]:*                  LISTEN      1185/cupsd

This means its 1925 - java

How to kill it.

© Server Fault or respective owner

Related posts about ubuntu

Related posts about process