Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-37810

Jenkins cannot run program sonar runner

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Critical Critical
    • sonar-plugin
    • CentOS 7
      Jenkins ver. 2.17
      SonarQube Plugin 2.4.4
      Sonar-runner 2.6.1
      SonarQube V6.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..

            sonarteam Sonar Team
            gorzech Piotr Gorzechowski
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: