Issues upgrading jenkins

Hi,

I am trying to upgrade jenkins from 2.423 to the latest version and I am running into issues. I stop jenkins, I backup the jenkins war file, and I download the latest like so

sudo wget https://updates.jenkins.io/download/war/latest/jenkins.war

And then when i go start jenkins again I get an error
"Job for jenkins.service failed because the control process exited with error code. See “systemctl status jenkins.service and journalctl -xe for details”

I have upgraded jenkins version in the past and have never run into this issue, not sure why it’s doing this.

Thanks
Craig

Have you installed Jenkins with a package manager? If yes then you should also update Jenkins via the package manager and not by just updating the war file.

Running journalctl -u jenkins should tell you what the problem is normally.

Also 2.423 is a rather old version. The latest weekly version requires java17 did you consider this?
I would also recommend to use LTS versions for productive systems. There you have upgrade guides that point you to important things you have to consider during upgrades.

Ah thank you, that helped greatly. Yes it appears I am still on java 11, upgrading that all currently. Good to know, i was able to find all the documentation on the LTS versions so ill be sure to do that. I used apt, so ill see if i can upgrade it with that

it appears I cannot upgrade jenkins through the package manager? its showing my installed version is 2.387.1 and that there is no newer versions to install? I did do an apt-get update and apt-get upgrade as well.

sudo apt-cache policy jenkins
jenkins:
Installed: 2.387.1
Candidate: 2.387.1
Version table:
*** 2.387.1 100
100 /var/lib/dpkg/status

oh i think i found my answer, had to run this to get the latest stable

sudo wget -O /usr/share/keyrings/jenkins-keyring.asc \
  https://pkg.jenkins.io/debian-stable/jenkins.io-2023.key
echo "deb [signed-by=/usr/share/keyrings/jenkins-keyring.asc]" \
  https://pkg.jenkins.io/debian-stable binary/ | sudo tee \
  /etc/apt/sources.list.d/jenkins.list > /dev/null