Jenkins init.d not parsing jdk version correctly?

I just tried updating our Jenkins to 2.332.2 - and now it won’t start.
Digging through the logs and startup, it appears to think I’m not using a valid java version. Note that I have NOT updated java recently. When I looked at the init.d code and the msgs, it appears to be parsing our java 11 version number incorrectly: init.d is looking for “18” or “110” - but our is coming up as “11.014”.

root@metrixbld1:~# /usr/bin/java -version
openjdk version “11.0.14.1” 2022-02-08
OpenJDK Runtime Environment (build 11.0.14.1+1-Ubuntu-0ubuntu1.18.04)
OpenJDK 64-Bit Server VM (build 11.0.14.1+1-Ubuntu-0ubuntu1.18.04, mixed mode, sharing)
root@metrixbld1:~# JAVA=type -p java
root@metrixbld1:~# JAVA_VERSION=$($JAVA -version 2>&1 | sed -n ‘;s/.* version "(.).(.)…"./\1\2/p;’)
root@metrixbld1:~#
root@metrixbld1:~# echo $JAVA_VERSION
11.014

Jenkins 2.332.2 does not use init.d to start Jenkins when it is installed from the Linux packages or when it is upgraded with the package manager. Jenkins 2.332.1 switched from using the System V init system (including init.d/jenkins) to use systemd.

If you’ve upgraded to Jenkins 2.332.2 by replacing the war file, you need to instead upgrade to Jenkins 2.332.2 by using the package manager upgrade commands. Those commands depend on the operating system package manager that you are using. Some examples include:

Debian

# apt update
# apt upgrade

Ubuntu

# apt update
# apt upgrade

Red Hat Enterprise Linux 8

# dnf upgrade

CentOS 7

# yum upgrade

OpenSUSE

# zypper update

I’m running Java 11.0.14.1 on my Red Hat Enterprise Linux 8 with Jenkins 2.342 (most recent weekly, also using systemd). I’m confident that 11.0.14.1 will be correctly recognized if you use the operating system package manager to perform the upgrade.

The change to systemd is also described in the Jenkins 2.332.1 upgrade guide.

Thanks. I hadn’t seen any notification that I could no longer just replace the .war file. (at least, from the Jenkins on Ubuntu.)
The Jenkins on Mac OS can update itself, so likely handled that situation correctly.

was it recommended at one point to update the war file not the package? I’ve never used the package install, but that seems not something you’d normally do with .deb files.

Since Ubuntu didn’t have a “Update to latest” button like Mac OS does, we had been using a simple shell script to download the .war file and update jenkins on that machine.

Well, “apt update” seems to have an issue with Jenkins.

W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: Debian Jenkins Packages binary/ Release: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY FCEF32E745F2C3D5