Bamboo Data Center is not coming up online after upgrading to version 10 due to Java class version mismatch
プラットフォームについて: Data Center - この記事は、Data Center プラットフォームのアトラシアン製品に適用されます。
このナレッジベース記事は製品の Data Center バージョン用に作成されています。Data Center 固有ではない機能の Data Center ナレッジベースは、製品のサーバー バージョンでも動作する可能性はありますが、テストは行われていません。サーバー*製品のサポートは 2024 年 2 月 15 日に終了しました。サーバー製品を利用している場合は、アトラシアンのサーバー製品のサポート終了のお知らせページにて移行オプションをご確認ください。
*Fisheye および Crucible は除く
要約
This article covers a scenario where Bamboo is not coming up online after upgrading the current version to Bamboo 10.x.x. The issue is related to starting Bamboo 10 with an unsupported Java version.
環境
The issue was seen while upgrading Bamboo from 9.2.16 to 10.0.1
診断
1) Looking at <bamboo-home>logs>atlassian-bamboo.log file we can see that it does not contain any logs post Bamboo was started with new version which is 10.0.1, the logs are only present when Bamboo was shutdown.
INFO [ActiveMQ ShutdownHook] [TransportConnector] Connector vm://bamboo stopped
INFO [Thread-66] [HikariDataSource] HikariPool-2 - Shutdown initiated...
INFO [Thread-66] [HikariDataSource] HikariPool-2 - Shutdown completed.
INFO [Thread-66] [QuartzScheduler] Scheduler scheduler_$_NON_CLUSTERED shutdown complete.
2) Looking at <bamboo-install>logs>catalina.out file we can see that the Tomcat server was started after Bamboo was started with version 10.0.1.
INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet engine: [Apache Tomcat/9.0.91]
3) We can see the below error in catalina.out file > com/atlassian/bamboo/log/BambooLog4jHomeLocatorContext has been compiled by a more recent version of the Java Runtime
2024-09-10T08:25:47.417589Z main WARN Could not examine class com/atlassian/bamboo/log/BambooLog4jHomeLocatorContext.class java.lang.UnsupportedClassVersionError: com/atlassian/bamboo/log/BambooLog4jHomeLocatorContext has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 55.0 (unable to load class [com.atlassian.bamboo.log.BambooLog4jHomeLocatorContext])
at org.apache.catalina.loader.WebappClassLoaderBase.findClassInternal(WebappClassLoaderBase.java:2291)
原因
1) The issue is because as per Bamboo 10 supported platform Bamboo 10.0 only supports Java 17, if you are starting Bamboo with Java 11 you'll see the above errors.
2) Class file version 55.0 means Java 11 and Class file version 61 means Java 17.
ソリューション
1) Install JDK 17 on your Bamboo server and set the environment variables correctly, refer Setting JAVA_HOME for more details.
2) Make sure the results of below 2 commands point to jdk17
java --version
echo $JAVA_HOME
3) Restart your Bamboo application