Use the command:
ps -aux | grep tomcat
It was found that there is no Tomcat process on port 8080.
Use the command: netstat –apn
View all processes and port usage. Find the list of processes below, where the last column is the PID/Program name
It is found that port 8080 is occupied by the Java process with PID 9658.
Further use the command: ps -aux | grep java, or directly: ps -aux | grep pid to view
You can clearly know which program is occupied by port 8080! Then judge whether to use the KILL command to kill!
Use netstat -anp | grep portno directly
: netstat -apn | grep 8080