# Jenkins fails with java-21-openjdk-headless

**URL:** <https://community.jenkins.io/t/jenkins-fails-with-java-21-openjdk-headless/36160>\
**Category:** Using Jenkins\
**Created:** [February 10, 2026, 5:22am UTC](https://community.jenkins.io/t/jenkins-fails-with-java-21-openjdk-headless/36160 "2026-02-10T05:22:02Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Maxdegraaf](https://avatars.discourse-cdn.com/v4/letter/m/f1d935/32.png) [@Maxdegraaf](https://community.jenkins.io/u/Maxdegraaf)\
**Post date:** [February 10, 2026, 5:22am UTC](https://community.jenkins.io/t/jenkins-fails-with-java-21-openjdk-headless/36160/1 "2026-02-10T05:22:02Z")

</div>

Probably not a bug, but i can’t find the problem. We were running java-17-openjdk-headless on RHEL8 with Jenkins version 2.543. Installed java-21-openjdk-headless and switched the default java version.

So far so good:  
java --version  
openjdk 21.0.9 2025-10-21 LTS  
OpenJDK Runtime Environment (Red\_Hat-21.0.9.0.10-1) (build 21.0.9+10-LTS)  
OpenJDK 64-Bit Server VM (Red\_Hat-21.0.9.0.10-1) (build 21.0.9+10-LTS, mixed mode, sharing)

systemctl restart jenkins  
Job for jenkins.service failed because the control process exited with error code.  
See “systemctl status jenkins.service” and “journalctl -xe” for details.

systemctl status jenkins.service  
● jenkins.service - Jenkins Continuous Integration Server  
Loaded: loaded (/etc/systemd/system/jenkins.service; enabled; vendor preset: disabled)  
Drop-In: /etc/systemd/system/jenkins.service.d  
└─override.conf  
Active: failed (Result: exit-code) since Mon 2026-02-09 20:22:57 CET; 18s ago  
Process: 1782170 ExecStart=/usr/bin/jenkins (code=exited, status=1/FAILURE)  
Main PID: 1782170 (code=exited, status=1/FAILURE)

systemd[1]: jenkins.service: Service RestartSec=100ms expired, scheduling restart.  
systemd[1]: jenkins.service: Scheduled restart job, restart counter is at 5.  
systemd[1]: Stopped Jenkins Continuous Integration Server.  
systemd[1]: jenkins.service: Start request repeated too quickly.  
systemd[1]: jenkins.service: Failed with result ‘exit-code’.  
systemd[1]: Failed to start Jenkins Continuous Integration Server.

Running journalctl -xe doesn’t give anything.

Any help or advice would be most welcome.

Jenkins setup:Jenkins: 2.543  
OS: Linux - 4.18.0-553.92.1.el8\_10.x86\_64  
Java: 17.0.17 - Red Hat, Inc. (OpenJDK 64-Bit Server VM)

Office-365-Connector:5.2.0  
active-directory:2.41  
allure-jenkins-plugin:2.34.0  
ansicolor:1.0.6  
ant:520.vd082ecfb\_16a\_9  
antisamy-markup-formatter:173.v680e3a\_b\_69ff3  
apache-httpcomponents-client-4-api:4.5.14-269.vfa\_2321039a\_83  
apache-httpcomponents-client-5-api:5.6-183.ve5a\_8a\_b\_e71e59  
asm-api:9.9.1-189.vb\_5ef2964da\_91  
atlassian-bitbucket-server-integration:5.0.0  
authentication-tokens:1.144.v5ff4a\_5ec5c33  
bitbucket-build-status-notifier:1.4.2  
blueocean:1.27.25  
blueocean-autofavorite:1.2.5  
blueocean-bitbucket-pipeline:1.27.25  
blueocean-commons:1.27.25  
blueocean-config:1.27.25  
blueocean-core-js:1.27.25  
blueocean-dashboard:1.27.25  
blueocean-display-url:2.4.4  
blueocean-events:1.27.25  
blueocean-git-pipeline:1.27.25  
blueocean-github-pipeline:1.27.25  
blueocean-i18n:1.27.25  
blueocean-jira:1.27.25  
blueocean-jwt:1.27.25  
blueocean-personalization:1.27.25  
blueocean-pipeline-api-impl:1.27.25  
blueocean-pipeline-editor:1.27.25  
blueocean-pipeline-scm-api:1.27.25  
blueocean-rest:1.27.25  
blueocean-rest-impl:1.27.25  
blueocean-web:1.27.25  
bootstrap5-api:5.3.8-895.v4d0d8e47fea\_d  
bouncycastle-api:2.30.1.82-277.v70ca\_0b\_877184  
branch-api:2.1268.v044a\_87612da\_8  
build-name-setter:2.5.1  
build-timeout:1.38  
build-user-vars-plugin:212.vd6b\_e9f6d0cdb\_  
caffeine-api:3.2.3-194.v31a\_b\_f7a\_b\_5a\_81  
checks-api:373.vfe7645102093  
cloudbees-bitbucket-branch-source:937.2.3  
cloudbees-folder:6.1073.va\_7888eb\_dd514  
command-launcher:123.v37cfdc92ef67  
commons-collections4-api:4.5.0-8.va\_d5448ef9011  
commons-compress-api:1.28.0-2  
commons-httpclient3-api:3.1-3  
commons-lang3-api:3.20.0-109.ve43756e2d2b\_4  
commons-text-api:1.15.0-210.v7480a\_da\_70b\_9e  
conditional-buildstep:1.5.0  
config-file-provider:1006.vc7366c201f57  
coverage:2.3060.v035a\_5557cdb\_c  
credentials:1453.v9b\_a\_29777a\_b\_fd  
credentials-binding:702.vfe613e537e88  
dashboard-view:2.543.vca\_9da\_3cb\_9c60  
data-tables-api:2.3.5-1497.v38449eb\_7d5a\_1  
dependency-check-jenkins-plugin:5.6.2  
dependency-track:6.0.2  
display-url-api:2.217.va\_6b\_de84cc74b\_  
docker-commons:457.v0f62a\_94f11a\_3  
docker-workflow:634.vedc7242b\_eda\_7  
durable-task:639.vefb\_3d8372f6d  
echarts-api:6.0.0-1165.vd1283a\_3e37d4  
eddsa-api:0.3.0.1-19.vc432d923e5ee  
email-ext:1933.v45cec755423f  
extended-read-permission:68.vd270568a\_7520  
external-monitor-job:223.vb\_fddcf42c9b\_3  
extra-columns:1.28  
favorite:2.253.v9b\_413168133b\_  
font-awesome-api:7.1.0-882.v1dfb\_771e3278  
forensics-api:3.1772.v99ca\_3d83b\_9fa\_  
git:5.8.1  
git-client:6.5.0  
git-server:137.ve0060b\_432302  
github:1.45.0  
github-api:1.330-492.v3941a\_032db\_2a\_  
github-branch-source:1925.v62fb\_7ffb\_08ce  
github-pullrequest:0.7.3  
gradle:2.18.1203.v2c96b\_1243c72  
gson-api:2.13.2-173.va\_a\_092315913c  
handy-uri-templates-2-api:2.1.8-38.vcea\_5d521d5f3  
htmlpublisher:427  
http\_request:1.24  
instance-identity:203.v15e81a\_1b\_7a\_38  
ionicons-api:94.vcc3065403257  
jackson2-api:2.20.1-423.v13951f6b\_6532  
jakarta-activation-api:2.1.4-1  
jakarta-mail-api:2.1.5-1  
jakarta-xml-bind-api:4.0.6-10.v9b\_7e1d1fc40b\_  
javadoc:354.vee1a\_660b\_4990  
javax-activation-api:1.2.0-8  
javax-mail-api:1.6.2-11  
jaxb:2.3.9-133.vb\_ec76a\_73f706  
jdk-tool:83.v417146707a\_3d  
jenkins-design-language:1.27.25  
jersey2-api:2.47-165.ve7809a\_3e87e0  
jira:3.21  
jjwt-api:0.11.5-120.v0268cf544b\_89  
job-import-plugin:122.v35289550f1e6  
jobConfigHistory:1356.ve360da\_6c523a\_  
joda-time-api:2.14.0-149.v1c3ce991d1b\_9  
jquery:1.12.4-3  
jquery3-api:3.7.1-619.vdb\_10e002501a\_  
jsch:0.2.16-95.v3eecb\_55fa\_b\_78  
json-api:20251224-185.v0cc18490c62c  
json-path-api:2.10.0-202.va\_9cc16c1e476  
jsoup:1.21.2-66.v6ea\_38164b\_8a\_2  
junit:1380.v491ff054cd35  
ldap:793.v754d6b\_41b\_ea\_4  
mailer:525.v2458b\_d8a\_1a\_71  
mapdb-api:1.0.9-44.va\_1e1310c9118  
mask-passwords:212.v4967a\_a\_73b\_506  
matrix-auth:3.2.9  
matrix-project:870.v9db\_fcfc2f45b\_  
maven-plugin:3.27  
mercurial:1323.ve69d2a\_db\_8a\_b\_d  
mina-sshd-api-common:2.16.0-167.va\_269f38cc024  
mina-sshd-api-core:2.16.0-167.va\_269f38cc024  
monitoring:2.6.0  
multiple-scms:0.8  
nodejs:1.6.6  
okhttp-api:4.12.0-195.vc02552c04ffd  
oss-symbols-api:424.ved751e062911  
pam-auth:1.12  
parameterized-trigger:873.v8b\_e37dd8418f  
pipeline-build-step:571.v08a\_fffd4b\_0ce  
pipeline-github-lib:65.v203688e7727e  
pipeline-graph-analysis:245.v88f03631a\_b\_21  
pipeline-groovy-lib:787.ve2fef0efdca\_6  
pipeline-input-step:540.v14b\_100d754dd  
pipeline-milestone-step:138.v78ca\_76831a\_43  
pipeline-model-api:2.2277.v00573e73ddf1  
pipeline-model-definition:2.2277.v00573e73ddf1  
pipeline-model-extensions:2.2277.v00573e73ddf1  
pipeline-rest-api:2.38  
pipeline-stage-step:322.vecffa\_99f371c  
pipeline-stage-tags-metadata:2.2277.v00573e73ddf1  
pipeline-stage-view:2.38  
pipeline-utility-steps:2.20.0  
plain-credentials:199.v9f8e1f741799  
plugin-util-api:6.1192.v30fe6e2837ff  
prism-api:1.30.0-630.va\_e19d17f83b\_0  
pubsub-light:1.19  
rebuild:338.va\_0a\_b\_50e29397  
resource-disposer:0.25  
robot:6.2.0  
role-strategy:848.va\_a\_ea\_673cf0b\_c  
run-condition:243.v3c3f94e46a\_8b\_  
saml:4.590.v6170b\_1013da\_f  
scm-api:724.v7d839074eb\_5c  
script-security:1385.v7d2d9ec4d909  
snakeyaml-api:2.5-143.v93b\_c004f89de  
snyk-security-scanner:5.0.1  
sonar:2.18.2  
sse-gateway:1.28  
ssh-credentials:361.vb\_f6760818e8c  
ssh-slaves:3.1085.vc64d040efa\_85  
sshd:3.374.v19b\_d59ce6610  
strict-crumb-issuer:2.1.1  
structs:362.va\_b\_695ef4fdf9  
subversion:1292.ve8cf25770ee3  
timestamper:1.30  
token-macro:477.vd4f0dc3cb\_cf1  
trilead-api:2.284.v1974ea\_324382  
variant:70.va\_d9f17f859e0  
workflow-aggregator:608.v67378e9d3db\_1  
workflow-api:1398.v67030756d3fb\_  
workflow-basic-steps:1098.v808b\_fd7f8cf4  
workflow-cps:4238.va\_6fb\_65c1f699  
workflow-durable-task-step:1464.v2d3f5c68f84c  
workflow-job:1559.va\_a\_533730b\_ea\_d  
workflow-multibranch:821.vc3b\_4ea\_780798  
workflow-scm-step:466.va\_d69e602552b\_  
workflow-step-api:710.v3e456cc85233  
workflow-support:1010.vb\_b\_39488a\_9841  
ws-cleanup:0.49

---

<div class="post-metadata">

**Author:** ![panicking](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/panicking/32/22039_2.png) [@panicking](https://community.jenkins.io/u/panicking)\
**Post date:** [February 10, 2026, 6:59am UTC](https://community.jenkins.io/t/jenkins-fails-with-java-21-openjdk-headless/36160/2 "2026-02-10T06:59:46Z")

</div>

Never get something like this, but could be that does not found java in the path? Anyway a service run some steps so you can do it manually and check. Have seen anything in syslog or jenkins.log?

---

<div class="post-metadata">

**Author:** ![Maxdegraaf](https://avatars.discourse-cdn.com/v4/letter/m/f1d935/32.png) [@Maxdegraaf](https://community.jenkins.io/u/Maxdegraaf)\
**Post date:** [February 10, 2026, 7:41am UTC](https://community.jenkins.io/t/jenkins-fails-with-java-21-openjdk-headless/36160/3 "2026-02-10T07:41:25Z")

</div>

> [@Maxdegraaf](#):
>
> java --version  
> openjdk 21.0.9 2025-10-21 LTS  
> OpenJDK Runtime Environment (Red\_Hat-21.0.9.0.10-1) (build 21.0.9+10-LTS)  
> OpenJDK 64-Bit Server VM (Red\_Hat-21.0.9.0.10-1) (build 21.0.9+10-LTS, mixed mode, sharing)

Switching to the account running jenkins with su and running java --version gives:  
openjdk 21.0.9 2025-10-21 LTS  
OpenJDK Runtime Environment (Red\_Hat-21.0.9.0.10-1) (build 21.0.9+10-LTS)  
OpenJDK 64-Bit Server VM (Red\_Hat-21.0.9.0.10-1) (build 21.0.9+10-LTS, mixed mode, sharing)

The path doesn’t change as its a link to /usr/bin/java.

When trying to start jenkins with openjdk 21 nothing was written in the jenkins log. Any advice on how to troubleshoot this are very welcome.

---

<div class="post-metadata">

**Author:** ![Maxdegraaf](https://avatars.discourse-cdn.com/v4/letter/m/f1d935/32.png) [@Maxdegraaf](https://community.jenkins.io/u/Maxdegraaf)\
**Post date:** [February 10, 2026, 8:17am UTC](https://community.jenkins.io/t/jenkins-fails-with-java-21-openjdk-headless/36160/4 "2026-02-10T08:17:30Z")

</div>

> [@Maxdegraaf](#):
>
> jenkins.service: Start request repeated too quickly

Here the error and its confusing:

– Unit jenkins.service has begun starting up.  
Feb 09 20:25:43 XXXXXX jenkins[1783717]: jenkins: invalid Java version: openjdk version “21.0.9” 2025-10-21 LTS  
Feb 09 20:25:43 XXXXXX jenkins[1783717]: OpenJDK Runtime Environment (Red\_Hat-21.0.9.0.10-1) (build 21.0.9+10-LTS)  
Feb 09 20:25:43 XXXXXX jenkins[1783717]: OpenJDK 64-Bit Server VM (Red\_Hat-21.0.9.0.10-1) (build 21.0.9+10-LTS, mixed mode, sharing)  
Feb 09 20:25:43 XXXXXX systemd[1]: jenkins.service: Main process exited, code=exited, status=1/FAILURE  
Feb 09 20:25:43 XXXXXX systemd[1]: jenkins.service: Failed with result ‘exit-code’.

To the best of my knowledge that version is supported.

---

<div class="post-metadata">

**Author:** ![Maxdegraaf](https://avatars.discourse-cdn.com/v4/letter/m/f1d935/32.png) [@Maxdegraaf](https://community.jenkins.io/u/Maxdegraaf)\
**Post date:** [February 10, 2026, 9:34am UTC](https://community.jenkins.io/t/jenkins-fails-with-java-21-openjdk-headless/36160/5 "2026-02-10T09:34:11Z")

</div>

I think i found the problem. This is the check i found in /usr/bin/jenkins, this functions checks the java version:  
check\_java\_version() {  
printf ‘%s’ “${JENKINS\_OPTS}” | grep -q ‘–enable-future-java’ && return 0

```auto
    java_version=$("${JENKINS_JAVA_CMD}" -version 2>&1 |
            sed -n ';s/.* version "\([0-9]\{2,\}\|[0-9]\.[0-9]\)\..*".*/\1/p;')

    if [-z "${java_version}"]; then
            return 1
    elif ["${java_version}" != "17"] && ["${java_version}" != "11"]; then
            return 1
    else
            return 0
    fi

```

}

It only supports 17 or 11.

---

<div class="post-metadata">

**Author:** ![mawinter69](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/mawinter69/32/1625_2.png) [@mawinter69](https://community.jenkins.io/u/mawinter69)\
**Post date:** [February 10, 2026, 11:27am UTC](https://community.jenkins.io/t/jenkins-fails-with-java-21-openjdk-headless/36160/6 "2026-02-10T11:27:29Z")

</div>

Did you install Jenkins via package manager initially? And have you updated Jenkins also via the package manager? Or did you upgrade Jenkins just by updating the war file directly?

---

<div class="post-metadata">

**Author:** ![Maxdegraaf](https://avatars.discourse-cdn.com/v4/letter/m/f1d935/32.png) [@Maxdegraaf](https://community.jenkins.io/u/Maxdegraaf)\
**Post date:** [February 10, 2026, 1:12pm UTC](https://community.jenkins.io/t/jenkins-fails-with-java-21-openjdk-headless/36160/7 "2026-02-10T13:12:37Z")

</div>

Initially via the package manager. After that by just updating the war file as the package manager is running behind.

---

<div class="post-metadata">

**Author:** ![mawinter69](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/mawinter69/32/1625_2.png) [@mawinter69](https://community.jenkins.io/u/mawinter69)\
**Post date:** [February 10, 2026, 1:27pm UTC](https://community.jenkins.io/t/jenkins-fails-with-java-21-openjdk-headless/36160/8 "2026-02-10T13:27:16Z")

</div>

When you update via the package manager then it should update the start script I would say. So now you’re using an old start script with a new Jenkins.

---

<div class="post-metadata">

**Author:** ![Maxdegraaf](https://avatars.discourse-cdn.com/v4/letter/m/f1d935/32.png) [@Maxdegraaf](https://community.jenkins.io/u/Maxdegraaf)\
**Post date:** [February 10, 2026, 1:45pm UTC](https://community.jenkins.io/t/jenkins-fails-with-java-21-openjdk-headless/36160/9 "2026-02-10T13:45:45Z")

</div>

Yes very true. In doubt if i should just fix the script directly or run a 1 time update via the package manager

---

<div class="post-metadata">

**Author:** ![mawinter69](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/mawinter69/32/1625_2.png) [@mawinter69](https://community.jenkins.io/u/mawinter69)\
**Post date:** [February 11, 2026, 4:34pm UTC](https://community.jenkins.io/t/jenkins-fails-with-java-21-openjdk-headless/36160/10 "2026-02-11T16:34:42Z")

</div>

Ideally you always update with the package manager.
