service confluence stop needs to be killed after installation

Schups November 29, 2018

Yesterday I installed Confluence clean on a cleanly installed CentOS. No data imported yet, no users accessing it yet.

 

The problem is this: when I stop confluence server via the usual "service confluence stop" it always get "Tomcat did not stop in time" "The Tomcat process has been killed" together with lots of exceptions in the log file.

 

I do not think it is normal after a clean installation. I do not feel confident about putting this in production for my users.

 

Via Browser to the users Confluence seems to be working all right despite this situation.

 

Any thoughts / suggestions on how to proceed?

 

Version: 6.12.2

Last message log before the forced process kill:

"30-Nov-2018 06:44:22.364 INFO [localhost-startStop-4] org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler.shutdown Shutting down ExecutorService 'defaultSockJsTaskScheduler'"

2 answers

0 votes
Schups November 30, 2018

Thank you, will try that.

Is it dangerous to have it killed? E.g. if not all is written to the DB at the kill time...

roman
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 2, 2018

I don’t think there is much risk in killing the process if it hasn’t stopped in time. 

If you would like to feel safe in this regard, set the wait time to 60 seconds. If the process won’t stop within this time frame, you can kill it without any risk.

Roman.

0 votes
roman
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 30, 2018

Hi @Schups,

By default a Tomcat server gives an application 5 seconds to terminate before the “Tomcat did not stop in time. PID file was not removed.” messages is logged.

I have just checked my local Confluence 6.12.1 installation, and in the stop-confluence.sh file I have the parameter set to 20 seconds.

5 or even 20 seconds might not be a lot of time for Confluence to stop (even without any data), especially when the application needs to close a connection pool or perform some cleanup tasks.

The fix is documented in the catalina command:

Usage: catalina.sh ( commands ... )
stop Stop Catalina, waiting up to 5 seconds for the process to end
stop n Stop Catalina, waiting up to n seconds for the process to end
stop -force Stop Catalina, wait up to 5 seconds and then use kill -KILL if still running
stop n -force Stop Catalina, wait up to n seconds and then use kill -KILL if

Changing a timeout parameter to the shutdown command will give Confluence the time it needs to perform a clean shutdown. You can change the timeout value (the number after "shutdown.sh" in stop-confluence.sh:

exec $PRGDIR/shutdown.sh 20 -force $@

Hope this helps.

Roman.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events