Hi There,
Forgive a likely noob question. I’m trying to upgrade from 2.542.1 to 2.504.1 on an Ubuntu 22 LTS server using apt-get upgrade. I’ve updated every plugin using the plugins manager in the webUI but after upgrading jenkins it fails to start and complains about a list of plugins that need updates. I’ve flailed around some with trying to update plugins from the shell without jenkins running but I suspect I may be missing something obvious?
Grateful for any guidance…
Have you checked the Jenkins LTS Upgrade Guide. As you jump from an older version to latest LTS that contains the switch to EE9 and Java 17 there might be the requirement to update plugins in lockstep.
It is always recommended to update plugins before doing the upgrade (which you did) but to also update plugins after the upgrade.
What error you get in the logs?
A way to update the plugins is by using GitHub - jenkinsci/plugin-installation-manager-tool: Plugin Manager CLI tool for Jenkins while Jenkins is down
Managing plugins when the service won’t start was the piece I was missing. But I’m still stumped.
Startup shows this in the logs:
May 07 11:28:12 jk-ifs jenkins[126960]: - Update required: Configuration as Code Plugin (configuration-as-code 1873.vea_5814ca_9c93) to be updated to 1915.vcdd0a_d0d2625 or higher
May 07 11:28:12 jk-ifs jenkins[126960]: - Update required: Folders Plugin (cloudbees-folder 6.928.v7c780211d66e) to be updated to 6.976.v4dc79fb_c458d or higher
And I appear to have the latest versions of those two plugins installed:
root@jk-ifs:/dmz/services/jenkins/plugins# java -jar ~/jenkins-plugin-manager-2.13.2.jar --available-updates --output txt --plugins configuration-as-code cloudbees-folder
configuration-as-code:latest
cloudbees-folder:latest
Am I reading the version numbering scheme wrong?
root@jk-ifs:/dmz/services/jenkins/plugins# java -jar ~/jenkins-plugin-manager-2.13.2.jar --list 2>&1 | grep -e configuration-as-code -e cloudbees-folder
cloudbees-folder 6.1012.v79a_86a_1ea_c1f
configuration-as-code 1967.va_968e15fd05b_
cloudbees-folder 6.1012.v79a_86a_1ea_c1f
configuration-as-code 1967.va_968e15fd05b_```
It’s been a while. My solution back in May was to roll everything back to what worked, a VM snapshot that I took before I started and a file system snapshot of $JENKINS_HOME.
I’ve upgraded jenkins to 2.528.3. I also upgraded openjdk to 21 as 17 is EOS for jenkins soon.
jenkins currently won’t start, journalctl shows errors complaining that the matrix-auth (3.2.8) plugin failed to start and that the configuration-as-code plugin needs updating:
Jan 26 14:55:08 jk-ifs jenkins[24281]: [LF]> - Update required: Configuration as Code Plugin (configuration-as-code 1932.v75cb_b_f1b_698d) to be updated to 1963.v24e046127a_3f or higher
The plugin manager shows both of the plugins are the latest:
root@jk-ifs:~# java -jar ~/jenkins-plugin-manager*.jar --available-updates --output txt --plugins matrix-auth configuration-as-code
matrix-auth:latest
configuration-as-code:latest
root@jk-ifs:~#
However, if I run that check with the versions I get different results:
root@jk-ifs:~# java -jar ~/jenkins-plugin-manager*.jar --available-updates --output txt --plugins matrix-auth:3.2.8 configuration-as-code:1963
matrix-auth:3.2.9
configuration-as-code:2036.v0b_c2de701dcb_
root@jk-ifs:~#
Again, a n00b question: is that plugin-manager command just querying what’s available, or reporting what’s on the machine? I don’t see any syntax information on the github repo that seems to differentiate between querying versions and actually installing them. Do I need to be doing something else to actually upgrade them? Even just copying in the downloaded files?
Hope to hear from you.
Wait.
The plugin manager downloads plugins and their dependencies into a folder so that they can be easily imported into an instance of Jenkins.
So:
root@jk-ifs:/dmz/services/jenkins/plugins# java -jar ~/jenkins-plugin-manager-2.13.2.jar --available-updates --plugins matrix-auth:3.2.8
Available updates:
matrix-auth (3.2.8) has an available update: 3.2.9
root@jk-ifs:/dmz/services/jenkins/plugins#
What I’m missing is how to use the plugin manager to actually get the downloaded 3.2.9
remove the --available-updates option. Then it will download
I downloaded the .hpi file for the most recent matrix-auth and dropped it in $JENKINS_HOME manually. Still failed to start but with one less error. Did the same for configuration-as-code and it starts! Huzzah! There were a few dependent plugins that still wanted updates in the webUI, those applied with no trouble.
I will definitely use that the next time around.