You may see an exception similar to this:
This is because Confluence's HTTP sessions may contain objects which cannot be serialized to disk. Tomcat tries to serialize existing sessions by default during shutdown.
You can add the following configuration parameter into Tomcat's server.xml file between the <Context> tags to disable this:
<Manager className="org.apache.catalina.session.PersistentManager" saveOnRestart="false"/>
Related topic
For more information regarding the saveOnRestart parameter, please refer to the Server Configuration Reference for the Manager Component