# "Cannot run program "nohup"" on RedHat Jenkins Agents

**URL:** <https://community.jenkins.io/t/cannot-run-program-nohup-on-redhat-jenkins-agents/14911>\
**Category:** Ask a question\
**Created:** [May 7, 2024, 3:16pm UTC](https://community.jenkins.io/t/cannot-run-program-nohup-on-redhat-jenkins-agents/14911 "2024-05-07T15:16:25Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![ryeleo](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/ryeleo/32/8126_2.png) [@ryeleo](https://community.jenkins.io/u/ryeleo)\
**Post date:** [May 7, 2024, 3:16pm UTC](https://community.jenkins.io/t/cannot-run-program-nohup-on-redhat-jenkins-agents/14911/1 "2024-05-07T15:16:25Z")

</div>

Yesterday (May 6), one of my agents failed a build due to, “Cannot run program “nohup””:

```auto
java.io.IOException: Cannot run program "nohup" (in directory "/var/lib/jenkins/workspace/tinker"): error=2, No such file or directory

```

Today, I am digging in, and it is immediately apparent that this issue is occurring on ALL of my agents:

- When a `sh` step is called: Jenkins fails to find “nohup”

> ℹ My agents are running RedHat Enterprise Linux 8 and 9.

Possible cause (or red herring fallacy): I did just update from Java 11 to Java 21 on May 2, 2024.

> Note: Three of my nightly builds ran fine using Java 21 (on May 3rd, 4th, and 5th, at midnight PT).  
> Finally, on May 6th, it began failing.

I will try out using Java 11 again and report back.

Thanks for any help!

## Jenkins setup: Jenkins: 2.452 OS: Linux - 4.18.0-513.9.1.el8\_9.x86\_64 Java: 21.0.2 - Red Hat, Inc. (OpenJDK 64-Bit Server VM)

active-directory:2.35  
ansicolor:1.0.4  
ant:497.v94e7d9fffa\_b\_9  
antisamy-markup-formatter:162.v0e6ec0fcfcf6  
apache-httpcomponents-client-4-api:4.5.14-208.v438351942757  
asm-api:9.7-33.v4d23ef79fcc8  
authentication-tokens:1.53.v1c90fd9191a\_b\_  
basic-branch-build-strategies:81.v05e333931c7d  
blueocean:1.27.11  
blueocean-autofavorite:1.2.5  
blueocean-bitbucket-pipeline:1.27.11  
blueocean-commons:1.27.11  
blueocean-config:1.27.11  
blueocean-core-js:1.27.11  
blueocean-dashboard:1.27.11  
blueocean-display-url:2.4.2  
blueocean-events:1.27.11  
blueocean-git-pipeline:1.27.11  
blueocean-github-pipeline:1.27.11  
blueocean-i18n:1.27.11  
blueocean-jwt:1.27.11  
blueocean-personalization:1.27.11  
blueocean-pipeline-api-impl:1.27.11  
blueocean-pipeline-editor:1.27.11  
blueocean-pipeline-scm-api:1.27.11  
blueocean-rest:1.27.11  
blueocean-rest-impl:1.27.11  
blueocean-web:1.27.11  
bootstrap5-api:5.3.3-1  
bouncycastle-api:2.30.1.77-225.v26ea\_c9455fd9  
branch-api:2.1152.v6f101e97dd77  
build-timeout:1.32  
caffeine-api:3.1.8-133.v17b\_1ff2e0599  
checks-api:2.0.2  
cloudbees-bitbucket-branch-source:883.v041fa\_695e9c2  
cloudbees-folder:6.901.vb\_4c7a\_da\_75da\_3  
command-launcher:107.v773860566e2e  
commons-lang3-api:3.13.0-62.v7d18e55f51e2  
commons-text-api:1.11.0-95.v22a\_d30ee5d36  
configuration-as-code:1775.v810dc950b\_514  
coverage:1.13.0  
credentials:1337.v60b\_d7b\_c7b\_c9f  
credentials-binding:657.v2b\_19db\_7d6e6d  
data-tables-api:2.0.2-1  
display-url-api:2.200.vb\_9327d658781  
docker-commons:439.va\_3cb\_0a\_6a\_fb\_29  
docker-workflow:572.v950f58993843  
durable-task:550.v0930093c4b\_a\_6  
echarts-api:5.5.0-1  
email-ext:2.105  
external-monitor-job:215.v2e88e894db\_f8  
favorite:2.208.v91d65b\_7792a\_c  
font-awesome-api:6.5.1-3  
forensics-api:2.4.0  
git:5.2.1  
git-client:4.7.0  
git-server:114.v068a\_c7cc2574  
github:1.38.0  
github-api:1.318-461.v7a\_c09c9fa\_d63  
github-branch-source:1785.v99802b\_69816c  
gradle:2.10  
gson-api:2.10.1-15.v0d99f670e0a\_7  
handy-uri-templates-2-api:2.1.8-30.v7e777411b\_148  
htmlpublisher:1.33  
instance-identity:185.v303dc7c645f9  
ionicons-api:70.v2959a\_b\_74e3cf  
jackson2-api:2.17.0-379.v02de8ec9f64c  
jakarta-activation-api:2.1.3-1  
jakarta-mail-api:2.1.3-1  
javax-activation-api:1.2.0-6  
javax-mail-api:1.6.2-9  
jaxb:2.3.9-1  
jdk-tool:73.vddf737284550  
jenkins-design-language:1.27.11  
jjwt-api:0.11.5-112.ve82dfb\_224b\_a\_d  
jnr-posix-api:3.1.19-2  
joda-time-api:2.12.7-29.v5a\_b\_e3a\_82269a\_  
jquery3-api:3.7.1-2  
jsch:0.2.16-86.v42e010d9484b\_  
json-api:20240303-41.v94e11e6de726  
json-path-api:2.9.0-58.v62e3e85b\_a\_655  
junit:1265.v65b\_14fa\_f12f0  
ldap:719.vcb\_d039b\_77d0d  
lockable-resources:1246.v28b\_e4cc6fa\_16  
mailer:472.vf7c289a\_4b\_420  
markdown-formatter:167.v8a\_428ca\_49f89  
matrix-auth:3.2.2  
matrix-project:822.824.v14451b\_c0fd42  
mina-sshd-api-common:2.12.1-101.v85b\_e08b\_780dd  
mina-sshd-api-core:2.12.1-101.v85b\_e08b\_780dd  
okhttp-api:4.11.0-172.vda\_da\_1feeb\_c6e  
pam-auth:1.10  
pipeline-build-step:540.vb\_e8849e1a\_b\_d8  
pipeline-github-lib:42.v0739460cda\_c4  
pipeline-graph-analysis:216.vfd8b\_ece330ca\_  
pipeline-groovy-lib:704.vc58b\_8890a\_384  
pipeline-input-step:491.vb\_07d21da\_1a\_fb\_  
pipeline-milestone-step:119.vdfdc43fc3b\_9a\_  
pipeline-model-api:2.2184.v0b\_358b\_953e69  
pipeline-model-definition:2.2184.v0b\_358b\_953e69  
pipeline-model-extensions:2.2184.v0b\_358b\_953e69  
pipeline-rest-api:2.34  
pipeline-stage-step:312.v8cd10304c27a\_  
pipeline-stage-tags-metadata:2.2184.v0b\_358b\_953e69  
pipeline-stage-view:2.34  
plain-credentials:179.vc5cb\_98f6db\_38  
plugin-util-api:4.1.0  
prism-api:1.29.0-13  
pubsub-light:1.18  
pyenv-pipeline:2.1.2  
resource-disposer:0.23  
scm-api:689.v237b\_6d3a\_ef7f  
script-security:1326.vdb\_c154de8669  
snakeyaml-api:2.2-111.vc6598e30cc65  
sse-gateway:1.26  
ssh-agent:346.vda\_a\_c4f2c8e50  
ssh-credentials:334.v7732563deee1  
ssh-slaves:2.948.vb\_8050d697fec  
sshd:3.322.v159e91f6a\_550  
structs:337.v1b\_04ea\_4df7c8  
thinBackup:1.19  
timestamper:1.26  
token-macro:400.v35420b\_922dcb\_  
trilead-api:2.142.v748523a\_76693  
variant:60.v7290fc0eb\_b\_cd  
workflow-aggregator:596.v8c21c963d92d  
workflow-api:1291.v51fd2a\_625da\_7  
workflow-basic-steps:1049.v257a\_e6b\_30fb\_d  
workflow-cps:3894.vd0f0248b\_a\_fc4  
workflow-durable-task-step:1336.v768003e07199  
workflow-job:1400.v7fd111b\_ec82f  
workflow-multibranch:773.vc4fe1378f1d5  
workflow-scm-step:427.v4ca\_6512e7df1  
workflow-step-api:657.v03b\_e8115821b\_  
workflow-support:896.v175a\_a\_9c5b\_78f  
ws-cleanup:0.45

---

<div class="post-metadata">

**Author:** ![ryeleo](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/ryeleo/32/8126_2.png) [@ryeleo](https://community.jenkins.io/u/ryeleo)\
**Post date:** [May 7, 2024, 3:54pm UTC](https://community.jenkins.io/t/cannot-run-program-nohup-on-redhat-jenkins-agents/14911/2 "2024-05-07T15:54:33Z")

</div>

It does look like Java 21 is the issue – changing back to Java 11 fixed the issue!

## (WORKING) Jenkins setup: Jenkins: 2.452 OS: Linux - 4.18.0-513.9.1.el8\_9.x86\_64 Java: 11.0.23 - Red Hat, Inc. (OpenJDK 64-Bit Server VM)

active-directory:2.35  
ansicolor:1.0.4  
ant:497.v94e7d9fffa\_b\_9  
antisamy-markup-formatter:162.v0e6ec0fcfcf6  
apache-httpcomponents-client-4-api:4.5.14-208.v438351942757  
asm-api:9.7-33.v4d23ef79fcc8  
authentication-tokens:1.53.v1c90fd9191a\_b\_  
basic-branch-build-strategies:81.v05e333931c7d  
blueocean:1.27.11  
blueocean-autofavorite:1.2.5  
blueocean-bitbucket-pipeline:1.27.11  
blueocean-commons:1.27.11  
blueocean-config:1.27.11  
blueocean-core-js:1.27.11  
blueocean-dashboard:1.27.11  
blueocean-display-url:2.4.2  
blueocean-events:1.27.11  
blueocean-git-pipeline:1.27.11  
blueocean-github-pipeline:1.27.11  
blueocean-i18n:1.27.11  
blueocean-jwt:1.27.11  
blueocean-personalization:1.27.11  
blueocean-pipeline-api-impl:1.27.11  
blueocean-pipeline-editor:1.27.11  
blueocean-pipeline-scm-api:1.27.11  
blueocean-rest:1.27.11  
blueocean-rest-impl:1.27.11  
blueocean-web:1.27.11  
bootstrap5-api:5.3.3-1  
bouncycastle-api:2.30.1.77-225.v26ea\_c9455fd9  
branch-api:2.1152.v6f101e97dd77  
build-timeout:1.32  
caffeine-api:3.1.8-133.v17b\_1ff2e0599  
checks-api:2.0.2  
cloudbees-bitbucket-branch-source:883.v041fa\_695e9c2  
cloudbees-folder:6.901.vb\_4c7a\_da\_75da\_3  
command-launcher:107.v773860566e2e  
commons-lang3-api:3.13.0-62.v7d18e55f51e2  
commons-text-api:1.11.0-95.v22a\_d30ee5d36  
configuration-as-code:1775.v810dc950b\_514  
coverage:1.13.0  
credentials:1337.v60b\_d7b\_c7b\_c9f  
credentials-binding:657.v2b\_19db\_7d6e6d  
data-tables-api:2.0.2-1  
display-url-api:2.200.vb\_9327d658781  
docker-commons:439.va\_3cb\_0a\_6a\_fb\_29  
docker-workflow:572.v950f58993843  
durable-task:550.v0930093c4b\_a\_6  
echarts-api:5.5.0-1  
email-ext:2.105  
external-monitor-job:215.v2e88e894db\_f8  
favorite:2.208.v91d65b\_7792a\_c  
font-awesome-api:6.5.1-3  
forensics-api:2.4.0  
git:5.2.1  
git-client:4.7.0  
git-server:114.v068a\_c7cc2574  
github:1.38.0  
github-api:1.318-461.v7a\_c09c9fa\_d63  
github-branch-source:1785.v99802b\_69816c  
gradle:2.10  
gson-api:2.10.1-15.v0d99f670e0a\_7  
handy-uri-templates-2-api:2.1.8-30.v7e777411b\_148  
htmlpublisher:1.33  
instance-identity:185.v303dc7c645f9  
ionicons-api:70.v2959a\_b\_74e3cf  
jackson2-api:2.17.0-379.v02de8ec9f64c  
jakarta-activation-api:2.1.3-1  
jakarta-mail-api:2.1.3-1  
javax-activation-api:1.2.0-6  
javax-mail-api:1.6.2-9  
jaxb:2.3.9-1  
jdk-tool:73.vddf737284550  
jenkins-design-language:1.27.11  
jjwt-api:0.11.5-112.ve82dfb\_224b\_a\_d  
jnr-posix-api:3.1.19-2  
joda-time-api:2.12.7-29.v5a\_b\_e3a\_82269a\_  
jquery3-api:3.7.1-2  
jsch:0.2.16-86.v42e010d9484b\_  
json-api:20240303-41.v94e11e6de726  
json-path-api:2.9.0-58.v62e3e85b\_a\_655  
junit:1265.v65b\_14fa\_f12f0  
ldap:719.vcb\_d039b\_77d0d  
lockable-resources:1246.v28b\_e4cc6fa\_16  
mailer:472.vf7c289a\_4b\_420  
markdown-formatter:167.v8a\_428ca\_49f89  
matrix-auth:3.2.2  
matrix-project:822.824.v14451b\_c0fd42  
mina-sshd-api-common:2.12.1-101.v85b\_e08b\_780dd  
mina-sshd-api-core:2.12.1-101.v85b\_e08b\_780dd  
okhttp-api:4.11.0-172.vda\_da\_1feeb\_c6e  
pam-auth:1.10  
pipeline-build-step:540.vb\_e8849e1a\_b\_d8  
pipeline-github-lib:42.v0739460cda\_c4  
pipeline-graph-analysis:216.vfd8b\_ece330ca\_  
pipeline-groovy-lib:704.vc58b\_8890a\_384  
pipeline-input-step:491.vb\_07d21da\_1a\_fb\_  
pipeline-milestone-step:119.vdfdc43fc3b\_9a\_  
pipeline-model-api:2.2184.v0b\_358b\_953e69  
pipeline-model-definition:2.2184.v0b\_358b\_953e69  
pipeline-model-extensions:2.2184.v0b\_358b\_953e69  
pipeline-rest-api:2.34  
pipeline-stage-step:312.v8cd10304c27a\_  
pipeline-stage-tags-metadata:2.2184.v0b\_358b\_953e69  
pipeline-stage-view:2.34  
plain-credentials:179.vc5cb\_98f6db\_38  
plugin-util-api:4.1.0  
prism-api:1.29.0-13  
pubsub-light:1.18  
pyenv-pipeline:2.1.2  
resource-disposer:0.23  
scm-api:689.v237b\_6d3a\_ef7f  
script-security:1326.vdb\_c154de8669  
snakeyaml-api:2.2-111.vc6598e30cc65  
sse-gateway:1.26  
ssh-agent:346.vda\_a\_c4f2c8e50  
ssh-credentials:334.v7732563deee1  
ssh-slaves:2.948.vb\_8050d697fec  
sshd:3.322.v159e91f6a\_550  
structs:337.v1b\_04ea\_4df7c8  
thinBackup:1.19  
timestamper:1.26  
token-macro:400.v35420b\_922dcb\_  
trilead-api:2.142.v748523a\_76693  
variant:60.v7290fc0eb\_b\_cd  
workflow-aggregator:596.v8c21c963d92d  
workflow-api:1291.v51fd2a\_625da\_7  
workflow-basic-steps:1049.v257a\_e6b\_30fb\_d  
workflow-cps:3894.vd0f0248b\_a\_fc4  
workflow-durable-task-step:1336.v768003e07199  
workflow-job:1400.v7fd111b\_ec82f  
workflow-multibranch:773.vc4fe1378f1d5  
workflow-scm-step:427.v4ca\_6512e7df1  
workflow-step-api:657.v03b\_e8115821b\_  
workflow-support:896.v175a\_a\_9c5b\_78f  
ws-cleanup:0.45

---

<div class="post-metadata">

**Author:** ![poddingue](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/poddingue/32/985_2.png) [@poddingue](https://community.jenkins.io/u/poddingue)\
**Post date:** [May 7, 2024, 3:56pm UTC](https://community.jenkins.io/t/cannot-run-program-nohup-on-redhat-jenkins-agents/14911/3 "2024-05-07T15:56:42Z")

</div>

Welcome to this community, @ryeleo, and thanks for the feedback. 👋

Now, the question is: why are you facing this issue with Java 21? 🤔  
Can you run your tests with a [Temurin JDK21](https://adoptium.net/installation/)?

---

<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:** [May 7, 2024, 3:58pm UTC](https://community.jenkins.io/t/cannot-run-program-nohup-on-redhat-jenkins-agents/14911/4 "2024-05-07T15:58:34Z")

</div>

This happens when you run a `sh` step?  
You might want to set  
`org.jenkinsci.plugins.durabletask.BourneShellScript.USE_BINARY_WRAPPER=true` via script console or permanently as a java property in the java command that starts jenkins (`java -Dorg.jenkinsci.plugins.durabletask.BourneShellScript.USE_BINARY_WRAPPER=true ... -jar jenkins.war ...`)

---

<div class="post-metadata">

**Author:** ![ciaconet](https://avatars.discourse-cdn.com/v4/letter/c/8797f3/32.png) [@ciaconet](https://community.jenkins.io/u/ciaconet)\
**Post date:** [July 18, 2024, 1:58pm UTC](https://community.jenkins.io/t/cannot-run-program-nohup-on-redhat-jenkins-agents/14911/5 "2024-07-18T13:58:13Z")

</div>

We also use RHEL8.9 agents with JDK21. We’ve been using this setup without issue for approximately 2 months. We’re on Jenkins 2.463 and have upgraded a couple of times in the last few months. We just started seeing the same error about nohup, but it only appears intermittently. Some builds run without issue, others throw an exception when using `sh`.

Is there any additional information on this issue?

edit: downgrading RHEL8 agents to JDK17 appears to have fixed the issue for us.

---

<div class="post-metadata">

**Author:** ![ciaconet](https://avatars.discourse-cdn.com/v4/letter/c/8797f3/32.png) [@ciaconet](https://community.jenkins.io/u/ciaconet)\
**Post date:** [July 23, 2024, 2:28pm UTC](https://community.jenkins.io/t/cannot-run-program-nohup-on-redhat-jenkins-agents/14911/6 "2024-07-23T14:28:21Z")

</div>

Some additional info, after downgrading to JDK 17 the issue was resolved for approximately one day and then later resurfaced. We use GCP VMs running RHEL8 as Jenkins agents. These are created by Jenkins from an image. The image had JDK version 17.0.11 installed. Jenkins picks up this version of the JDK. dnf-automatic was installed on the VMs, and after about 5 minutes of uptime dnf-automatic was upgrading the JDK version to 17.0.12, but Jenkins already read the version as 17.0.11. Removing dnf-automatic so the JDK version remains at 17.0.11 appears to have fixed the problem

---

<div class="post-metadata">

**Author:** ![philfry](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/philfry/32/9292_2.png) [@philfry](https://community.jenkins.io/u/philfry)\
**Post date:** [July 25, 2024, 6:11am UTC](https://community.jenkins.io/t/cannot-run-program-nohup-on-redhat-jenkins-agents/14911/7 "2024-07-25T06:11:42Z")

</div>

Hi, same here, rhel8 and rhel9.  
With JDK 17.0.12 all my pipelines break with nohup not being able to run, while 17.0.11 works fine.  
Is that more a java or a jenkins issue? Or even a security policy thingy?

---

<div class="post-metadata">

**Author:** ![ryeleo](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/ryeleo/32/8126_2.png) [@ryeleo](https://community.jenkins.io/u/ryeleo)\
**Post date:** [August 7, 2024, 5:46pm UTC](https://community.jenkins.io/t/cannot-run-program-nohup-on-redhat-jenkins-agents/14911/8 "2024-08-07T17:46:10Z")

</div>

Thanks for the advice! This does maybe seem to get me past the ‘nohup’ issue, but I am now running into similar issues:

Contxt: I re-upgraded to 21 around July 2nd. For a month, all seemed well. However, yesterday, I am starting to see issues with Java 21 not finding executables again! Specifically, this morning I am seeing that Jenkins is unable to find the following executables so far:

- nohup
- cp
- python3.11

I was surprised that `org.jenkinsci.plugins.durabletask.BourneShellScript.USE_BINARY_WRAPPER=true` did seem to get me past the `nohup` issue, but now I am running into issues with `cp` and `python3.11` being unavailable (but they certainly are available. I’ve confirmed the `jenkins` user can indeed run `cp` and `python3.11` on my agents.)

---

<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:** [August 7, 2024, 6:13pm UTC](https://community.jenkins.io/t/cannot-run-program-nohup-on-redhat-jenkins-agents/14911/9 "2024-08-07T18:13:02Z")

</div>

Do you have by chance automatic updates enabled for java in your package manager and java was updated but your agents were not restarted?  
See 2 comments above from @ciaconet

---

<div class="post-metadata">

**Author:** ![ryeleo](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/ryeleo/32/8126_2.png) [@ryeleo](https://community.jenkins.io/u/ryeleo)\
**Post date:** [August 7, 2024, 6:17pm UTC](https://community.jenkins.io/t/cannot-run-program-nohup-on-redhat-jenkins-agents/14911/10 "2024-08-07T18:17:23Z")

</div>

There is a chance that it has something to do with java being updated automatically via our patching process. I can look more into this.

I will try restarting my Jenkins Controller entirely, which I believe should have the effect of restarting all of the agents as well.

Note: I am debugging this and it seems that even the most simple pipeline is failing to run due to:  
`Caused: java.io.IOException: Cannot run program "/var/lib/jenkins/caches/durable-task/durable_task_monitor_555.v6802fe0f0b_82_linux_64" (in directory "/var/lib/jenkins/workspace/tinker"): error=2, No such file or directory"`

---

<div class="post-metadata">

**Author:** ![ryeleo](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/ryeleo/32/8126_2.png) [@ryeleo](https://community.jenkins.io/u/ryeleo)\
**Post date:** [August 7, 2024, 6:26pm UTC](https://community.jenkins.io/t/cannot-run-program-nohup-on-redhat-jenkins-agents/14911/11 "2024-08-07T18:26:15Z")

</div>

Restarting my Jenkins Controller using does seem to have fixed my issues this morning for most of my pipelines. 😵

---

<div class="post-metadata">

**Author:** ![ryeleo](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/ryeleo/32/8126_2.png) [@ryeleo](https://community.jenkins.io/u/ryeleo)\
**Post date:** [August 7, 2024, 6:33pm UTC](https://community.jenkins.io/t/cannot-run-program-nohup-on-redhat-jenkins-agents/14911/12 "2024-08-07T18:33:54Z")

</div>

Per @mawinter69, I checked if Java 21 was recently updated. It does indeed seem that it was which does correspond to the issues I’ve been seeing most recently!

```auto
$ yum history | head
Not root, Subscription Management repositories not updated
ID | Command line | Date and time | Action(s) | Altered
------------------------------------------------------------------------------------------------
... trimmed for brevity...
142 | -d 0 -e 1 -y upgrade java-21-openjdk | 2024-08-06 02:02 | Upgrade | 2   
... trimmed for brevity...

```

---

<div class="post-metadata">

**Author:** ![StardustOne](https://avatars.discourse-cdn.com/v4/letter/s/46a35a/32.png) [@StardustOne](https://community.jenkins.io/u/StardustOne)\
**Post date:** [March 28, 2025, 3:02pm UTC](https://community.jenkins.io/t/cannot-run-program-nohup-on-redhat-jenkins-agents/14911/13 "2025-03-28T15:02:38Z")

</div>

In my case, this error was caused because of the wrong java PATH (typo).  
You can test a freestyle job on the same node you have an issue. It was failing running  
java --version  
The wrong PATH was set in /etc/systemd/system/jenkins.service.d/override.conf  
But it can be in /etc/default/jenkins too.  
Fixed the PATH, now, no more this specific error after restart of Jenkins.  
My distro is Debian FYI.
