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

"Path to p4 executable" does not seem to be used

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • p4-plugin
    • None
    • One Hudson master and 4 nodes, all linux machines. Saw issue with both Perforce Plugin 1.0.16 and 1.0.17

      It seems that the perforce plugin finds the p4 executable by using the system PATH variable, rather than referencing the value of "Path to p4 executable" listed on the job configuration page. This is misleading and makes errors difficult to debug.

      In our situation, we updated the ~/.bashrc file on our nodes and removed the path to the p4 executable from our PATH variable. Upon restarting the nodes, we got the following error for all of our builds that used perforce:

      Started by user vaustje
      Building remotely on node4
      Using remote perforce client: SOME_CLIENT
      Caught exception communicating with perforce. No output for: p4 workspace -o SOME_CLIENT
      com.tek42.perforce.PerforceException: No output for: p4 workspace -o SOME_CLIENT
      at com.tek42.perforce.parse.AbstractPerforceTemplate.getPerforceResponse(AbstractPerforceTemplate.java:314)
      at com.tek42.perforce.parse.Workspaces.getWorkspace(Workspaces.java:53)
      at hudson.plugins.perforce.PerforceSCM.getPerforceWorkspace(PerforceSCM.java:671)
      at hudson.plugins.perforce.PerforceSCM.checkout(PerforceSCM.java:294)
      at hudson.model.AbstractProject.checkout(AbstractProject.java:1003)
      at hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:428)
      at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:376)
      at hudson.model.Run.run(Run.java:1174)
      at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:303)
      at hudson.model.ResourceController.execute(ResourceController.java:88)
      at hudson.model.Executor.run(Executor.java:123)
      Finished: FAILURE

      At first we thought that there was an error running the p4 command on the remote machine, but it turned out that p4 was not getting executed at all. The value of "Path to p4 executable" was set correctly in our job configuration. However it was not until we updated the PATH variable in our bashrc and restarted the nodes that the issue was fixed.

            rpetti Rob Petti
            austje austje
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: