java.io.IOException: Cannot run program "sonar-runner" (in directory "/var/lib/jenkins/workspace/tnk-hub"): error=2, No such file or directory

Jenkins JIRA | Piotr Gorzechowski | 6 months ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    Hi When I try to run Jenkins with a simple project, this is the error I get: _[tnk-hub] $ sonar-runner jenkins:jenkins -X -e -Dsonar.host.url=http://localhost:9000 ******** -Dsonar.projectBaseDir=/var/lib/jenkins/workspace/tnk-hub ------------------------------------------------------------------------ SONAR ANALYSIS FAILED ------------------------------------------------------------------------ FATAL: command execution failed. java.io.IOException: Cannot run program "sonar-runner" (in directory "/var/lib/jenkins/workspace/tnk-hub"): error=2, No such file or directory at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048) at hudson.Proc$LocalProc.<init>(Proc.java:243) at hudson.Proc$LocalProc.<init>(Proc.java:212) at hudson.Launcher$LocalLauncher.launch(Launcher.java:815) at hudson.Launcher$ProcStarter.start(Launcher.java:381) at hudson.Launcher$ProcStarter.join(Launcher.java:388) at hudson.plugins.sonar.SonarRunnerBuilder.executeSonarRunner(SonarRunnerBuilder.java:287) at hudson.plugins.sonar.SonarRunnerBuilder.performInternal(SonarRunnerBuilder.java:256) at hudson.plugins.sonar.SonarRunnerBuilder.perform(SonarRunnerBuilder.java:270) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:779) at hudson.model.Build$BuildExecution.build(Build.java:205) at hudson.model.Build$BuildExecution.doRun(Build.java:162) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534) at hudson.model.Run.execute(Run.java:1720) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:404) Caused by: java.io.IOException: error=2, No such file or directory at java.lang.UNIXProcess.forkAndExec(Native Method) at java.lang.UNIXProcess.<init>(UNIXProcess.java:248) at java.lang.ProcessImpl.start(ProcessImpl.java:134) at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029) ... 17 more Build step 'Execute SonarQube Scanner' marked build as failure Finished: FAILURE_ I tried different configurations and options and no luck. I have also run this command from CLI and everything work fine with any user..

    Jenkins JIRA | 6 months ago | Piotr Gorzechowski
    java.io.IOException: Cannot run program "sonar-runner" (in directory "/var/lib/jenkins/workspace/tnk-hub"): error=2, No such file or directory
  2. 0

    Cannot install NodeJS on Jenkins 2.19.2

    GitHub | 4 months ago | jsmadja
    java.io.IOException: **Cannot run program "/var/jenkins_home/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/nodejs/bin/node" (in directory "/var/jenkins_home/jobs/fightcade/workspace"): error=2, No such file or directory**
  3. 0

    Jenkins job using Gradle can't find executable

    Stack Overflow | 2 years ago | ShatyUT
    java.io.IOException: Cannot run program "gradle" (in directory "/var/lib/jenkins/workspace/Journeyman-Android"): error=2, No such file or directory
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Cannot run program "gradle" in Jenkins

    Stack Overflow | 5 years ago | Andreas Köberle
    java.io.IOException: Cannot run program "gradle" (in directory "/Users/Shared/Jenkins/Home/jobs/test/workspace"): error=2, No such file or directory
  6. 0

    [JENKINS-15406] When using gradlew, root build script field is not used to locate gradlew - Jenkins JIRA

    jenkins-ci.org | 10 months ago
    java.io.IOException: Cannot run program (in directory ): error=2, No such file or directory

  1. rp 1 times, last 2 months ago
  2. michallos 1 times, last 3 months ago
  3. eti22 1 times, last 4 months ago
  4. asdasd 24 times, last 5 months ago
  5. rexgreenza 8 times, last 5 months ago
2 more registered users
93 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.UNIXProcess.forkAndExec()
  2. Java RT
    ProcessBuilder.start
    1. java.lang.UNIXProcess.forkAndExec(Native Method)
    2. java.lang.UNIXProcess.<init>(UNIXProcess.java:248)
    3. java.lang.ProcessImpl.start(ProcessImpl.java:134)
    4. java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
    4 frames
  3. Hudson
    Launcher$ProcStarter.join
    1. hudson.Proc$LocalProc.<init>(Proc.java:243)
    2. hudson.Proc$LocalProc.<init>(Proc.java:212)
    3. hudson.Launcher$LocalLauncher.launch(Launcher.java:815)
    4. hudson.Launcher$ProcStarter.start(Launcher.java:381)
    5. hudson.Launcher$ProcStarter.join(Launcher.java:388)
    5 frames
  4. hudson.plugins.sonar
    SonarRunnerBuilder.perform
    1. hudson.plugins.sonar.SonarRunnerBuilder.executeSonarRunner(SonarRunnerBuilder.java:287)
    2. hudson.plugins.sonar.SonarRunnerBuilder.performInternal(SonarRunnerBuilder.java:256)
    3. hudson.plugins.sonar.SonarRunnerBuilder.perform(SonarRunnerBuilder.java:270)
    3 frames
  5. Hudson
    Executor.run
    1. hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
    2. hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:779)
    3. hudson.model.Build$BuildExecution.build(Build.java:205)
    4. hudson.model.Build$BuildExecution.doRun(Build.java:162)
    5. hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534)
    6. hudson.model.Run.execute(Run.java:1720)
    7. hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
    8. hudson.model.ResourceController.execute(ResourceController.java:98)
    9. hudson.model.Executor.run(Executor.java:404)
    9 frames