Jenkins Starting issue

Hi There,

We have Jenkins starting issue. After server reboot application is not online and it will display “Jenkins is starting”.

Same behavior on two Jenkins instances.

  1. Jenkins versions: 2.387.1
    OS: RHEL 7.9

  2. Jenkins version: 2.401.3
    OS: Rocky Linux 8.9

Currently we are following below workaround on both instances:

  1. systemctl stop jenkins.service
  2. mv jobs jobs_bkp
  3. systemctl start jenkins.service
  4. Check nodes are online (if not start the nodes)
  5. systemctl stop jenkins.service
  6. mv jobs jobs_dummy
  7. mv jobs_bkp jobs
  8. systemctl start jenkins.service

With above steps: stop Jenkins → rename jobs directory (ex: jobs to jobs_bkp) → start Jenkins → check nodes connectivity → stop Jenkins → rename newly created Jobs directory (jobs to jobs_dummy) → rename original jobs directory (from jobs_bkp to jobs) → start the application.

I have attached the log for your reference.

Jenkins.logs.zip (4.8 KB)

How was the application upgraded?
Did you use the same method as was used to install Jenkins? (package installer or download the war file directly)

I agree with your choice to backup the jobs/, when I upgrade I leave it in place. And the upgrade process works fine.

Are all plugins updated at the time of upgrade?

Here is a reference story of my experiences upgrading my Jenkins Servers from out of date to LTS. I hope that it provides some insight
Back of the Napkin Guide to Updating Jenkins, for the uninitiated

1 Like

If the problem is reported in the journalctl output as a timeout, you can increase the timeout value. The “Managing systemd services” page says:

If Jenkins does not signal startup completion within a configured time, the service will be considered failed and will be shut down again. As each initialization milestone (i.e., “Started initialization”, “Listed all plugins”, “Prepared all plugins”, “Started all plugins”, “Augmented all extensions”, “System config loaded”, “System config adapted”, “Loaded all jobs”, “Configuration for all jobs updated”, and “Completed initialization”) is attained, the timeout is extended by the value of the jenkins.model.Jenkins.extendTimeoutSeconds system property (by default, 15 seconds). The timeout can be configured with the TimeoutStartSec directive in the service unit.

The TimeoutStartSec value can be set to a very large numerical value or to “infinite”.

As a note of caution, the Jenkins project stopped supporting Red Hat Enterprise Linux 7 and its derivatives in November 2023. The systemd implementation on Red Hat Enterprise Linux 7 and its derivatives is old enough that the Jenkins installer was not tested with it even when Jenkins was supported on RHEL 7. You are making a wise choice to move off of RHEL 7.

1 Like

Hi Mark,

Thanks for the reply. Since I was on planned vacation, I didn’t chance to apply and test the change.

The TimeoutStartSec value set to “infinite” and it is working fine on 1. Jenkins version: 2.401.3 (OS: Rocky Linux 8.9), but not effective on Jenkins version 2.387.1 (OS RHEL 7.9).

The Jenkins project stopped supporting RHEL 7 in November 2023 as announced in the May 2023 blog post. Upgrade that operating system and that Jenkins version as soon as you can.

Until you’ve completed the upgrade, you could try to set the value to a large value rather than infinite. The systemd implementation on RHEL 7 is very old and does not support all the facilities that are available on supported operating systems.