core icon indicating copy to clipboard operation
core copied to clipboard

ServerHeartbeatJob does not stop at server shutdown and generates error messages on log

Open maurizo opened this issue 11 years ago • 1 comments

To reproduce the issue run a new distribution of dotCMS 3.x on windows and add a new html page, then shutdown the server. The log messages are thrown at the end of the shutdown process. This is reported on: https://my.dotcms.com/ticket/rbc-4

The ClusterServerActionThread is started by the ServerHeartbeatJob, during shutdown this job is not stopped and on windows tomcat does not close properly because of it.

The ClusterServerActionThread keeps trying to access the database but the pool is already closed. The problem is not logged on unix-like systems because during the shutdown this script is executed:

``Shell exec "$TOMCAT_HOME"/bin/"$EXECUTABLE" $CMD -force``

The -force parameter (plus a wait of 8 seconds) shutdown the server before the errors get logged. If the argument is removed (-force) the message is shown after a few seconds on the log.

On windows is done like this:

``Batchfile all "%EXECUTABLE%" stop %CMD_LINE_ARGS%``

There is no -force valid argument on tomcat on windows, so the server never stops sending the errors.

maurizo avatar Mar 10 '15 20:03 maurizo

This issue has been automatically marked as stale because it has not had activity within the past 90 days. It will be closed in 30 days no further activity occurs. Thank you.

stale[bot] avatar Sep 29 '19 22:09 stale[bot]