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.
Jenkins versions: 2.387.1
OS: RHEL 7.9
Jenkins version: 2.401.3
OS: Rocky Linux 8.9
Currently we are following below workaround on both instances:
systemctl stop jenkins.service
mv jobs jobs_bkp
systemctl start jenkins.service
Check nodes are online (if not start the nodes)
systemctl stop jenkins.service
mv jobs jobs_dummy
mv jobs_bkp jobs
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.
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.
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.