java.io.IOException: error=2, No such file or directory

Jenkins JIRA | Krystian Nowak | 8 years ago
  1. 0

    When trying to execute Maven 2 executable on slave node from a build configured as "free-style software project" and a build step of type "Invoke top-level Maven targets" it cannot find mvn executable: Started by user krystian.nowak Building remotely on slave01.myorg.org Updating https://svn.myorg.org/trunk At revision 35030 no change for https://svn.myorg.org/trunk since the previous build [ant] $ ant -file build.xml Buildfile: build.xml update-settings: [copy] Copying 1 file to /home/tomcat/.hudson/workspace/common-resources-public BUILD SUCCESSFUL Total time: 0 seconds [trunk] $ mvn -f java/pom.xml clean install FATAL: command execution failed java.io.IOException: Cannot run program "mvn" (in directory "/home/tomcat/.hudson/workspace/common-resources-public/trunk"): java.io.IOException: error=2, No such file or directory at java.lang.ProcessBuilder.start(ProcessBuilder.java:459) at hudson.Proc$LocalProc.<init>(Proc.java:132) at hudson.Proc$LocalProc.<init>(Proc.java:110) at hudson.Launcher$LocalLauncher.createLocalProc(Launcher.java:359) at hudson.Launcher$LocalLauncher.launch(Launcher.java:342) at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:501) at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:485) at hudson.remoting.UserRequest.perform(UserRequest.java:92) at hudson.remoting.UserRequest.perform(UserRequest.java:46) at hudson.remoting.Request$2.run(Request.java:236) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:619) Caused by: java.io.IOException: java.io.IOException: error=2, No such file or directory at java.lang.UNIXProcess.<init>(UNIXProcess.java:148) at java.lang.ProcessImpl.start(ProcessImpl.java:65) at java.lang.ProcessBuilder.start(ProcessBuilder.java:452) ... 15 more Recording test results Sending e-mails to: failures@myorg.org Finished: FAILURE It does not happen if it is built on master node. It does not occur for "maven2 project" type. On slave node mvn is in exactly the same place as on master node: [tomcat@slave01 ~]$ which mvn /usr/local/maven/bin/mvn [tomcat@master ~]$ which mvn /usr/local/maven/bin/mvn Top level Maven 2 configuration is: Maven installation: name: 2.0 MAVEN_HOME: /usr/local/maven Hudson ver. 1.297 Maven Integration plugin ver. 1.297 Hudson SSH Slaves plugin ver. 0.4 (Launch method: Launch slave agents on Linux machines via SSH)

    Jenkins JIRA | 8 years ago | Krystian Nowak
    java.io.IOException: error=2, No such file or directory
  2. 0

    When trying to execute Maven 2 executable on slave node from a build configured as "free-style software project" and a build step of type "Invoke top-level Maven targets" it cannot find mvn executable: Started by user krystian.nowak Building remotely on slave01.myorg.org Updating https://svn.myorg.org/trunk At revision 35030 no change for https://svn.myorg.org/trunk since the previous build [ant] $ ant -file build.xml Buildfile: build.xml update-settings: [copy] Copying 1 file to /home/tomcat/.hudson/workspace/common-resources-public BUILD SUCCESSFUL Total time: 0 seconds [trunk] $ mvn -f java/pom.xml clean install FATAL: command execution failed java.io.IOException: Cannot run program "mvn" (in directory "/home/tomcat/.hudson/workspace/common-resources-public/trunk"): java.io.IOException: error=2, No such file or directory at java.lang.ProcessBuilder.start(ProcessBuilder.java:459) at hudson.Proc$LocalProc.<init>(Proc.java:132) at hudson.Proc$LocalProc.<init>(Proc.java:110) at hudson.Launcher$LocalLauncher.createLocalProc(Launcher.java:359) at hudson.Launcher$LocalLauncher.launch(Launcher.java:342) at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:501) at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:485) at hudson.remoting.UserRequest.perform(UserRequest.java:92) at hudson.remoting.UserRequest.perform(UserRequest.java:46) at hudson.remoting.Request$2.run(Request.java:236) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:619) Caused by: java.io.IOException: java.io.IOException: error=2, No such file or directory at java.lang.UNIXProcess.<init>(UNIXProcess.java:148) at java.lang.ProcessImpl.start(ProcessImpl.java:65) at java.lang.ProcessBuilder.start(ProcessBuilder.java:452) ... 15 more Recording test results Sending e-mails to: failures@myorg.org Finished: FAILURE It does not happen if it is built on master node. It does not occur for "maven2 project" type. On slave node mvn is in exactly the same place as on master node: [tomcat@slave01 ~]$ which mvn /usr/local/maven/bin/mvn [tomcat@master ~]$ which mvn /usr/local/maven/bin/mvn Top level Maven 2 configuration is: Maven installation: name: 2.0 MAVEN_HOME: /usr/local/maven Hudson ver. 1.297 Maven Integration plugin ver. 1.297 Hudson SSH Slaves plugin ver. 0.4 (Launch method: Launch slave agents on Linux machines via SSH)

    Jenkins JIRA | 8 years ago | Krystian Nowak
    java.io.IOException: error=2, No such file or directory
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  4. 0

    [JENKINS-6796] "mvn" No such file or directory - Jenkins JIRA

    jenkins-ci.org | 5 months ago
    java.io.IOException: error=2, No such file or directory
  5. 0

    [JENKINS-6796] "mvn" No such file or directory - Jenkins JIRA

    jenkins-ci.org | 7 months ago
    java.io.IOException: error=2, No such file or directory

  1. eti22 1 times, last 1 month ago
  2. asdasd 24 times, last 3 months ago
  3. rexgreenza 8 times, last 3 months ago
  4. Benj-AD 1 times, last 4 months ago
  5. Akshay 4 times, last 6 months ago
95 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.io.IOException

    error=2, No such file or directory

    at java.lang.ProcessBuilder.start()
  2. Java RT
    ProcessBuilder.start
    1. java.lang.ProcessBuilder.start(ProcessBuilder.java:459)
    1 frame
  3. Hudson
    Launcher$RemoteLaunchCallable.call
    1. hudson.Proc$LocalProc.<init>(Proc.java:132)
    2. hudson.Proc$LocalProc.<init>(Proc.java:110)
    3. hudson.Launcher$LocalLauncher.createLocalProc(Launcher.java:359)
    4. hudson.Launcher$LocalLauncher.launch(Launcher.java:342)
    5. hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:501)
    6. hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:485)
    6 frames
  4. Hudson :: Remoting Layer
    Request$2.run
    1. hudson.remoting.UserRequest.perform(UserRequest.java:92)
    2. hudson.remoting.UserRequest.perform(UserRequest.java:46)
    3. hudson.remoting.Request$2.run(Request.java:236)
    3 frames
  5. Java RT
    FutureTask.run
    1. java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
    2. java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    3. java.util.concurrent.FutureTask.run(FutureTask.java:138)
    3 frames