Categories
Mastering Development System & Network

What killed my tomcat service and how can I restart it automatically?

tomcat 9 with ubuntu 18.04. tomcat service status:

● tomcat.service - Tomcat 9 servlet container
   Loaded: loaded (/etc/systemd/system/tomcat.service; enabled; vendor preset: enabled)
   Active: failed (Result: signal) since Thu 2020-03-26 03:00:31 UTC; 3h 33min ago
  Process: 8815 ExecStop=/opt/tomcat/latest/bin/shutdown.sh (code=exited, status=0/SUCCESS)
  Process: 8858 ExecStart=/opt/tomcat/latest/bin/startup.sh (code=exited, status=0/SUCCESS)
 Main PID: 8865 (code=killed, signal=KILL)

catalina.out says nothing. syslog says

Mar 26 03:00:31 user systemd[1]: tomcat.service: Main process exited, code=killed, status=9/KILL
Mar 26 03:00:31 user systemd[1]: tomcat.service: Failed with result 'signal'.
Mar 26 03:17:08 user systemd[1]: Reloading The Apache HTTP Server.
Mar 26 03:17:08 user systemd[1]: Reloaded The Apache HTTP Server.

The service was dead but manually restarting the service succeeded.

What can I check in order to know what killed tomcat?

What can I do to restart tomcat in case something like that happens in the future?

Thanks

Leave a Reply

Your email address will not be published. Required fields are marked *