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

"phing" executable is in the $PATH, but it cannot be executed by the phing plugin, which doesn't find the executable

    Details

    • Similar Issues:

      Description

      "phing" executable is in the $PATH, but it cannot be executed by the phing plugin, which doesn't find the executable

      Here is the output with the default config:

      [ci-mypartner-env-production] $ /bin/sh -xe /tmp/hudson7958496970301516477.sh
      + echo PATH
      PATH
      + echo /usr/kerberos/bin:/usr/local/zend/bin:/usr/local/bin:/bin:/usr/bin
      /usr/kerberos/bin:/usr/local/zend/bin:/usr/local/bin:/bin:/usr/bin
      + which phing
      /usr/local/zend/bin/phing
      looking for '/var/lib/jenkins/workspace/project/utils/build/build.xml' ...
      use '/var/lib/jenkins/workspace/project' as a working directory.
      [project] $ phing -buildfile /var/lib/jenkins/workspace/project/utils/build/build.xml -logger phing.listener.DefaultLogger
      FATAL: command execution failed.Maybe you need to configure the job to choose one of your Phing installations?
      java.io.IOException: Cannot run program "phing" (in directory "/var/lib/jenkins/workspace/project"): java.io.IOException: error=2, No such file or directory

      If i create a specific phing config, then the command launched is:

      php -buildfile /var/lib/jenkins/workspace/project/utils/build/build.xml -logger phing.listener.DefaultLogger

      where the expected command should be

      phing -buildfile /var/lib/jenkins/workspace/project/utils/build/build.xml -logger phing.listener.DefaultLogger

        Attachments

          Activity

          Hide
          unnikrishnan Unnikrishnan Bhargavakurup added a comment -

          Hi,

          From the error message

          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)

          I got this "http://stackoverflow.com/questions/25080194/ioexception-when-starting-a-process"

          It seems like ProcessBuilder doesn't use the env variable PATH, so it can't find phing

          What I did is I removed Invoke Phing targets and added the Build as Execute Shell, and in Command I added /usr/local/bin/phing. and that is working for me.

          Thanks
          Unnikrishnan B.

          Show
          unnikrishnan Unnikrishnan Bhargavakurup added a comment - Hi, From the error message 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) I got this "http://stackoverflow.com/questions/25080194/ioexception-when-starting-a-process" It seems like ProcessBuilder doesn't use the env variable PATH, so it can't find phing What I did is I removed Invoke Phing targets and added the Build as Execute Shell, and in Command I added /usr/local/bin/phing. and that is working for me. Thanks Unnikrishnan B.

            People

            • Assignee:
              sogabe sogabe
              Reporter:
              themroc Fabrice Flore-Th├ębault
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: