How to upgrade the Java version used by Bamboo

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.

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 VersionJava 8(1)Java 11Java 17Java 21
9.2 LTS and earlier(tick)(tick)(error)(error)
9.3(error)(tick)(error)(error)
9.4 to 9.6(error)(tick)(tick)(error)
10.0 (error)(error)(tick)(error)
10.1 and later(error)(error)(tick)(tick)
(warning) (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. 

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

  1. Stop the Bamboo Server or Agent
  2. Run a complete backup of your Bamboo environment, including <bamboo-home> and <bamboo-install> folders and the Database or <bamboo-agent-home>
  3. 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
  4. 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)
  5. In case your Bamboo instance has enabled Monitor Memory usage and Garbage Collection, update the Java properties accordingly
  6. 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:
    1. Bamboo 8.0 to 9.2
      wrapper.java.version.min=8
      wrapper.java.version.max=11
      wrapper.java.version.fallback=8
    2. Bamboo 9.3
      wrapper.java.version.min=11
      wrapper.java.version.max=11
      wrapper.java.version.fallback=11
    3. Bamboo 9.4 to 9.6
      wrapper.java.version.min=11
      wrapper.java.version.max=17
      wrapper.java.version.fallback=11
      wrapper.java.additional.4=--add-opens=java.base/
      java.util=ALL-UNNAMED
      wrapper.java.additional.5=--add-opens=java.base/
      java.lang=ALL-UNNAMED
      wrapper.java.additional.6=--add-opens=java.base/
      sun.net.www.protocol.http=ALL-UNNAMED
      wrapper.java.additional.7=--add-opens=java.base/
      sun.net.www.protocol.https=ALL-UNNAMED
    4. Bamboo 10.0
      wrapper.java.version.min=17
      wrapper.java.version.max=17
      wrapper.java.version.fallback=17
      wrapper.java.additional.4=--add-opens=java.base/
      java.util=ALL-UNNAMED
      wrapper.java.additional.5=--add-opens=java.base/
      java.lang=ALL-UNNAMED
      wrapper.java.additional.6=--add-opens=java.base/
      sun.net.www.protocol.http=ALL-UNNAMED
      wrapper.java.additional.7=--add-opens=java.base/
      sun.net.www.protocol.https=ALL-UNNAMED
    5. Bamboo 10.1 and later
      wrapper.java.version.min=17
      wrapper.java.version.max=21
      wrapper.java.version.fallback=17
      wrapper.java.additional.4=--add-opens=java.base/
      java.util=ALL-UNNAMED
      wrapper.java.additional.5=--add-opens=java.base/
      java.lang=ALL-UNNAMED
      wrapper.java.additional.6=--add-opens=java.base/
      sun.net.www.protocol.http=ALL-UNNAMED
      wrapper.java.additional.7=--add-opens=java.base/
      sun.net.www.protocol.https=ALL-UNNAMED
  7. Update and validate any JAVA_HOME and PATH 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.
    1. On a Bamboo Agent, optionally modify <bamboo-agent-home>/conf/wrapper.conf and hardcode the absolute path for Java:

    2. 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 Agent
      wrapper.java.command=/opt/jdk-[11|17|21]/bin/java
      Windows Agent
      wrapper.java.command=C:\Java\jdk-[11|17|21]\bin\java.exe
  8. Review the service environment variables to reflect the new Java location if you run Bamboo as a Service on Windows or Linux (Systemd).
  9. Start Bamboo
  10. On the Server, check if Java 11 or 17 or 21 is in use by opening https://<Bamboo_URL>/admin/systemInfo.action
  11. 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.

Last modified on Nov 22, 2024

Was this helpful?

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