I’m running jenkins as .war file on RHEL 7.4 / Java 8
It’s being launched as service (init file). I replaced current jenkins.war with newer LTS version (2.319.3) and after starting service command prompt got frozen. Ctrl+C & I checked that UI is available. But after checking running processes I discovered that instead of 1 I’ve got 3 and one running as root.
At the moment I was not able to manage application service other than as root.
Once all processes were killed I downgraded to previously running 2.263.4 and started - all is fine. Then I used another LTS: 2.303.3 and stated - all is working fine.
I’ve seen that latest LTS Jenkins installer on linux switched to systemd but is that possible that “war” version can be affected by that?
Does anyone experienced something similar or have any idea why I’m not able to launch anything higher than 2.303.3?
When you say war version. Can you walk us through how you are upgrading and how you are starting up Jenkins?
I havnt spent any time looking at the packaging scripts (I use docker myself) but the ps output you posted looks like something is calling something that is running Jenkins as the Jenkins user.
I feel like those scripts need to be updated to use exec but that’s a different issue (unless you wrote them)
Procedure is simple and all is being done as Jenkins user:
stop service > rename jenkins.war > wget https://get.jenkins.io/war-stable/<lts-version>/jenkins.war > chmod 644 jenkins.war > start service
Same sysconfig & init script only difference is jenkins.war
Exactly that is init script, even though launched as root will launch application as application user. But it went that application user starting service is executing something as root - no idea. Especially that as soon as I’ll use previous LTS it will work w/o issues.
If you used those steps today, then you downloaded Jenkins 2.332.1. You can check the version of the war file that you’ve downloaded with the command
$ java -jar jenkins.war --version
Please don’t use the Linux installer (rpm package in your case) and then replace the war file as an upgrade technique. That bypasses the benefits of the Linux installer because it skips the upgrade steps that the Linux installer provides as part of the Linux package.
Use the Linux package manager to upgrade. For example:
# yum update jenkins
If you want to remain with Jenkins 2.319.3 rather than use the most recent 2.332.1, then you’ll need to investigate the yum syntax that will allow you to install a specific version. The Linux installer switch to systemd does not happen until the 2.332.1 LTS release. Jenkins 2.319.3 uses System V init just as previous versions did.
I hope you’ll also consider upgrading from RHEL 7.4 to RHEL 7.9. RHEL 7.4 is a very old version and likely has many known security issues that can be resolved by updating to the most recent RHEL 7 release.
You should also assure that you’re running a recent Java 8 version (preferably 8u322).
Hi @MarkEWaite, thanks for good spot about Jenkins being installed by rpm first. Need to rework that! Upgrades are in place.
Knowing that it looks like installed via rpm Jenkins version 2.164.3 - as I’ve found that this one was installed in past - used some settings which are not working with version higher than: 2.303.3.