Using ps -ef | grep tomcat
I found a tomcat server that is running. I tried kill -9 {id}
but it returns \"No such process.\" What am I doing wrong?
There is no need to know Tomcat's pid (process ID) to kill it. You can use the following command to kill Tomcat:
pkill -9 -f tomcat
This worked for me:
Step 1 : echo ps aux | grep org.apache.catalina.startup.Bootstrap | grep -v grep | awk '{ print $2 }'
This above command return "process_id"
Step 2: kill -9 process_id
// This process_id same as Step 1: output
as @Aurand to said, tomcat is not running. you can use the
ps -ef |grep java | grep tomcat
command to ignore the ps
programs.
worked for me in the shell scripte files.
ps -Af | grep "tomcat" | grep -v grep | awk '{print$2}' | xargs kill -9
this works very well (find tomcat processes and kill them forcibly)
ps -ef | grep tomcat | awk '{print $2}' | xargs kill -9
just type the below command in terminal
ps -ef |grep 'catalina'
copy the value of process id then type the following command and paste process id
kill -9 processid