Linux: How to kill programs that use port 1935? Linux: How to kill programs that use port 1935? linux linux

Linux: How to kill programs that use port 1935?


If you're sure old instance of your server holds the port, just run jps, find your server pid in the list and run kill -9 my_pid

For generic non-java process, lsof -i :1935 usually works for me. Again, take pid and kill this process.


The problem is the -9 in the kill.

If you kill a process using SIGKILL (-9), the process is terminated immediately. So the port remains allocated until (some minute later) the O.S. notices the problem. Try SIGHUP and SIGINT (in the order) before SIGKILL.

In any case, use netstat -a -t -p to verify which process has acquired the port.


Immediately process termination and port release:

 fuser -k 1935/tcp