I tried to close the tomcat using ./shutdown.sh from tomcat /bin directory. But found that the server was not closed properly. And thus I was unable to restartMy tomcat is running on port 8080.
./shutdown.sh
/bin
8080
I want to kill the tomcat process running on 8080. I first want to have the list of processes running on a specific port (8080) in order to select which process to kill.
This fuser 8080/tcp will print you PID of process bound on that port.
fuser 8080/tcp
And this fuser -k 8080/tcp will kill that process.
fuser -k 8080/tcp
Works on Linux only. More universal is use of lsof -i4 (or 6 for IPv6).
lsof -i4
2.1m questions
2.1m answers
60 comments
57.0k users