Currently I have this issue within my Jenkins pipeline. Here is the context.
I am setting the Jenkins server in EC2 instance and docker container as an build agent. within this one, I install docker in the same instance with Jenkins and make correct URI, and then it work fine
So I was troubleshooting the pipeline, and after a few run, it showed a weird error that I belive that it not relate to my Jenkinsfile
Here is the error
java.io.IOException: error=2, No such file or directory
at java.base/java.lang.ProcessImpl.forkAndExec(Native Method)
at java.base/java.lang.ProcessImpl.<init>(ProcessImpl.java:295)
at java.base/java.lang.ProcessImpl.start(ProcessImpl.java:225)
at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1126)
Caused: java.io.IOException: Cannot run program "" (in directory "/var/lib/jenkins/caches/git-6640a752d415ebbfb7edbe7711933c7f"): error=2, No such file or directory
at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1170)
at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1089)
at hudson.Proc$LocalProc.<init>(Proc.java:252)
at hudson.Proc$LocalProc.<init>(Proc.java:221)
at hudson.Launcher$LocalLauncher.launch(Launcher.java:995)
at hudson.Launcher$ProcStarter.start(Launcher.java:507)
at PluginClassLoader for git-client//org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2839)
Caused: hudson.plugins.git.GitException: Error performing git command: init /var/lib/jenkins/caches/git-6640a752d415ebbfb7edbe7711933c7f
at PluginClassLoader for git-client//org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2862)
at PluginClassLoader for git-client//org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2771)
at PluginClassLoader for git-client//org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2766)
at PluginClassLoader for git-client//org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:2059)
at PluginClassLoader for git-client//org.jenkinsci.plugins.gitclient.CliGitAPIImpl$5.execute(CliGitAPIImpl.java:1083)
Caused: hudson.plugins.git.GitException: Could not init /var/lib/jenkins/caches/git-6640a752d415ebbfb7edbe7711933c7f
at PluginClassLoader for git-client//org.jenkinsci.plugins.gitclient.CliGitAPIImpl$5.execute(CliGitAPIImpl.java:1085)
at PluginClassLoader for git-client//org.jenkinsci.plugins.gitclient.CliGitAPIImpl.init(CliGitAPIImpl.java:365)
at PluginClassLoader for git-client//hudson.plugins.git.GitAPI.init(GitAPI.java:246)
at PluginClassLoader for git//jenkins.plugins.git.GitSCMFileSystem$BuilderImpl.build(GitSCMFileSystem.java:390)
Caused: java.io.IOException
at PluginClassLoader for git//jenkins.plugins.git.GitSCMFileSystem$BuilderImpl.build(GitSCMFileSystem.java:413)
at PluginClassLoader for scm-api//jenkins.scm.api.SCMFileSystem.of(SCMFileSystem.java:219)
at PluginClassLoader for workflow-cps//org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:120)
at PluginClassLoader for workflow-cps//org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:72)
at PluginClassLoader for workflow-job//org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:317)
at hudson.model.ResourceController.execute(ResourceController.java:101)
at hudson.model.Executor.run(Executor.java:460)
Finished: FAILURE
I check the log in Jenkins.
Aug 12 07:21:03 ip-172-31-3-157.ap-southeast-2.compute.internal jenkins[58196]: INFO: Using /agent.log as an agent error log destination; output log will not be generated
Aug 12 07:21:04 ip-172-31-3-157.ap-southeast-2.compute.internal jenkins[58196]: 2025-08-12 07:21:04.017+0000 [id=2058] INFO i.j.d.c.DockerMultiplexedInputStream#readInternal: stderr from docker-agent-0000jqilwphyn (59848988d0c60865f11483e3a4d937bf21db0f16531cceacf637089725ca98d0): channel started
Aug 12 07:21:12 ip-172-31-3-157.ap-southeast-2.compute.internal jenkins[58196]: 2025-08-12 07:21:12.268+0000 [id=42] INFO hudson.slaves.NodeProvisioner#update: docker-agent (hu1909/docker-agent-template) provisioning successfully completed. We have now 2 computer(s)
Aug 12 07:21:43 ip-172-31-3-157.ap-southeast-2.compute.internal jenkins[58196]: 2025-08-12 07:21:43.535+0000 [id=2051] INFO i.j.docker.DockerTransientNode$1#println: Disconnected computer for node 'docker-agent-0000jqilwphyn'.
Aug 12 07:21:43 ip-172-31-3-157.ap-southeast-2.compute.internal jenkins[58196]: 2025-08-12 07:21:43.558+0000 [id=2051] INFO i.j.docker.DockerTransientNode$1#println: Removed Node for node 'docker-agent-0000jqilwphyn'.
Aug 12 07:21:55 ip-172-31-3-157.ap-southeast-2.compute.internal jenkins[58196]: 2025-08-12 07:21:55.124+0000 [id=2105] INFO i.j.docker.DockerTransientNode$1#println: Stopped container '59848988d0c60865f11483e3a4d937bf21db0f16531cceacf637089725ca98d0' for node 'docker-agent-0000jqilwphyn'.
Aug 12 07:21:55 ip-172-31-3-157.ap-southeast-2.compute.internal jenkins[58196]: 2025-08-12 07:21:55.172+0000 [id=2105] INFO i.j.docker.DockerTransientNode$1#println: Removed container '59848988d0c60865f11483e3a4d937bf21db0f16531cceacf637089725ca98d0' for node 'docker-agent-0000jqilwphyn'.
Aug 12 07:25:54 ip-172-31-3-157.ap-southeast-2.compute.internal jenkins[58196]: 2025-08-12 07:25:54.993+0000 [id=2135] WARNING o.j.p.w.f.FlowExecutionList$DefaultStorage#unregister: terraform-cost-estimation#14 was not in the list to begin with: []
Aug 12 07:28:20 ip-172-31-3-157.ap-southeast-2.compute.internal jenkins[58196]: 2025-08-12 07:28:20.577+0000 [id=2158] INFO i.j.docker.client.DockerAPI$1#entryDroppedFromCache: Dropped connection io.jenkins.docker.client.DockerAPI$SharableDockerClient@1bf7a747 to DockerClientParameters{dockerUri='unix:///var/run/docker.sock', credentialsId='null', readTimeoutInMsOrNull=300000, connectTimeoutInMsOrNull=60000}
Aug 12 07:28:43 ip-172-31-3-157.ap-southeast-2.compute.internal jenkins[58196]: 2025-08-12 07:28:43.379+0000 [id=2160] WARNING o.j.p.w.f.FlowExecutionList$DefaultStorage#unregister: terraform-cost-estimation#15 was not in the list to begin with: []
Aug 12 07:46:14 ip-172-31-3-157.ap-southeast-2.compute.internal jenkins[58196]: 2025-08-12 07:46:14.815+0000 [id=2243] WARNING o.j.p.w.f.FlowExecutionList$DefaultStorage#unregister: terraform-cost-estimation#16 was not in the list to begin with: []
Aug 12 08:37:39 ip-172-31-3-157.ap-southeast-2.compute.internal jenkins[58196]: 2025-08-12 08:37:39.562+0000 [id=2476] WARNING o.j.p.w.f.FlowExecutionList$DefaultStorage#unregister: terraform-cost-estimation#17 was not in the list to begin with: []
Aug 12 08:43:20 ip-172-31-3-157.ap-southeast-2.compute.internal jenkins[58196]: 2025-08-12 08:43:20.580+0000 [id=2504] INFO i.j.docker.client.DockerAPI$1#entryDroppedFromCache: Dropped connection io.jenkins.docker.client.DockerAPI$SharableDockerClient@138e7d1d to DockerClientParameters{dockerUri='unix:///var/run/docker.sock', credentialsId='null', readTimeoutInMsOrNull=60000, connectTimeoutInMsOrNull=60000}
Aug 12 08:43:20 ip-172-31-3-157.ap-southeast-2.compute.internal jenkins[58196]: 2025-08-12 08:43:20.583+0000 [id=2504] INFO i.j.docker.client.DockerAPI#getOrMakeClient: Cached connection io.jenkins.docker.client.DockerAPI$SharableDockerClient@6a7f6715 to DockerClientParameters{dockerUri='unix:///var/run/docker.sock', credentialsId='null', readTimeoutInMsOrNull=60000, connectTimeoutInMsOrNull=60000}
Aug 12 08:44:54 ip-172-31-3-157.ap-southeast-2.compute.internal jenkins[58196]: 2025-08-12 08:44:54.944+0000 [id=2510] WARNING o.j.p.w.f.FlowExecutionList$DefaultStorage#unregister: terraform-cost-estimation#18 was not in the list to begin with: []
Aug 12 09:00:10 ip-172-31-3-157.ap-southeast-2.compute.internal jenkins[58196]: 2025-08-12 09:00:10.296+0000 [id=2579] WARNING h.n.DiskSpaceMonitorDescriptor#markNodeOfflineOrOnline: Making Built-In Node offline temporarily due to the lack of disk space
Aug 12 09:00:15 ip-172-31-3-157.ap-southeast-2.compute.internal jenkins[58196]: 2025-08-12 09:00:15.275+0000 [id=2583] WARNING j.m.api.Metrics$HealthChecker#execute: Some health checks are reporting as unhealthy: [disk-space : Only 0.890 Gb free on (controller)]
Aug 12 09:16:04 ip-172-31-3-157.ap-southeast-2.compute.internal jenkins[58196]: 2025-08-12 09:16:04.392+0000 [id=2651] WARNING o.j.p.w.f.FlowExecutionList$DefaultStorage#unregister: terraform-cost-estimation#19 was not in the list to begin with: []
Aug 12 09:19:41 ip-172-31-3-157.ap-southeast-2.compute.internal jenkins[58196]: 2025-08-12 09:19:41.899+0000 [id=2681] WARNING o.j.p.w.f.FlowExecutionList$DefaultStorage#unregister: terraform-cost-estimation#20 was not in the list to begin with: []
Aug 12 09:23:03 ip-172-31-3-157.ap-southeast-2.compute.internal systemd[1]: Stopping jenkins.service - Jenkins Continuous Integration Server...
I've noticed in the log is that at which step return above error, it shows this warning WARNING o.j.p.w.f.FlowExecutionList$DefaultStorage#unregister: terraform-cost-estimation#15 was not in the list to begin with: []
I could check in the log and see there are a log that said that "Built-in Node offline due to lack of disk space," but I do the cleanup up in the server, which reduced it to only 47% and also restart the jenkins but did not effect anything
Can you guys help me on this?
Really appreciate for your help. Thank you very much