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

SSH Slave + Sonar breaks the build

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Major Major
    • ssh-slaves-plugin
    • None
    • Jenkins 1.502 - Maven 3.0.3 - Sonar plugin 2.0 - JDK 1.6

      Hi,

      We've recently passed the slaves strategy connection to SSH strategy (previously in JNLP mode).
      Everything is well, but Sonar analysis launched in Post Build Action broke the build (mvn no found).

      Here is the error :

      ...
      [INFO] ------------------------------------------------------------------------
      [INFO] BUILD SUCCESS
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time: 14:26.080s
      [INFO] Finished at: Thu Feb 21 12:12:04 CET 2013
      [INFO] Final Memory: 54M/410M
      [INFO] ------------------------------------------------------------------------
      [myproject] $ mvn -f /path/to/.jenkins/workspace/myproject/pom.xml -e -B sonar:sonar -V -U -Dpmd.failOnViolation=false -Dmaven.repo.local=${WORKSPACE}/.repository -Dgwt.logLevel=ERROR -Dsonar.jdbc.driver=com.mysql.jdbc.Driver -Dsonar.jdbc.url=jdbc:mysql://sonar:3306/sonar?autoReconnect=true&useUnicode=true&characterEncoding=utf8 ******** ******** -Dsonar.host.url=http://url.sonar:9000
      FATAL: L'exécution de la commande a échoué.
      java.io.IOException: Cannot run program "mvn" (in directory "/path/to/.jenkins/workspace/myproject"): java.io.IOException: error=2, No such file or directory
      at java.lang.ProcessBuilder.start(ProcessBuilder.java:460)
      at hudson.Proc$LocalProc.<init>(Proc.java:244)
      at hudson.Proc$LocalProc.<init>(Proc.java:216)
      at hudson.Launcher$LocalLauncher.launch(Launcher.java:763)
      at hudson.Launcher$ProcStarter.start(Launcher.java:353)
      at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:988)
      at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:955)
      at hudson.remoting.UserRequest.perform(UserRequest.java:118)
      at hudson.remoting.UserRequest.perform(UserRequest.java:48)
      at hudson.remoting.Request$2.run(Request.java:326)
      at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
      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 hudson.remoting.Engine$1$1.run(Engine.java:58)
      at java.lang.Thread.run(Thread.java:662)
      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:453)
      ... 16 more 12:12:48 Sonar analysis completed: FAILURE
      Build step 'Sonar' changed build result to FAILURE
      Build step 'Sonar' marked build as failure
      Notifying upstream projects of job completion
      Finished: FAILURE

      The main build is a maven type build.
      If I rollback to JNLP strategy to connect slaves, the build is OK.

      This bug seems to be the same as : https://issues.jenkins-ci.org/browse/JENKINS-6718
      But the Jenkins version is older than this, and I haven't got any answers to my comment. Anyone has a workaround for this issue ?

      Thanks in advance from any help !

      Michaël Pailloncy

            sonarteam Sonar Team
            mpapo Michael Pailloncy
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: