Unrecognized JVM GC options when using JAVA 11

Still need help?

The Atlassian Community is here for you.

Ask the community


Platform Notice: Server and Data Center Only - This article only applies to Atlassian products on the server and data center platforms.

Summary

When using Java 11, some JVM parameters previously applied to Tomcat are now unrecognized.

Environment

  • Confluence
  • Java 11 / OpenJDK 11

Diagnosis

When using Java 11 with Confluence, if you still have JVM options from a previous Java 8 installation you may find the application will not start and the following or similar messages are printed in the logs:

Unrecognized VM option 'UseGCLogFileRotation'
 Error: Could not create the Java Virtual Machine.
 Error: A fatal exception has occurred. Program will exit.

Cause

In Java 11 some JVM flags including those used in Java 8 for Garbage Collection Logging have been removed.

If these are still contained in the JVM flags specified in the setenv.sh or setenv.bat the JVM will not be able to start.

It's known that the following options are unrecognized in Java 11:

  • -d64
  • PrintGCTimeStamps
  • PrintGCDateStamps
  • PrintTenuringDistribution
  • PrintGCCause
  • PrintGCDetails
  • UseGCLogFileRotation
  • NumberOfGCLogFiles
  • GCLogFileSize


In Java 11, these GCLog options are now handled by Xlog, there is a conversion table below:

More information about this change can be found in the following Stackoverflow article:

Solution

Either add the following JVM option to the setenv.sh or setenv.bat file, or convert the GC options to the new Xlog format.

XX:+IgnoreUnrecognizedVMOptions

Last modified on Nov 11, 2021

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.