If LOGGING_MANAGER is set (in setenv.sh) startup processing works correctly, but during shutdown (catalina.sh stop) a number of errors are logged regarding logging plugins failing to be created. main ERROR Could not create plugin of type class org.apache.logging.log4j.core.appender.FileAppender for element File: java.lang.ClassCastException: org.apache.logging.log4j.core.appender.FileManager$FactoryData cannot be cast to org.apache.logging.log4j.core.appender.rolling.RollingFileManager$FactoryData java.lang.ClassCastException: org.apache.logging.log4j.core.appender.FileManager$FactoryData cannot be cast to org.apache.logging.log4j.core.appender.rolling.RollingFileManager$FactoryData Adding the LOGGING_MANAGER to the eval of the java runtime in the "stop" case of catalina.sh resolves this. Line 519 of catalina.sh change eval "\"$_RUNJAVA\"" $JAVA_OPTS \ -D$ENDORSED_PROP="\"$JAVA_ENDORSED_DIRS\"" \ -classpath "\"$CLASSPATH\"" \ -Dcatalina.base="\"$CATALINA_BASE\"" \ -Dcatalina.home="\"$CATALINA_HOME\"" \ -Djava.io.tmpdir="\"$CATALINA_TMPDIR\"" \ org.apache.catalina.startup.Bootstrap "$@" stop to eval "\"$_RUNJAVA\"" $LOGGING_MANAGER $JAVA_OPTS \ -D$ENDORSED_PROP="\"$JAVA_ENDORSED_DIRS\"" \ -classpath "\"$CLASSPATH\"" \ -Dcatalina.base="\"$CATALINA_BASE\"" \ -Dcatalina.home="\"$CATALINA_HOME\"" \ -Djava.io.tmpdir="\"$CATALINA_TMPDIR\"" \ org.apache.catalina.startup.Bootstrap "$@" stop
This was removed because it was causing issues with Java 9: https://github.com/apache/tomcat/commit/ff57a28661ee6e581dff17e362864910efed426b There is also the point of multiple processes trying to write to the same file.
Given the timing of the fix mention in comment #1 (2 years before Java 9 GA) that issue looks like an issue in the EA releases that was addressed by GA. On that basis, restoring the $LOGGING_MANAGER looks like the best course of action here.
Fixed in: - master for 9.0.23 onwards - 8.5.x for 8.5.44 onwards 7.0.x was not affected.