• 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!

          [JENKINS-45420] P4: Unable to initialise CheckoutTask

          Andrew Hammett created issue -

          My first thought is to try/catch and ignore the failure of getting the graph heads for the repository - our pipeline was working in an earlier version of perforce and this appears to adding to the builds so may not necessarily be required.

          Andrew Hammett added a comment - My first thought is to try/catch and ignore the failure of getting the graph heads for the repository - our pipeline was working in an earlier version of perforce and this appears to adding to the builds so may not necessarily be required.
          Rob Petti made changes -
          Component/s New: p4-plugin [ 19224 ]
          Component/s Original: perforce-plugin [ 15506 ]
          Rob Petti made changes -
          Assignee Original: Rob Petti [ rpetti ]
          Rob Petti made changes -
          Assignee New: Paul Allen [ p4paul ]

          Rob Petti added a comment -

          perforce-plugin and p4-plugin are different plugins, the former of which doesn't support pipeline at all. I've updated the component on the ticket to p4-plugin, since that seems to be the one you are using.

          Can you also please update the "Environment" field on this ticket to include the version of "P4 Plugin" you are using instead of "Perforce Plugin"?

          Rob Petti added a comment - perforce-plugin and p4-plugin are different plugins, the former of which doesn't support pipeline at all. I've updated the component on the ticket to p4-plugin, since that seems to be the one you are using. Can you also please update the "Environment" field on this ticket to include the version of "P4 Plugin" you are using instead of "Perforce Plugin"?

          PR raised with above suggestion https://github.com/jenkinsci/p4-plugin/pull/48

          Andrew Hammett added a comment - PR raised with above suggestion https://github.com/jenkinsci/p4-plugin/pull/48
          Andrew Hammett made changes -
          Environment Original: # Jenkins Master
          Operating System CentOS release 6.8 (Final)
          Tomcat version 8.5.6
          Java: openjdk version "1.8.0_101"
          OpenJDK Runtime Environment (build 1.8.0_101-b13)
          OpenJDK 64-Bit Server VM (build 25.101-b13, mixed mode)
          Jenkins version 2.68
          Perforce Plugin Version 1.3.36

          Perforce Server Version P4D/LINUX26X86_64/2017.1/1511680 (2017/05/05)
          New: # Jenkins Master
          Operating System CentOS release 6.8 (Final)
          Tomcat version 8.5.6
          Java: openjdk version "1.8.0_101"
          OpenJDK Runtime Environment (build 1.8.0_101-b13)
          OpenJDK 64-Bit Server VM (build 25.101-b13, mixed mode)
          Jenkins version 2.68
          P4 Plugin Version 1.3.36

          Perforce Server Version P4D/LINUX26X86_64/2017.1/1511680 (2017/05/05)

          rpetti thank you and sorry for the confusion. ticket updated

          Andrew Hammett added a comment - rpetti thank you and sorry for the confusion. ticket updated
          Andrew Hammett made changes -
          Labels Original: perforce New: p4 p4-plugin

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

              Created:
              Updated:
              Resolved: