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

P4: Unable to initialise CheckoutTask

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • p4-plugin

      After a recent Perforce Server upgrade I am receiving the following errors

      ERROR: P4: Unable to initialise CheckoutTask: com.perforce.p4java.exception.RequestException: Client '<client>' can only be used from host '<host>'.

      In my pipeline the failure occurs around

          [Stage] (p4):cmd:... p4 repos -C
          [Stage] p4 repos -C
          [Stage] 
          [Stage] Client '<client>' can only be used from host '<host>'.
          [Stage] 
          [Stage] (p4):stop:8
          [Stage] P4: Unable to initialise CheckoutTask: com.perforce.p4java.exception.RequestException: Client '<client>' can only be used from host '<host>'.
      

      Comparing successfully completed jobs prior to the p4 server upgrade I believe the problem is caused when the P4 plugin attempts to Initialise Graph commit changes within a block that depends on the version being 2017.1 or higher CheckoutTask.java Line 109.

      Looking through the jenkins logs I can see multiple severe failures

      10-Jul-2017 00:26:03.328 INFO [Executor #0 for jenkins-node : executing jobname #38010] org.jenkinsci.plugins.p4.tasks.CheckoutTask.getBuildChange getBuildChange:return:2095934
      10-Jul-2017 00:26:03.336 SEVERE [Executor #0 for jenkins-node : executing jobname #38010] org.jenkinsci.plugins.p4.tasks.CheckoutTask.initialise P4: Unable to initialise CheckoutTask: com.perforce.p4java.exception.RequestException: Client 'jenkins-node_jobname_jenkins' can only be used from host 'jenkins-node'.
      10-Jul-2017 00:26:14.056 INFO [Executor #0 for jenkins-node : executing jobname #38010] org.jenkinsci.plugins.p4.tasks.CheckoutTask.getBuildChange getBuildChange:return:2095934
      10-Jul-2017 00:26:14.096 SEVERE [Executor #0 for jenkins-node : executing jobname #38010] org.jenkinsci.plugins.p4.tasks.CheckoutTask.initialise P4: Unable to initialise CheckoutTask: com.perforce.p4java.exception.RequestException: Client 'jenkins-node_jobname_jenkins' can only be used from host 'jenkins-node'.
      10-Jul-2017 00:26:24.632 INFO [Executor #0 for jenkins-node : executing jobname #38010] org.jenkinsci.plugins.p4.tasks.CheckoutTask.getBuildChange getBuildChange:return:2095934
      10-Jul-2017 00:26:24.675 SEVERE [Executor #0 for jenkins-node : executing jobname #38010] org.jenkinsci.plugins.p4.tasks.CheckoutTask.initialise P4: Unable to initialise CheckoutTask: com.perforce.p4java.exception.RequestException: Client 'jenkins-node_jobname_jenkins' can only be used from host 'jenkins-node'.
      10-Jul-2017 00:26:34.908 INFO [Executor #0 for jenkins-node : executing jobname #38010] org.jenkinsci.plugins.p4.tasks.CheckoutTask.getBuildChange getBuildChange:return:2095934
      10-Jul-2017 00:26:34.915 SEVERE [Executor #0 for jenkins-node : executing jobname #38010] org.jenkinsci.plugins.p4.tasks.CheckoutTask.initialise P4: Unable to initialise CheckoutTask: com.perforce.p4java.exception.RequestException: Client 'jenkins-node_jobname_jenkins' can only be used from host 'jenkins-node'.
      10-Jul-2017 00:26:45.136 INFO [Executor #0 for jenkins-node : executing jobname #38010] org.jenkinsci.plugins.p4.tasks.CheckoutTask.getBuildChange getBuildChange:return:2095934
      10-Jul-2017 00:26:45.143 SEVERE [Executor #0 for jenkins-node : executing jobname #38010] org.jenkinsci.plugins.p4.tasks.CheckoutTask.initialise P4: Unable to initialise CheckoutTask: com.perforce.p4java.exception.RequestException: Client 'jenkins-node_jobname_jenkins' can only be used from host 'jenkins-node'.
      10-Jul-2017 00:26:45.148 INFO [Executor #0 for jenkins-node : executing jobname #38010] org.jenkinsci.plugins.statsd.StatsdListener.onCompleted StatsdListener: config: org.jenkinsci.plugins.statsd.StatsdConfig@176215f7
      10-Jul-2017 00:26:45.148 INFO [Executor #0 for jenkins-node : executing jobname #38010] org.jenkinsci.plugins.statsd.StatsdListener.onCompleted StatsdListener: job: jobname, result: FAILURE, duration: 42057, metricName: jenkins.jobname.FAILURE
      10-Jul-2017 00:26:45.179 INFO [Executor #0 for jenkins-node : executing jobname #38010] org.jenkinsci.plugins.adaptivedisonnector.FailureListener.onFinalized Monitoring jenkins-node after failed run of jobname #3801
      

      A current workaround has been created to bypass the P4 Plugin and use the cli instead.

      Any help would be greatly appreciated!

            p4paul Paul Allen
            ahammett Andrew Hammett
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: