Jenkins service startup failure after installation in RHEL 9.5

OPERATING SYSTEM:
NAME=“Red Hat Enterprise Linux”
VERSION=“9.5 (Plow)”
ID=“rhel”
ID_LIKE=“fedora”
VERSION_ID=“9.5”
PLATFORM_ID=“platform:el9”
PRETTY_NAME=“Red Hat Enterprise Linux 9.5 (Plow)”
REDHAT_BUGZILLA_PRODUCT=“Red Hat Enterprise Linux 9”
REDHAT_BUGZILLA_PRODUCT_VERSION=9.5
REDHAT_SUPPORT_PRODUCT=“Red Hat Enterprise Linux”
REDHAT_SUPPORT_PRODUCT_VERSION=“9.5”

Linux 5.14.0-503.35.1.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Mon Mar 24 11:15:27 EDT 2025 x86_64 x86_64 x86_64 GNU/Linux

JAVA:
openjdk version “17.0.14” 2025-01-21 LTS
OpenJDK Runtime Environment (Red_Hat-17.0.14.0.7-1) (build 17.0.14+7-LTS)
OpenJDK 64-Bit Server VM (Red_Hat-17.0.14.0.7-1) (build 17.0.14+7-LTS, mixed mode, sharing)

JENKINS:
Version: 2.492.3
Whether you’re running Jenkins directly or in a container like Tomcat? Directly on VM (VMWare)
Whether Jenkins is accessed through a reverse proxy? No
How you installed Jenkins? rpm (jenkins-2.492.3-1.1.noarch.rpm)
Your web browser (+ version)? Version 137.0.7151.104 (Official Build) (64-bit)

ISSUE:

  1. Installed Jenkins version 2.492.3 manually via rpm (jenkins-2.492.3-1.1.noarch.rpm) in RHEL 9.5 server.
  2. While trying to start jenkins service (systemctl start jenkins), it gets timedout with below error.
    Job for jenkins.service failed because a timeout was exceeded.
    See “systemctl status jenkins.service” and “journalctl -xeu jenkins.service” for details.
  3. Jenkins URL in browser is stuck indefinitely saying “Jenkins is getting ready to work” and hence unable to access Jenkins UI.
  4. Below are captured from jenkins.log file for reference
2025-06-17 13:23:45.565+0000 [id=1]	INFO	winstone.Logger#logInternal: Beginning extraction from war file
2025-06-17 13:23:45.681+0000 [id=1]	WARNING	o.e.j.ee9.nested.ContextHandler#setContextPath: Empty contextPath
2025-06-17 13:23:45.789+0000 [id=1]	INFO	org.eclipse.jetty.server.Server#doStart: jetty-12.0.17; built: 2025-03-03T13:15:05.903Z; git: 14d19c268e4cb09afc312b5255a4cbb7a95c5cb6; jvm 17.0.14+7-LTS
2025-06-17 13:23:46.448+0000 [id=1]	INFO	o.e.j.e.w.StandardDescriptorProcessor#visitServlet: NO JSP Support for /, did not find org.eclipse.jetty.ee9.jsp.JettyJspServlet
2025-06-17 13:23:46.549+0000 [id=1]	INFO	o.e.j.s.DefaultSessionIdManager#doStart: Session workerName=node0
2025-06-17 13:23:47.137+0000 [id=1]	INFO	hudson.WebAppMain#contextInitialized: Jenkins home directory: /u01/jenkins_home found at: EnvVars.masterEnvVars.get("JENKINS_HOME")
2025-06-17 13:23:47.276+0000 [id=1]	INFO	o.e.j.s.handler.ContextHandler#doStart: Started oeje9n.ContextHandler$CoreContextHandler@5489c777{Jenkins v2.492.3,/,b=file:///var/cache/jenkins/war/,a=AVAILABLE,h=oeje9n.ContextHandler$CoreContextHandler$CoreToNestedHandler@3676ac27{STARTED}}
2025-06-17 13:23:47.303+0000 [id=1]	INFO	o.e.j.server.AbstractConnector#doStart: Started ServerConnector@726386ed{HTTP/1.1, (http/1.1)}{0.0.0.0:8080}
2025-06-17 13:23:47.321+0000 [id=1]	INFO	org.eclipse.jetty.server.Server#doStart: Started oejs.Server@163e4e87{STARTING}[12.0.17,sto=0] @2478ms
2025-06-17 13:23:47.328+0000 [id=24]	INFO	winstone.Logger#logInternal: Winstone Servlet Engine running: controlPort=disabled
2025-06-17 13:23:47.544+0000 [id=23]	INFO	jenkins.model.Jenkins#<init>: Starting version 2.492.3
2025-06-17 13:23:47.755+0000 [id=31]	INFO	jenkins.InitReactorRunner$1#onAttained: Started initialization
2025-06-17 13:23:47.763+0000 [id=29]	INFO	jenkins.InitReactorRunner$1#onAttained: Listed all plugins
2025-06-17 13:23:48.926+0000 [id=32]	INFO	jenkins.InitReactorRunner$1#onAttained: Prepared all plugins
2025-06-17 13:23:48.931+0000 [id=30]	INFO	jenkins.InitReactorRunner$1#onAttained: Started all plugins
2025-06-17 13:23:48.940+0000 [id=31]	INFO	jenkins.InitReactorRunner$1#onAttained: Augmented all extensions
2025-06-17 13:23:49.328+0000 [id=31]	INFO	jenkins.InitReactorRunner$1#onAttained: System config loaded
2025-06-17 13:23:49.329+0000 [id=31]	INFO	jenkins.InitReactorRunner$1#onAttained: System config adapted
2025-06-17 13:23:49.330+0000 [id=32]	INFO	jenkins.InitReactorRunner$1#onAttained: Loaded all jobs
2025-06-17 13:23:49.332+0000 [id=29]	INFO	jenkins.InitReactorRunner$1#onAttained: Configuration for all jobs updated
2025-06-17 13:23:49.390+0000 [id=48]	INFO	hudson.util.Retrier#start: Attempt #1 to do the action check updates server
2025-06-17 13:23:49.440+0000 [id=31]	INFO	jenkins.install.SetupWizard#init: 

*************************************************************
*************************************************************
*************************************************************

Jenkins initial setup is required. An admin user has been created and a password generated.
Please use the following password to proceed to installation:

This may also be found at: /u01/jenkins_home/secrets/initialAdminPassword

*************************************************************
*************************************************************
*************************************************************

2025-06-17 13:24:50.281+0000 [id=25]	INFO	winstone.Logger#logInternal: JVM is terminating. Shutting down Jetty
2025-06-17 13:24:50.282+0000 [id=25]	INFO	org.eclipse.jetty.server.Server#doStop: Stopped oejs.Server@163e4e87{STOPPING}[12.0.17,sto=0]
2025-06-17 13:24:50.286+0000 [id=25]	INFO	o.e.j.server.AbstractConnector#doStop: Stopped ServerConnector@726386ed{HTTP/1.1, (http/1.1)}{0.0.0.0:8080}
2025-06-17 13:24:50.291+0000 [id=25]	INFO	hudson.lifecycle.Lifecycle#onStatusUpdate: Stopping Jenkins
2025-06-17 13:24:50.297+0000 [id=25]	INFO	jenkins.model.Jenkins$17#onAttained: Started termination
2025-06-17 13:24:50.305+0000 [id=25]	INFO	jenkins.model.Jenkins$17#onAttained: Completed termination
2025-06-17 13:24:50.305+0000 [id=25]	INFO	jenkins.model.Jenkins#_cleanUpDisconnectComputers: Starting node disconnection
2025-06-17 13:24:50.314+0000 [id=25]	INFO	jenkins.model.Jenkins#_cleanUpShutdownPluginManager: Stopping plugin manager
2025-06-17 13:24:50.315+0000 [id=25]	INFO	jenkins.model.Jenkins#_cleanUpPersistQueue: Persisting build queue
2025-06-17 13:24:50.318+0000 [id=25]	INFO	jenkins.model.Jenkins#_cleanUpAwaitDisconnects: Waiting for node disconnection completion
2025-06-17 13:24:50.318+0000 [id=25]	INFO	hudson.lifecycle.Lifecycle#onStatusUpdate: Jenkins stopped
2025-06-17 13:24:50.319+0000 [id=25]	INFO	hudson.WebAppMain#contextDestroyed: Shutting down a Jenkins instance that was still starting up
java.lang.Throwable: reason
	at hudson.WebAppMain.contextDestroyed(WebAppMain.java:419)
	at Jenkins Main ClassLoader//org.eclipse.jetty.ee9.nested.ContextHandler.callContextDestroyed(ContextHandler.java:914)
	at Jenkins Main ClassLoader//org.eclipse.jetty.ee9.servlet.ServletContextHandler.callContextDestroyed(ServletContextHandler.java:608)
	at Jenkins Main ClassLoader//org.eclipse.jetty.ee9.nested.ContextHandler.contextDestroyed(ContextHandler.java:871)
	at Jenkins Main ClassLoader//org.eclipse.jetty.ee9.servlet.ServletHandler.doStop(ServletHandler.java:307)
	at Jenkins Main ClassLoader//org.eclipse.jetty.util.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:132)
	at Jenkins Main ClassLoader//org.eclipse.jetty.util.component.ContainerLifeCycle.stop(ContainerLifeCycle.java:180)
	at Jenkins Main ClassLoader//org.eclipse.jetty.util.component.ContainerLifeCycle.doStop(ContainerLifeCycle.java:202)
	at Jenkins Main ClassLoader//org.eclipse.jetty.ee9.nested.AbstractHandler.doStop(AbstractHandler.java:88)
	at Jenkins Main ClassLoader//org.eclipse.jetty.ee9.security.SecurityHandler.doStop(SecurityHandler.java:414)
	at Jenkins Main ClassLoader//org.eclipse.jetty.ee9.security.ConstraintSecurityHandler.doStop(ConstraintSecurityHandler.java:413)
	at Jenkins Main ClassLoader//org.eclipse.jetty.util.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:132)
	at Jenkins Main ClassLoader//org.eclipse.jetty.util.component.ContainerLifeCycle.stop(ContainerLifeCycle.java:180)
	at Jenkins Main ClassLoader//org.eclipse.jetty.util.component.ContainerLifeCycle.doStop(ContainerLifeCycle.java:202)
	at Jenkins Main ClassLoader//org.eclipse.jetty.ee9.nested.AbstractHandler.doStop(AbstractHandler.java:88)
	at Jenkins Main ClassLoader//org.eclipse.jetty.util.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:132)
	at Jenkins Main ClassLoader//org.eclipse.jetty.util.component.ContainerLifeCycle.stop(ContainerLifeCycle.java:180)
	at Jenkins Main ClassLoader//org.eclipse.jetty.util.component.ContainerLifeCycle.doStop(ContainerLifeCycle.java:202)
	at Jenkins Main ClassLoader//org.eclipse.jetty.ee9.nested.AbstractHandler.doStop(AbstractHandler.java:88)
	at Jenkins Main ClassLoader//org.eclipse.jetty.ee9.nested.ContextHandler.stopContext(ContextHandler.java:894)
	at Jenkins Main ClassLoader//org.eclipse.jetty.ee9.servlet.ServletContextHandler.stopContext(ServletContextHandler.java:371)
	at Jenkins Main ClassLoader//org.eclipse.jetty.ee9.webapp.WebAppContext.stopWebapp(WebAppContext.java:1369)
	at Jenkins Main ClassLoader//org.eclipse.jetty.ee9.webapp.WebAppContext.stopContext(WebAppContext.java:1328)
	at Jenkins Main ClassLoader//org.eclipse.jetty.ee9.nested.ContextHandler.doStopInContext(ContextHandler.java:745)
	at Jenkins Main ClassLoader//org.eclipse.jetty.server.handler.ContextHandler$ScopedContext.call(ContextHandler.java:1450)
	at Jenkins Main ClassLoader//org.eclipse.jetty.ee9.nested.ContextHandler.doStop(ContextHandler.java:738)
	at Jenkins Main ClassLoader//org.eclipse.jetty.ee9.servlet.ServletContextHandler.doStop(ServletContextHandler.java:284)
	at Jenkins Main ClassLoader//org.eclipse.jetty.util.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:132)
	at Jenkins Main ClassLoader//org.eclipse.jetty.util.component.ContainerLifeCycle.stop(ContainerLifeCycle.java:180)
	at Jenkins Main ClassLoader//org.eclipse.jetty.util.component.ContainerLifeCycle.doStop(ContainerLifeCycle.java:202)
	at Jenkins Main ClassLoader//org.eclipse.jetty.server.Handler$Abstract.doStop(Handler.java:499)
	at Jenkins Main ClassLoader//org.eclipse.jetty.server.handler.ContextHandler.lambda$doStop$1(ContextHandler.java:805)
	at Jenkins Main ClassLoader//org.eclipse.jetty.server.handler.ContextHandler$ScopedContext.call(ContextHandler.java:1456)
	at Jenkins Main ClassLoader//org.eclipse.jetty.server.handler.ContextHandler.doStop(ContextHandler.java:805)
	at Jenkins Main ClassLoader//org.eclipse.jetty.ee9.nested.ContextHandler$CoreContextHandler.doStop(ContextHandler.java:2775)
	at Jenkins Main ClassLoader//org.eclipse.jetty.util.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:132)
	at Jenkins Main ClassLoader//org.eclipse.jetty.util.component.ContainerLifeCycle.stop(ContainerLifeCycle.java:180)
	at Jenkins Main ClassLoader//org.eclipse.jetty.util.component.ContainerLifeCycle.doStop(ContainerLifeCycle.java:202)
	at Jenkins Main ClassLoader//org.eclipse.jetty.server.Handler$Abstract.doStop(Handler.java:499)
	at Jenkins Main ClassLoader//org.eclipse.jetty.server.handler.gzip.GzipHandler.doStop(GzipHandler.java:138)
	at Jenkins Main ClassLoader//org.eclipse.jetty.util.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:132)
	at Jenkins Main ClassLoader//org.eclipse.jetty.util.component.ContainerLifeCycle.stop(ContainerLifeCycle.java:180)
	at Jenkins Main ClassLoader//org.eclipse.jetty.util.component.ContainerLifeCycle.doStop(ContainerLifeCycle.java:202)
	at Jenkins Main ClassLoader//org.eclipse.jetty.server.Handler$Abstract.doStop(Handler.java:499)
	at Jenkins Main ClassLoader//org.eclipse.jetty.server.Server.doStop(Server.java:688)
	at Jenkins Main ClassLoader//org.eclipse.jetty.util.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:132)
	at Jenkins Main ClassLoader//winstone.Launcher.shutdown(Launcher.java:436)
	at Jenkins Main ClassLoader//winstone.ShutdownHook.run(ShutdownHook.java:28)
2025-06-17 13:24:50.321+0000 [id=23]	SEVERE	hudson.util.BootFailure#publish: Failed to initialize Jenkins
java.lang.InterruptedException
	at java.base/java.lang.Object.wait(Native Method)
	at java.base/java.lang.Object.wait(Object.java:338)
	at org.jvnet.hudson.reactor.Reactor.execute(Reactor.java:288)
	at jenkins.InitReactorRunner.run(InitReactorRunner.java:49)
	at jenkins.model.Jenkins.executeReactor(Jenkins.java:1179)
	at jenkins.model.Jenkins.<init>(Jenkins.java:978)
	at hudson.model.Hudson.<init>(Hudson.java:102)
	at hudson.model.Hudson.<init>(Hudson.java:87)
	at hudson.WebAppMain$3.run(WebAppMain.java:249)
Caused: hudson.util.HudsonFailedToLoad
	at hudson.WebAppMain$3.run(WebAppMain.java:277)
2025-06-17 13:24:50.324+0000 [id=23]	SEVERE	h.i.i.InstallUncaughtExceptionHandler$DefaultUncaughtExceptionHandler#uncaughtException: A thread (Jenkins initialization thread/23) died unexpectedly due to an uncaught exception. This may leave your server corrupted and usually indicates a software bug.
java.lang.ClassNotFoundException: groovy.lang.ExpandoMetaClassCreationHandle
	at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:445)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:592)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:525)
	at Jenkins Main ClassLoader//org.eclipse.jetty.ee9.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:474)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:525)
Caused: java.lang.NoClassDefFoundError: groovy/lang/ExpandoMetaClassCreationHandle
	at org.codehaus.groovy.reflection.ClassInfo.isValidWeakMetaClass(ClassInfo.java:309)
	at org.codehaus.groovy.reflection.ClassInfo.isValidWeakMetaClass(ClassInfo.java:300)
	at org.codehaus.groovy.reflection.ClassInfo.getMetaClassForClass(ClassInfo.java:270)
	at org.codehaus.groovy.reflection.ClassInfo.getMetaClass(ClassInfo.java:326)
	at org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl.getMetaClass(MetaClassRegistryImpl.java:277)
	at org.codehaus.groovy.runtime.InvokerHelper.getMetaClass(InvokerHelper.java:905)
	at groovy.lang.GroovyObjectSupport.getDefaultMetaClass(GroovyObjectSupport.java:61)
	at groovy.lang.GroovyObjectSupport.<init>(GroovyObjectSupport.java:34)
	at groovy.lang.Binding.<init>(Binding.java:35)
	at jenkins.util.groovy.GroovyHookScript.<init>(GroovyHookScript.java:48)
	at hudson.util.BootFailure.publish(BootFailure.java:49)
	at hudson.WebAppMain$3.run(WebAppMain.java:277)
  1. Startup timeout parameter set is #TimeoutStartSec=90 in service file.
  2. I tried with changin jenkins home directory, renaming plugins folder to see if any corrupted files with plugins, changing setenforce in server between “permissive/enforcing” but no luck.
  3. I am looking for the reason for this error and ways to resolve this?

It looks like Jenkins is having trouble starting because it can’t find a key Groovy class:
java.lang.ClassNotFoundException: groovy.lang.ExpandoMetaClassCreationHandle

This usually points to a problem with the Groovy libraries Jenkins depends on, possibly something missing or corrupted in your installation.


:magnifying_glass_tilted_left: What Might Be Happening

Jenkins needs certain Groovy JAR files at startup, and if they’re missing (or incomplete), you’ll often see errors like this. Something likely went wrong with the installation, or maybe the cache is in a weird state.


:toolbox: A Few Things You Could Try

1. Double-check the Groovy libraries
You might want to take a quick look inside the Jenkins installation to see if the Groovy JARs are there:

  • Common paths include /usr/lib/jenkins/jenkins.war or /var/cache/jenkins/war/WEB-INF/lib
  • Look for files like groovy-*.jar
    If they’re missing or suspiciously small, that could be the issue.

2. Try a fresh reinstall of Jenkins
Sometimes it’s easier to just reinstall Jenkins to make sure everything is clean: :man_shrugging:

sudo systemctl stop jenkins
sudo yum remove jenkins
sudo wget -O /etc/yum.repos.d/jenkins.repo \
    https://pkg.jenkins.io/redhat-stable/jenkins.repo
sudo rpm --import https://pkg.jenkins.io/redhat-stable/jenkins.io-2023.key
sudo yum upgrade
# Add required dependencies for the jenkins package
sudo yum install fontconfig java-21-openjdk
sudo yum install jenkins

3. Clear Jenkins’ cached files
Even after reinstalling, old cached files can cause issues. It might help to delete the exploded war cache:

sudo rm -rf /var/cache/jenkins/war

4. Permissions check
It’s also worth checking that the Jenkins user has read access to everything under /usr/lib/jenkins and /var/cache/jenkins. Sometimes this can trip things up silently.

5. Start Jenkins again and watch the logs

sudo systemctl daemon-reload
sudo systemctl start jenkins
journalctl -u jenkins -f

:white_check_mark: In Short…

This kind of error usually clears up after reinstalling Jenkins and removing the cached war directory. If the problem sticks around, it might be worth double-checking for any custom plugins or scripts that could be affecting the classpath.