How to kill tomcat server process using Mac Terminal Command

Sometimes you may not be able to start the Apache Tomcat App Server if it has not stopped properly. In such cases, one has to kill its process. If you are on Mac OS X system or any other Unix server then to do this,

  1. Open Terminal,
  2. Type command :ps -ef |grep -i 'catalina'
  3. When you run this command you should get an output like,
  4. localhost:~ code2care$ ps -ef |grep -i 'catalina' 501 1144 623 0 6:59PM ?? 0:22.98 
    /Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/bin/java -
    Dcatalina.base=/Users/code2care/Setups/apache-tomcat-7.0.61 -Dcatalina.home=/Users/code2care/Setups/apache-
    tomcat-7.0.61 -Dwtp.deploy=/Users/code2care/Setups/apache-tomcat-7.0.61/wtpwebapps -
    Djava.endorsed.dirs=/Users/code2care/Setups/apache-tomcat-7.0.61/endorsed -Dfile.encoding=MacRoman -classpath 
    org.apache.catalina.startup.Bootstrap start
    501 1262 1103 0 8:35PM ttys000 0:00.00 grep -i catalina
    localhost:~ code2care$

    Here 501 is the process id for the tomcat server in my case.

  5. Now run the kill command to stop this process: kill <process-id> (ex: kill 501)
  6. Now try to start the server, it should load without any error!

Related Issues :

Server Tomcat v6.0 Server at localhost failed to start.
Server Tomcat v7.0 Server at localhost failed to start.
Server Tomcat v8.0 Server at localhost failed to start.
Server Tomcat v9.0 Server at localhost failed to start.

Try Out Code2care Dev Tools:


Code2care is an initiative to publish and share varied knowledge in programming and technical areas gathered during day-to-day learnings and development activities.

Students and software developers can leverage this portal to find solutions to their various queries without re-inventing the wheel by referring to our easy to understand posts. Technical posts might include learnings, tutorials, trouble-shooting steps, video tutorials, code snippets, how-to, blogs, articles, etc.

🎉 We are celebrating the 10th years of Code2care! Thank you for all your support!

We strongly support Gender Equality & Diversity.