Re: java.io.IOException: error=2, No such file or directory
guruc...@googlemail.com schrieb am Donnerstag, 7. März 2024 um 10:26:40 UTC+1: Hello, We're facing the problem that jobs are failing with such errors: ... [SLNPBasicMvn] $ mvn clean install findbugs:findbugs pmd:pmd checkstyle:checkstyle Caused: java.io.IOException: Cannot run program "mvn" (in directory "/appdata/sisis/jenkins/workspace/SLNPBasicMvn"): error=2, No such file or directory Looks like a problem with your PATH settings... A jenkins restart fixes the issue without any other changes. There is nothing visible in /var/log/jenkins/jenkins.log. This is with version 2.401.3 on RH 8.9 (Ootpa). Any ideas? matthias -- Matthias Apitz, ✉ gu...@unixarea.de, http://www.unixarea.de/ +49-176-38902045 Public GnuPG key: http://www.unixarea.de/key.pub I am not at war with Russia. Я не воюю с Россией. Ich bin nicht im Krieg mit Russland. -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/4210c962-0084-48a8-8c78-7968d02149edn%40googlegroups.com.
java.io.IOException: error=2, No such file or directory
Hello, We're facing the problem that jobs are failing with such errors: ... [SLNPBasicMvn] $ mvn clean install findbugs:findbugs pmd:pmd checkstyle:checkstyle FATAL: command execution failed 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.(ProcessImpl.java:314) at java.base/java.lang.ProcessImpl.start(ProcessImpl.java:244) at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1110) Caused: java.io.IOException: Cannot run program "mvn" (in directory "/appdata/sisis/jenkins/workspace/SLNPBasicMvn"): error=2, No such file or directory at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1143) at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1073) at hudson.Proc$LocalProc.(Proc.java:254) at hudson.Proc$LocalProc.(Proc.java:223) at hudson.Launcher$LocalLauncher.launch(Launcher.java:997) at hudson.Launcher$ProcStarter.start(Launcher.java:509) at hudson.Launcher$ProcStarter.join(Launcher.java:520) at hudson.tasks.Maven.perform(Maven.java:369) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:818) at hudson.model.Build$BuildExecution.build(Build.java:199) at hudson.model.Build$BuildExecution.doRun(Build.java:164) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:526) at hudson.model.Run.execute(Run.java:1900) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:44) at hudson.model.ResourceController.execute(ResourceController.java:101) at hudson.model.Executor.run(Executor.java:442) Build step 'Invoke top-level Maven targets' marked build as failure [FindBugsPMDCheckStyle] Skipping execution of recorder since overall result is 'FAILURE' Sending e-mails to: g...@oclc.org thomas.glom...@oclc.org clemens.rein...@oclc.org Finished: FAILURE A jenkins restart fixes the issue without any other changes. There is nothing visible in /var/log/jenkins/jenkins.log. This is with version 2.401.3 on RH 8.9 (Ootpa). Any ideas? matthias -- Matthias Apitz, ✉ g...@unixarea.de, http://www.unixarea.de/ +49-176-38902045 Public GnuPG key: http://www.unixarea.de/key.pub I am not at war with Russia. Я не воюю с Россией. Ich bin nicht im Krieg mit Russland. -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/ZemIPOpvaG5bmHw9%40pureos.
Re: java.io.IOException: error=2, No such file or directory - Error
IIRC this is because you do not have Docker CLI installed on the Jenkins controller. El martes, 22 de junio de 2021 a las 16:38:16 UTC+2, gangaia...@gmail.com escribió: > Hi All, > > Hope everyone are doing fine. > > We are migrating from bamboo to Jenkins and finding some hurdles during > this process. > > We are trying to create agent which uses docker image and start building > our job inside the container. PFB code snippet we used > > agent { > docker { > image 'maven:3.8.1-adoptopenjdk-11' > } > } > > In the above scenario we faced "docker command not found" error and > changed to below snippet. > > agent { > docker { > image 'myregistry.com/node' > registryUrl 'https://myregistry.com/' > registryCredentialsId 'myPredefinedCredentialsInJenkins' > } > } > > While when the above snippet is executed we are getting below error. > > [2021-06-22T10:43:46.706Z] Running on main-0mzqv in > /home/jenkins/agent/workspace/abcd/custom_image > [2021-06-22T10:43:46.711Z] [Pipeline] { > [2021-06-22T10:43:47.164Z] [Pipeline] withEnv > [2021-06-22T10:43:47.169Z] [Pipeline] { > [2021-06-22T10:43:47.204Z] [Pipeline] withDockerRegistry > [2021-06-22T10:43:47.636Z] $ docker login -u abcd -p > https://docker-url > [2021-06-22T10:43:47.707Z] [Pipeline] // withDockerRegistry > [2021-06-22T10:43:47.739Z] [Pipeline] } > [2021-06-22T10:43:47.783Z] [Pipeline] // withEnv > [2021-06-22T10:43:47.800Z] [Pipeline] } > [2021-06-22T10:43:47.830Z] [Pipeline] // node > [2021-06-22T10:43:47.866Z] [Pipeline] End of Pipeline > [2021-06-22T10:43:55.117Z] java.io.IOException: error=2, No such file or > directory > [2021-06-22T10:43:55.117Z] at java.lang.UNIXProcess.forkAndExec(Native > Method) > [2021-06-22T10:43:55.117Z] at > java.lang.UNIXProcess.(UNIXProcess.java:247) > [2021-06-22T10:43:55.117Z] at > java.lang.ProcessImpl.start(ProcessImpl.java:134) > [2021-06-22T10:43:55.117Z] at > java.lang.ProcessBuilder.start(ProcessBuilder.java:1029) > [2021-06-22T10:43:55.117Z] Also: > hudson.remoting.Channel$CallSiteStackTrace: Remote call to JNLP4-connect > connection from.X.X.X:X > [2021-06-22T10:43:55.117Z] at > hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1800) > [2021-06-22T10:43:55.117Z] at > hudson.remoting.UserRequest$ExceptionResponse.retrieve(UserRequest.java:356) > [2021-06-22T10:43:55.118Z] at > hudson.remoting.Channel.call(Channel.java:1001) > [2021-06-22T10:43:55.118Z] at > hudson.Launcher$RemoteLauncher.launch(Launcher.java:1121) > [2021-06-22T10:43:55.118Z] at > hudson.Launcher$ProcStarter.start(Launcher.java:508) > [2021-06-22T10:43:55.118Z] at > hudson.Launcher$ProcStarter.join(Launcher.java:519) > [2021-06-22T10:43:55.118Z] at > org.jenkinsci.plugins.docker.commons.impl.RegistryKeyMaterialFactory.materialize(RegistryKeyMaterialFactory.java:101) > [2021-06-22T10:43:55.118Z] at > org.jenkinsci.plugins.docker.workflow.AbstractEndpointStepExecution2.doStart(AbstractEndpointStepExecution2.java:53) > [2021-06-22T10:43:55.118Z] at > org.jenkinsci.plugins.workflow.steps.GeneralNonBlockingStepExecution.lambda$run$0(GeneralNonBlockingStepExecution.java:77) > [2021-06-22T10:43:55.118Z] at > java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) > [2021-06-22T10:43:55.118Z] at > java.util.concurrent.FutureTask.run(FutureTask.java:266) > [2021-06-22T10:43:55.118Z] at > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) > [2021-06-22T10:43:55.118Z] at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) > [2021-06-22T10:43:55.118Z] Caused: java.io.IOException: Cannot run program > "docker": error=2, No such file or directory > [2021-06-22T10:43:55.118Z] at > java.lang.ProcessBuilder.start(ProcessBuilder.java:1048) > [2021-06-22T10:43:55.118Z] at hudson.Proc$LocalProc.(Proc.java:252) > [2021-06-22T10:43:55.118Z] at hudson.Proc$LocalProc.(Proc.java:221) > [2021-06-22T10:43:55.118Z] at > hudson.Launcher$LocalLauncher.launch(Launcher.java:996) > [2021-06-22T10:43:55.118Z] at > hudson.Launcher$ProcStarter.start(Launcher.java:508) > [2021-06-22T10:43:55.118Z] at > hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:1390) > [2021-06-22T10:43:55.118Z] at > hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:1333) > [2021-06-22T10:43:55.118Z] at > hudson.remoting.UserRequest.perform(UserRequest.java:211) > [2021-06-22T10:43:55.118Z] at > hudson.remoting.UserRequest.perform(UserRequest.java:54) > [2021-06-22T10:43:55.118Z] at > hudson.remoting.Request$2.run(Request.java:376) &g
java.io.IOException: error=2, No such file or directory - Error
Hi All, Hope everyone are doing fine. We are migrating from bamboo to Jenkins and finding some hurdles during this process. We are trying to create agent which uses docker image and start building our job inside the container. PFB code snippet we used agent { docker { image 'maven:3.8.1-adoptopenjdk-11' } } In the above scenario we faced "docker command not found" error and changed to below snippet. agent { docker { image 'myregistry.com/node' registryUrl 'https://myregistry.com/' registryCredentialsId 'myPredefinedCredentialsInJenkins' } } While when the above snippet is executed we are getting below error. [2021-06-22T10:43:46.706Z] Running on main-0mzqv in /home/jenkins/agent/workspace/abcd/custom_image [2021-06-22T10:43:46.711Z] [Pipeline] { [2021-06-22T10:43:47.164Z] [Pipeline] withEnv [2021-06-22T10:43:47.169Z] [Pipeline] { [2021-06-22T10:43:47.204Z] [Pipeline] withDockerRegistry [2021-06-22T10:43:47.636Z] $ docker login -u abcd -p https://docker-url [2021-06-22T10:43:47.707Z] [Pipeline] // withDockerRegistry [2021-06-22T10:43:47.739Z] [Pipeline] } [2021-06-22T10:43:47.783Z] [Pipeline] // withEnv [2021-06-22T10:43:47.800Z] [Pipeline] } [2021-06-22T10:43:47.830Z] [Pipeline] // node [2021-06-22T10:43:47.866Z] [Pipeline] End of Pipeline [2021-06-22T10:43:55.117Z] java.io.IOException: error=2, No such file or directory [2021-06-22T10:43:55.117Z] at java.lang.UNIXProcess.forkAndExec(Native Method) [2021-06-22T10:43:55.117Z] at java.lang.UNIXProcess.(UNIXProcess.java:247) [2021-06-22T10:43:55.117Z] at java.lang.ProcessImpl.start(ProcessImpl.java:134) [2021-06-22T10:43:55.117Z] at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029) [2021-06-22T10:43:55.117Z] Also: hudson.remoting.Channel$CallSiteStackTrace: Remote call to JNLP4-connect connection from.X.X.X:X [2021-06-22T10:43:55.117Z] at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1800) [2021-06-22T10:43:55.117Z] at hudson.remoting.UserRequest$ExceptionResponse.retrieve(UserRequest.java:356) [2021-06-22T10:43:55.118Z] at hudson.remoting.Channel.call(Channel.java:1001) [2021-06-22T10:43:55.118Z] at hudson.Launcher$RemoteLauncher.launch(Launcher.java:1121) [2021-06-22T10:43:55.118Z] at hudson.Launcher$ProcStarter.start(Launcher.java:508) [2021-06-22T10:43:55.118Z] at hudson.Launcher$ProcStarter.join(Launcher.java:519) [2021-06-22T10:43:55.118Z] at org.jenkinsci.plugins.docker.commons.impl.RegistryKeyMaterialFactory.materialize(RegistryKeyMaterialFactory.java:101) [2021-06-22T10:43:55.118Z] at org.jenkinsci.plugins.docker.workflow.AbstractEndpointStepExecution2.doStart(AbstractEndpointStepExecution2.java:53) [2021-06-22T10:43:55.118Z] at org.jenkinsci.plugins.workflow.steps.GeneralNonBlockingStepExecution.lambda$run$0(GeneralNonBlockingStepExecution.java:77) [2021-06-22T10:43:55.118Z] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [2021-06-22T10:43:55.118Z] at java.util.concurrent.FutureTask.run(FutureTask.java:266) [2021-06-22T10:43:55.118Z] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [2021-06-22T10:43:55.118Z] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [2021-06-22T10:43:55.118Z] Caused: java.io.IOException: Cannot run program "docker": error=2, No such file or directory [2021-06-22T10:43:55.118Z] at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048) [2021-06-22T10:43:55.118Z] at hudson.Proc$LocalProc.(Proc.java:252) [2021-06-22T10:43:55.118Z] at hudson.Proc$LocalProc.(Proc.java:221) [2021-06-22T10:43:55.118Z] at hudson.Launcher$LocalLauncher.launch(Launcher.java:996) [2021-06-22T10:43:55.118Z] at hudson.Launcher$ProcStarter.start(Launcher.java:508) [2021-06-22T10:43:55.118Z] at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:1390) [2021-06-22T10:43:55.118Z] at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:1333) [2021-06-22T10:43:55.118Z] at hudson.remoting.UserRequest.perform(UserRequest.java:211) [2021-06-22T10:43:55.118Z] at hudson.remoting.UserRequest.perform(UserRequest.java:54) [2021-06-22T10:43:55.118Z] at hudson.remoting.Request$2.run(Request.java:376) [2021-06-22T10:43:55.118Z] at hudson.remoting.InterceptingExecutorService.lambda$wrap$0(InterceptingExecutorService.java:78) [2021-06-22T10:43:55.118Z] at java.util.concurrent.FutureTask.run(FutureTask.java:266) [2021-06-22T10:43:55.118Z] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [2021-06-22T10:43:55.118Z] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [2021-06-22T10:43:55.118Z] at hudson.remoting.Engine$1.lambda$newThread$0(Engine.java:119) [2021-06-22T10:43:55.118Z] at java.lang.Thread.run(Thread.java:748) [2021-06-22T10:43:55.118Z] Finished: FAILURE Note: We do have very limited access in Jenkins, so most of our work will involve trying around in