Unrecognized JVM GC options when using JDK 11/17

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

プラットフォームについて: Server および Data Center のみ。この記事は、Server および Data Center プラットフォームのアトラシアン製品にのみ適用されます。

Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Fisheye および Crucible は除く

要約

When using JDK 11/17, some JVM parameters previously applied to Tomcat are now unrecognized, preventing Confluence to start

環境

Confluence 7.19 or Confluence 8 running with JDK 11/17+

診断

When using JDK 11/17 with Confluence, if you still have JVM options from a previous JDK 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.

原因

In JDK 11/17 some JVM flags including those used in JDK 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/17:

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


Starting in JDK 9, 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, where some examples as listed:

ソリューション

Convert the GC options to the new Xlog format, being sure of removing the unrecognized options for JDK 11/17 listed above. As an example, check the following System Properties

CATALINA_OPTS="-Xlog:gc*:file=$LOGBASEABS/logs/gc-%t.log:tags,time,uptime,level:filecount=5,filesize=2M ${CATALINA_OPTS}"



最終更新日 2024 年 4 月 26 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.