How do I kill this tomcat process in Terminal?

后端 未结 14 1551
渐次进展
渐次进展 2021-01-30 01:23

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?

相关标签:
14条回答
  • 2021-01-30 02:16

    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
    
    0 讨论(0)
  • 2021-01-30 02:16

    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

    0 讨论(0)
  • 2021-01-30 02:16

    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.

    0 讨论(0)
  • 2021-01-30 02:21
    ps -Af | grep "tomcat" | grep -v grep | awk '{print$2}' | xargs kill -9
    
    0 讨论(0)
  • 2021-01-30 02:21

    this works very well (find tomcat processes and kill them forcibly)

    ps -ef | grep tomcat | awk '{print $2}' | xargs kill -9
    
    0 讨论(0)
  • 2021-01-30 02:23

    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
    
    0 讨论(0)
提交回复
热议问题