Difference between calling tomcat shutdown script and killing process

It depends on what kill signal you are using:

  • If you use TERM (the numeric equivalent is kill -15), theoretically you are letting the java process signal its children and exit in a correct way.

  • If you use KILL (kill -9), you don't, and you left all sorts of temporary files, sockets, etc... behind.

That said, tomcat has its own mechanism to shutdown properly, namely an RMI call which you should be using, either directly or by using your operating system's interface: service, start, systemctl or any other.

If you can't do that for whatever reason, you could use some help from a wrapper like tanukiwrapper or supervisord, which also has a web frontend.


There is no difference in behaviour if you use Tomcat's shutdown script or use kill -15. The end result is exactly the same - a clean shutdown. The only difference is a slight difference in the code path that starts the shutdown process.