Back
When I used ./shutdown.sh to stop the tomcat, it didn’t stop the server properly . Can anyone tell me how to get the list of processes running on a specific port (8080) to kill it?
To get the list of processes which runs on a specific port number with process ID. Use the command below:
sudo netstat -plten |grep java
The output will be:
tcp6 0 0 :::8080 :::* LISTEN 1000 30070621 16085/java
tcp6 0 0 :::8080 :::* LISTEN
1000 30070621 16085/java
Here the process ID is : 16085(the number before \java)
To kill the process
kill -9 16085 (-9 will kill the process forcefully)
Interested in Linux? Check out this Linux Certification by Intellipaat.
31k questions
32.8k answers
501 comments
693 users