How to upgrade the Java version used by Bamboo
Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.
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.
*Except Fisheye and Crucible
Summary
This article covers the steps to upgrade Bamboo's Java version on the Server and Agents.
Environment
- Bamboo Server and Agents
- Java 8, 11, 17 and 21
Diagnosis
Bamboo currently supports the following Java versions:
Bamboo Version | Java 8(1) | Java 11 | Java 17 | Java 21 |
---|---|---|---|---|
9.2 LTS and earlier | ||||
9.3 | ||||
9.4 to 9.6 | ||||
10.0 | ||||
10.1 and later |
(1) Since Bamboo 9.2.7, only Java from version 8u121 is supported.
Bamboo versions up to 9.2 support both Java 8 and 11 versions. With the introduction of Bamboo 9.3, only Java 11 is supported. Bamboo 9.4 introduced support for Java 17.
Customers running Bamboo on Java 8 must upgrade their Java version before upgrading to Bamboo 9.3 and later.
This article also applies to customers who wish to upgrade to Java 11 on Bamboo 9.2 LTS and earlier without moving to Bamboo 9.3 or later.
Cause
- Java 8 and 11 have reached their end of life within the Bamboo lifecycle and are not supported from Bamboo 9.3 and Bamboo 10.0 respectively.
Known issues
To ensure optimal performance and prevent unforeseen complications, it is strongly recommended that the same version of Java, or at the very least, the same major version (e.g., 8, 11, 17, 21 etc.), be utilized across both the Server and Agent components of Bamboo.
Transitioning to a newer Java version might introduce SSL problems due to reliance on obsolete or retired technologies in components that either connect to or are connected by the Bamboo Server. Notable among these are TLS 1.0 and 1.1 protocols and DSA certificates. Such errors can occur on both the Bamboo Server and its Agents and also affect interactions with earlier versions of Atlassian applications like Jira, Crowd, and Confluence.
Common issues
Check the KB articles below to get to know more about common issues that may arise when using different major Java versions.
- Remote Agent running on JDK 11 and JDK 8u341 or later fails to start with "Software caused connection abort: recv failed" message when using a secure connection (SSL)
- Elastic Agents can't decode user-data while using specific Java versions
- Bamboo compatibility with Java 17
Solution
We recommend you analyze any Server Capabilities and Agent capabilities that may be referring to Java 8 before attempting any upgrades, as you will have to update them manually or by clicking on "Detect server capabilities" when on Bamboo Administration >> Server Capabilities after Bamboo starts using Java 11 or 17 or 21.
Some Jobs and Environments may have requirements linked to a specific Java capability; you may have to work on finding and modifying such requirements to adhere to the new Java version. Bamboo can also have multiple Java versions available on the same Server and use Java 11 or 17 or 21.
To upgrade Java from 8, 11, or 17 or 21 follow the steps below:
Bamboo Server and Agent
- Stop the Bamboo Server or Agent
- Run a complete backup of your Bamboo environment, including
<bamboo-home>
and<bamboo-install>
folders and the Database or<bamboo-agent-home>
- Uninstall Java 8 – this is optional but highly recommended to avoid accidental usage. Make sure you don't have any requirements that may depend on such Java 8 capabilities
- Install Java 11 or Java 17 if on Bamboo 9.4 to 9.6, or Java 17 if on Bamboo 10.0 or Java 21 if Bamboo 10.1 and later. Check the compatibility matrix above for version details. Use your operating system's package manager or an external installer (this article will not cover this step)
- In case your Bamboo instance has enabled Monitor Memory usage and Garbage Collection, update the Java properties accordingly
- In earlier versions of the Bamboo Remote Agent wrapper, the minimal and maximum versions of Java may be hardcoded to version 8 only, making the Remote Agent bootstrap process fail when attempting to use Java 11 or 17 or 21. To fix that, either reinstall the Remote Agent entirely or modify the
<bamboo-agent-home>/conf/wrapper.conf
file and adjust the following properties: - Update and validate any
JAVA_HOME
andPATH
environment variables on the Operating System to reflect the new Java 11 or 17 or 21 locations so Bamboo will know where to look for the Java executable.On a Bamboo Agent, optionally modify
<bamboo-agent-home>/conf/wrapper.conf
and hardcode the absolute path for Java:Java 17 must be the only runner component version in the wrapper.java.command property when on Bamboo 10.0 and Java 21 when on Bamboo 10.1
Linux Agentwrapper.java.command=/opt/jdk-[11|17|21]/bin/java
Windows Agentwrapper.java.command=C:\Java\jdk-[11|17|21]\bin\java.exe
- Review the service environment variables to reflect the new Java location if you run Bamboo as a Service on Windows or Linux (Systemd).
- Start Bamboo
- On the Server, check if Java 11 or 17 or 21 is in use by opening https://<Bamboo_URL>/admin/systemInfo.action
- On the Agent, list the processes and validate if Java 11 or 17 or 21 are being used.
If you upgrade to Bamboo 9.3 or 9.4 and use Remote Agents on Java 8, or Elastic Agents with custom images running on Java 8; you must update the Java component to version 11, or version 17 when running Bamboo 9.4 to 9.6, and to Java 17 when running Bamboo 10.0 and Java 21 when running Bamboo 10.1 and later. Please check the following page for further instructions and examples of unsupported integrations. You can still have additional Java versions on your customized Elastic Agent image and define them as new capabilities of the Elastic Image.
Official Bamboo Docker images provided by Atlassian are shipped with Java 11 on Bamboo 9.3 and earlier, Java 11 and Java 17 on Bamboo 9.4 to 9.6, and Java 17 on Bamboo 10.0 and and Java 21 on Bamboo 10.1 and later.