Tomcat shuts down automatically every day at the same time

Keywords: Tomcat - Amazon Web Services - Technical issue - Other
We are running your apache-tomcat-sql (tomcat v8) configuration bundle on AWS. Everything works just fine, thanks for a great product. The one issue we are having for some time is that tomcat shuts down automatically at 5 AM EST every day. It was not a big deal before as our heartbeat script would just restart tomcat, but as our application matures it is become more of an issue as it is taking longer to restart tomcat due to some additional application startup logic we have introduced. Can you please help us to resolve this behavior? Who sends the shutdown request to port 8005? Is it expected? How can we prevent it?

This is what we see in the logs (catalina.out):
02-Feb-2018 05:00:06.796 INFO [main] org.apache.catalina.core.StandardServer.await A valid shutdown command was received via the shutdown port. Stopping the Server instance.
02-Feb-2018 05:00:06.797 INFO [main] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler [“http-apr-8080”]
02-Feb-2018 05:00:06.848 INFO [main] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler [“ajp-apr-8009”]

Hi @kurholio,

We open the 22, 80 and 443 ports by default in the Bitnami Tomcat stack deployments, did you open any other port apart from those?

As you know, the 8005 port is the shutdown port for that server so you can either block the incoming requests to that port (we don’t have any utility or script that performs that request) or disable that behavior by modifying the Tomcat’s configuration. You can modify the server.xml file of Tomcat and set this configuration.

Happy to help!

Was my answer helpful? Click on :heart:

Thanks Jota,

The only other ports that are opened are mysql default 3306 and tomcat port 8080… these are only opened to one ip so we can manage db remotely and trouble shoot issues. I was also thinking to disabling 8005 but not sure how this will affect our startup scripts and automatic restarts. Is there any ways to find out which process sends that shutdown request to 8005?

Thanks again,

Hi @kurholio,

You have different alternatives to monitor the traffic in one port in your instance.

Apart from that, you have different ideas to secure that port in this page

This way, you won’t disable that port but will change the way to shutdown the server.

You can simply disable the port, restart the server and stop it after some minutes. If the port is not used by the startup scripts, the server should be started properly.


This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.