When upgrading from JVM used to run Jenkins Java 11 to Java 17, there are some details you should know and precautions you should take.
As with any upgrade, we recommend:
Testing the upgrade with your backup.
Only after all required tests pass, performing the upgrade on your production instance.
If you need to upgrade Jenkins, as well as the JVM, we recommend you:
Stop the Jenkins controller.
Upgrade the JVM on which Jenkins is running.
Use a package manager to install the new JVM.
Ensure the default JVM is the newly installed version.
If it is not, run systemctl edit jenkins
, and set either the JAVA_HOME
environment variable or the JENKINS_JAVA_CMD
environment variable.
Upgrade Jenkins to the most recent version.
How you upgrade Jenkins is dependent upon your original Jenkins installation method.
We recommend that you use the package manager of your system (such as apt or yum ).
|
Validate the upgrade to confirm that all plugins and jobs are loaded.
Upgrade the required plugins.
When upgrading the Java version for Jenkins and the JVM, it is important to upgrade all plugins that support Java 17. Plugin upgrades assure compatibility with the most recent Jenkins releases.
If you discover a previously unreported issue, please let us know. Refer to our issue reporting documentation for guidance. |
All agents must be running on the same JVM version as the controller, due to how controllers and agents communicate. If you’re upgrading your Jenkins controller to run on Java 17, you must upgrade the JVM on your agents.
Validating the version of each agent can be done with the Versions Node Monitors plugin. This plugin provides information about the JVM version of each agent on the node management screen of your Jenkins instance. This plugin can also be configured to automatically disconnect any agent with an incorrect JVM version.
Please submit your feedback about this page through this quick form.
Alternatively, if you don't wish to complete the quick form, you can simply indicate if you found this page helpful?
See existing feedback here.