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

Exception sync'ing global pipeline library with new project

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Component/s: p4-plugin
    • Labels:
    • Environment:
      Jenkins 2.89.2
      P4 Plugin 1.8.4
      Pipeline 2.5
    • Similar Issues:

      Description

      I've seen this a couple of times now – when first building a new project in Jenkins, an exception is thrown when loading the global pipeline library used by all our projects.  This does not happen every time.  There seems to be some confusion with the exception mentioning a job folder for a different project (see below).

      The exception has not been seen to reoccur when another build is triggered immediately after this failure (this may be due to the low frequency of this occurance).  We have not seen this type of failure in projects which are not new – so seems related to the initial checkout?

      Note that no other projects where building at the time, and none where scheduled to build.  The 'ANOTHERPROJECT' in the logs below was not recently rebuilt, and is not lexcially close to the project being built.

      Complete log for the initial failed build (with named redacted):

      Started by user anonymous
      Obtained DEPOT/PROJECT/Jenkinsfile from p4-HASH-PROJECT
      Running in Durability level: MAX_SURVIVABILITY
      Loading library LIBRARY@1.0
      (p4):cmd:... p4 client -o extlib-LIBRARY
      p4 client -o extlib-LIBRARY
      
      (p4):stop:4
      (p4):cmd:... p4 info
      p4 info
      
      (p4):stop:5
      (p4):cmd:... p4 client -o extlib-LIBRARY
      p4 client -o extlib-LIBRARY
      
      (p4):stop:6
      (p4):cmd:... p4 client -i
      p4 client -i
      
      Client extlib-LIBRARY saved.
      
      (p4):stop:7
      ... client: extlib-LIBRARY
      (p4):cmd:... p4 client -o extlib-LIBRARY
      p4 client -o extlib-LIBRARY
      
      (p4):stop:4
      (p4):cmd:... p4 info
      p4 info
      
      (p4):stop:5
      (p4):cmd:... p4 counter change
      p4 counter change
      
      (p4):stop:6
      (p4):cmd:... p4 changes -m1 -ssubmitted //extlib-LIBRARY/...
      p4 changes -m1 -ssubmitted //extlib-LIBRARY/...
      
      Change 4138936 on 2018/02/09 by USER@WORKSPACE 'JENKINS : enablePerforce() - re'
      (p4):stop:7
      (p4):cmd:... p4 repos -C
      p4 repos -C
      
      (p4):stop:8
      Building on Node: master
      (p4):cmd:... p4 client -o extlib-LIBRARY
      p4 client -o extlib-LIBRARY
      
      (p4):stop:4
      (p4):cmd:... p4 info
      p4 info
      
      (p4):stop:5
      
      P4 Task: establishing connection.
      ... server: PERFORCE:5500
      ... node: NODE
      
      P4 Task: reverting all pending and shelved revisions.
      (p4):cmd:... p4 revert /var/lib/jenkins/workspace/PROJECT%40libs/LIBRARY/...
      p4 revert /var/lib/jenkins/workspace/PROJECT%40libs/LIBRARY/...
      
      /var/lib/jenkins/workspace/PROJECT%40libs/LIBRARY/... - file(s) not opened on this client.
      
      (p4):stop:6
      ... rm [abandoned files]
      duration: (230ms)
      
      P4 Task: cleaning workspace to match have list.
      (p4):cmd:... p4 reconcile -w -f /var/lib/jenkins/workspace/PROJECT%40libs/LIBRARY/..___
      p4 reconcile -w -f /var/lib/jenkins/workspace/PROJECT%40libs/LIBRARY/...
      
      Path '/var/lib/jenkins/workspace/PROJECT%40libs/LIBRARY/...' is not under client's root '/var/lib/jenkins/jobs/ANOTHERPROJECT'.
      
      No file(s) to reconcile.
      
      (p4):stop:7
      duration: (229ms)
      
      P4 Task: syncing files at change: 4138936
      (p4):cmd:... p4 sync -q /var/lib/jenkins/workspace/PROJECT%40libs/LIBRARY/...@413893___
      p4 sync -q /var/lib/jenkins/workspace/PROJECT%40libs/LIBRARY/...@4138936
      
      Path '/var/lib/jenkins/workspace/PROJECT%40libs/LIBRARY/...' is not under client's root '/var/lib/jenkins/jobs/ANOTHERPROJECT'.
      
      (p4):stop:8
      P4 Task: attempt: 1
      P4 Task: failed: com.perforce.p4java.exception.P4JavaException: com.perforce.p4java.exception.P4JavaException: hudson.AbortException: P4JAVA: Error(s):
      Path '/var/lib/jenkins/workspace/PROJECT%40libs/LIBRARY/...' is not under client's root '/var/lib/jenkins/jobs/ANOTHERPROJECT'.
      
      ERROR: P4 Task: failed: com.perforce.p4java.exception.P4JavaException: com.perforce.p4java.exception.P4JavaException: hudson.AbortException: P4JAVA: Error(s):
      Path '/var/lib/jenkins/workspace/PROJECT%40libs/LIBRARY/...' is not under client's root '/var/lib/jenkins/jobs/ANOTHERPROJECT'.
      
      org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
      WorkflowScript: Loading libraries failed
      
      1 error
      
      at org.codehaus.groovy.control.ErrorCollector.failIfErrors(ErrorCollector.java:310)
      at org.codehaus.groovy.control.CompilationUnit.applyToPrimaryClassNodes(CompilationUnit.java:1085)
      at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:603)
      at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:581)
      at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:558)
      at groovy.lang.GroovyClassLoader.doParseClass(GroovyClassLoader.java:298)
      at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:268)
      at groovy.lang.GroovyShell.parseClass(GroovyShell.java:688)
      at groovy.lang.GroovyShell.parse(GroovyShell.java:700)
      at org.jenkinsci.plugins.workflow.cps.CpsGroovyShell.doParse(CpsGroovyShell.java:133)
      at org.jenkinsci.plugins.workflow.cps.CpsGroovyShell.reparse(CpsGroovyShell.java:127)
      at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.parseScript(CpsFlowExecution.java:557)
      at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.start(CpsFlowExecution.java:518)
      at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:290)
      at hudson.model.ResourceController.execute(ResourceController.java:97)
      at hudson.model.Executor.run(Executor.java:421)
      Finished: FAILURE

      Workaround:

      Rebuild the project.

        Attachments

          Activity

          Hide
          simon_watts Simon Watts added a comment -

          This issue is endemic when rescanning a multibranch project.  This project is held in GIT, the extension library (bgcc2-jenkins) is in Perforce.

          P4 Task: reverting all pending and shelved revisions.
          ... p4 revert /var/lib/jenkins/workspace/BRANCH-1-GAFQCT573WQMGSBML7___ +
          ERROR: P4JAVA: Error(s):
          Path '/var/lib/jenkins/workspace/BRANCH-1-GAFQCT573WQMGSBML7R37GK3WADSCORFBC2467UU4GSCQZTSWGGQ%40libs/bgc2-jenkins/...' is not under client's root '/var/lib/jenkins/workspace/BRANCH-2-FYEJFRRKPOT6CMEXIOQQ6W4RHD2EEZUQ6PS2JLHAT46TN6ZAZYAA%40libs/bgc2-jenkins'.
          
          org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
          WorkflowScript: Loading libraries failed
          
          1 error
          
          	at org.codehaus.groovy.control.ErrorCollector.failIfErrors(ErrorCollector.java:310)
          	at org.codehaus.groovy.control.CompilationUnit.applyToPrimaryClassNodes(CompilationUnit.java:1085)
          	at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:603)
          	at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:581)
          	at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:558)
          	at groovy.lang.GroovyClassLoader.doParseClass(GroovyClassLoader.java:298)
          	at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:268)
          	at groovy.lang.GroovyShell.parseClass(GroovyShell.java:688)
          	at groovy.lang.GroovyShell.parse(GroovyShell.java:700)
          	at org.jenkinsci.plugins.workflow.cps.CpsGroovyShell.doParse(CpsGroovyShell.java:131)
          	at org.jenkinsci.plugins.workflow.cps.CpsGroovyShell.reparse(CpsGroovyShell.java:125)
          	at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.parseScript(CpsFlowExecution.java:560)
          	at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.start(CpsFlowExecution.java:521)
          	at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:325)
          	at hudson.model.ResourceController.execute(ResourceController.java:97)
          	at hudson.model.Executor.run(Executor.java:429)
          Finished: FAILURE
          Show
          simon_watts Simon Watts added a comment - This issue is endemic when rescanning a multibranch project.  This project is held in GIT, the extension library (bgcc2-jenkins) is in Perforce. P4 Task: reverting all pending and shelved revisions. ... p4 revert /var/lib/jenkins/workspace/BRANCH-1-GAFQCT573WQMGSBML7___ + ERROR: P4JAVA: Error(s): Path '/var/lib/jenkins/workspace/BRANCH-1-GAFQCT573WQMGSBML7R37GK3WADSCORFBC2467UU4GSCQZTSWGGQ%40libs/bgc2-jenkins/...' is not under client's root '/var/lib/jenkins/workspace/BRANCH-2-FYEJFRRKPOT6CMEXIOQQ6W4RHD2EEZUQ6PS2JLHAT46TN6ZAZYAA%40libs/bgc2-jenkins'. org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: WorkflowScript: Loading libraries failed 1 error at org.codehaus.groovy.control.ErrorCollector.failIfErrors(ErrorCollector.java:310) at org.codehaus.groovy.control.CompilationUnit.applyToPrimaryClassNodes(CompilationUnit.java:1085) at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:603) at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:581) at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:558) at groovy.lang.GroovyClassLoader.doParseClass(GroovyClassLoader.java:298) at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:268) at groovy.lang.GroovyShell.parseClass(GroovyShell.java:688) at groovy.lang.GroovyShell.parse(GroovyShell.java:700) at org.jenkinsci.plugins.workflow.cps.CpsGroovyShell.doParse(CpsGroovyShell.java:131) at org.jenkinsci.plugins.workflow.cps.CpsGroovyShell.reparse(CpsGroovyShell.java:125) at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.parseScript(CpsFlowExecution.java:560) at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.start(CpsFlowExecution.java:521) at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:325) at hudson.model.ResourceController.execute(ResourceController.java:97) at hudson.model.Executor.run(Executor.java:429) Finished: FAILURE
          Hide
          simon_watts Simon Watts added a comment - - edited

          To follow up from this...

          I noticed that the libraries where configured to use the "Legacy SCM" method in Jenkins global configuration.  When set up I didn't realized that "Helix" is an alias for Perforce.

          So I have now tried changing to "Modern SCM" method, using "now" as the version (successfully identified by Jenkins).

          However I now get a different error when the implicit library is loaded:

           

          Obtained Jenkinsfile from af39698113dd5a786c3f362f93c33eacb0b455ca
          Running in Durability level: MAX_SURVIVABILITY
          Loading library bgc2-jenkins@now
          ... p4 changes -m1 //DistributedDevelopment/generic/jenkins/libs/bgc2-jenkins-1.0/.../.___ +
          ... p4 client -o jenkins-library.DistributedDevelopment.generic.jenkins.libs.bgc2-jenki___ +
          P4: Unable to use Workspace: com.perforce.p4java.exception.RequestException: Wildcards (*, %%%%x, ...) not allowed in 'jenkins-library.DistributedDevelopment.generic.jenkins.libs.bgc2-jenkins-1.0....'.
          
          ... p4 info +
          ... p4 client -o jenkins-library.DistributedDevelopment.generic.jenkins.libs.bgc2-jenki___ +
          P4: Unable to setup workspace: com.perforce.p4java.exception.RequestException: Wildcards (*, %%%%x, ...) not allowed in 'jenkins-library.DistributedDevelopment.generic.jenkins.libs.bgc2-jenkins-1.0....'.
          
          ERROR: P4: Unable to setup workspace: com.perforce.p4java.exception.RequestException: Wildcards (*, %%%%x, ...) not allowed in 'jenkins-library.DistributedDevelopment.generic.jenkins.libs.bgc2-jenkins-1.0....'.
          
          org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
          WorkflowScript: Loading libraries failed
          
          1 error
          
          	at org.codehaus.groovy.control.ErrorCollector.failIfErrors(ErrorCollector.java:310)
          	at org.codehaus.groovy.control.CompilationUnit.applyToPrimaryClassNodes(CompilationUnit.java:1085)
          	at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:603)
          	at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:581)
          	at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:558)
          	at groovy.lang.GroovyClassLoader.doParseClass(GroovyClassLoader.java:298)
          	at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:268)
          	at groovy.lang.GroovyShell.parseClass(GroovyShell.java:688)
          	at groovy.lang.GroovyShell.parse(GroovyShell.java:700)
          	at org.jenkinsci.plugins.workflow.cps.CpsGroovyShell.doParse(CpsGroovyShell.java:131)
          	at org.jenkinsci.plugins.workflow.cps.CpsGroovyShell.reparse(CpsGroovyShell.java:125)
          	at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.parseScript(CpsFlowExecution.java:560)
          	at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.start(CpsFlowExecution.java:521)
          	at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:325)
          	at hudson.model.ResourceController.execute(ResourceController.java:97)
          	at hudson.model.Executor.run(Executor.java:429)
          Finished: FAILURE

          Again, the Jenkins extension library is held in Perforce – while the project being built is held in GIT.  However I see the same error when building another project also hosted in Perforce.

          Configuration of the shared library is as follows:

          • Name = bgc2-jenkins
          • Default version = now (currently maps to revision 4171459)
          • Load implicitly = true
          • Allow default version to be overridden = true
          • Include @Library changes in the job recent changes = true
          • Retrieval method = Modern SCM:
            • Helix Library
            • Perforce Credentials = (same as used for source code)
            • Character Set = none
            • Library Depot Path = //DistributedDevelopment/generic/jenkins/libs/bgc2-jenkins-1.0/...

           


           

          UPDATE:

          The issue was with the "Library Depot Path".  This should not include the trailing '/...' wildcard!

          The help associated with this time in the interface does include the '/...' in the example however (which is why I had entered it as such).  BUG

          The example in the P4 plugin source does not include the wildcard.

          Show
          simon_watts Simon Watts added a comment - - edited To follow up from this... I noticed that the libraries where configured to use the "Legacy SCM" method in Jenkins global configuration.  When set up I didn't realized that "Helix" is an alias for Perforce. So I have now tried changing to "Modern SCM" method, using "now" as the version (successfully identified by Jenkins). However I now get a different error when the implicit library is loaded:   Obtained Jenkinsfile from af39698113dd5a786c3f362f93c33eacb0b455ca Running in Durability level: MAX_SURVIVABILITY Loading library bgc2-jenkins@now ... p4 changes -m1 //DistributedDevelopment/generic/jenkins/libs/bgc2-jenkins-1.0/.../.___ + ... p4 client -o jenkins-library.DistributedDevelopment.generic.jenkins.libs.bgc2-jenki___ + P4: Unable to use Workspace: com.perforce.p4java.exception.RequestException: Wildcards (*, %%%%x, ...) not allowed in 'jenkins-library.DistributedDevelopment.generic.jenkins.libs.bgc2-jenkins-1.0....'. ... p4 info + ... p4 client -o jenkins-library.DistributedDevelopment.generic.jenkins.libs.bgc2-jenki___ + P4: Unable to setup workspace: com.perforce.p4java.exception.RequestException: Wildcards (*, %%%%x, ...) not allowed in 'jenkins-library.DistributedDevelopment.generic.jenkins.libs.bgc2-jenkins-1.0....'. ERROR: P4: Unable to setup workspace: com.perforce.p4java.exception.RequestException: Wildcards (*, %%%%x, ...) not allowed in 'jenkins-library.DistributedDevelopment.generic.jenkins.libs.bgc2-jenkins-1.0....'. org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: WorkflowScript: Loading libraries failed 1 error at org.codehaus.groovy.control.ErrorCollector.failIfErrors(ErrorCollector.java:310) at org.codehaus.groovy.control.CompilationUnit.applyToPrimaryClassNodes(CompilationUnit.java:1085) at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:603) at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:581) at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:558) at groovy.lang.GroovyClassLoader.doParseClass(GroovyClassLoader.java:298) at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:268) at groovy.lang.GroovyShell.parseClass(GroovyShell.java:688) at groovy.lang.GroovyShell.parse(GroovyShell.java:700) at org.jenkinsci.plugins.workflow.cps.CpsGroovyShell.doParse(CpsGroovyShell.java:131) at org.jenkinsci.plugins.workflow.cps.CpsGroovyShell.reparse(CpsGroovyShell.java:125) at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.parseScript(CpsFlowExecution.java:560) at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.start(CpsFlowExecution.java:521) at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:325) at hudson.model.ResourceController.execute(ResourceController.java:97) at hudson.model.Executor.run(Executor.java:429) Finished: FAILURE Again, the Jenkins extension library is held in Perforce – while the project being built is held in GIT.  However I see the same error when building another project also hosted in Perforce. Configuration of the shared library is as follows: Name = bgc2-jenkins Default version = now (currently maps to revision 4171459) Load implicitly = true Allow default version to be overridden = true Include @Library changes in the job recent changes = true Retrieval method = Modern SCM: Helix Library Perforce Credentials = (same as used for source code) Character Set = none Library Depot Path = //DistributedDevelopment/generic/jenkins/libs/bgc2-jenkins-1.0 /...     UPDATE: The issue was with the "Library Depot Path".  This should not include the trailing '/...' wildcard! The help associated with this time in the interface does include the '/...' in the example however (which is why I had entered it as such).  BUG The example in the P4 plugin source does not include the wildcard.
          Hide
          simon_watts Simon Watts added a comment -

          Spoke too soon.

          Now using the "Modern SCM" to sync the extension library from Perforce; this works in singular cases, but we are still getting errors with concurrent jobs.  In this case, when the Multibranch Plugin rescans branches in a GIT hosted Java project.

          Sample error from logs:

          P4 Task: establishing connection.
          ... server: perforce.xxxx.com:5500
          ... node: xxxx
          
          P4 Task: reverting all pending and shelved revisions.
          ... p4 revert /var/lib/jenkins/workspace/x_System_Build_MATCHBOX-411-EFMJRDIAGFDTWBE32H___ +ERROR: P4JAVA: Error(s):
          Path '/var/lib/jenkins/workspace/x_System_Build_MATCHBOX-411-EFMJRDIAGFDTWBE32HH3RZLDFDWRVAG5TKEI2E3VLRA5ENPUEFUA%40libs/bgc2-jenkins/...' is not under client's root '/var/lib/jenkins/workspace/7-3-state-price-vis-4-state-4DR53P4IMDYIWKA3QKG6AIEBT3DF7X3K4AFR4SLWS6JUMLMNB5AA%40libs/bgc2-jenkins'.
          
          org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
          WorkflowScript: Loading libraries failed
          
          1 error
          
          	at org.codehaus.groovy.control.ErrorCollector.failIfErrors(ErrorCollector.java:310)
          	at org.codehaus.groovy.control.CompilationUnit.applyToPrimaryClassNodes(CompilationUnit.java:1085)
          	at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:603)
          	at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:581)
          	at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:558)
          	at groovy.lang.GroovyClassLoader.doParseClass(GroovyClassLoader.java:298)
          	at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:268)
          	at groovy.lang.GroovyShell.parseClass(GroovyShell.java:688)
          	at groovy.lang.GroovyShell.parse(GroovyShell.java:700)
          	at org.jenkinsci.plugins.workflow.cps.CpsGroovyShell.doParse(CpsGroovyShell.java:131)
          	at org.jenkinsci.plugins.workflow.cps.CpsGroovyShell.reparse(CpsGroovyShell.java:125)
          	at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.parseScript(CpsFlowExecution.java:560)
          	at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.start(CpsFlowExecution.java:521)
          	at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:325)
          	at hudson.model.ResourceController.execute(ResourceController.java:97)
          	at hudson.model.Executor.run(Executor.java:429)
          Finished: FAILURE

          Jenkins version 2.107.2, plugins up-to-date at time of build (2018-06-26).

          Show
          simon_watts Simon Watts added a comment - Spoke too soon. Now using the "Modern SCM" to sync the extension library from Perforce; this works in singular cases, but we are still getting errors with concurrent jobs.  In this case, when the Multibranch Plugin rescans branches in a GIT hosted Java project. Sample error from logs: P4 Task: establishing connection. ... server: perforce.xxxx.com:5500 ... node: xxxx P4 Task: reverting all pending and shelved revisions. ... p4 revert /var/lib/jenkins/workspace/x_System_Build_MATCHBOX-411-EFMJRDIAGFDTWBE32H___ +ERROR: P4JAVA: Error(s): Path '/var/lib/jenkins/workspace/x_System_Build_MATCHBOX-411-EFMJRDIAGFDTWBE32HH3RZLDFDWRVAG5TKEI2E3VLRA5ENPUEFUA%40libs/bgc2-jenkins/...' is not under client's root '/var/lib/jenkins/workspace/7-3-state-price-vis-4-state-4DR53P4IMDYIWKA3QKG6AIEBT3DF7X3K4AFR4SLWS6JUMLMNB5AA%40libs/bgc2-jenkins'. org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: WorkflowScript: Loading libraries failed 1 error at org.codehaus.groovy.control.ErrorCollector.failIfErrors(ErrorCollector.java:310) at org.codehaus.groovy.control.CompilationUnit.applyToPrimaryClassNodes(CompilationUnit.java:1085) at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:603) at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:581) at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:558) at groovy.lang.GroovyClassLoader.doParseClass(GroovyClassLoader.java:298) at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:268) at groovy.lang.GroovyShell.parseClass(GroovyShell.java:688) at groovy.lang.GroovyShell.parse(GroovyShell.java:700) at org.jenkinsci.plugins.workflow.cps.CpsGroovyShell.doParse(CpsGroovyShell.java:131) at org.jenkinsci.plugins.workflow.cps.CpsGroovyShell.reparse(CpsGroovyShell.java:125) at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.parseScript(CpsFlowExecution.java:560) at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.start(CpsFlowExecution.java:521) at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:325) at hudson.model.ResourceController.execute(ResourceController.java:97) at hudson.model.Executor.run(Executor.java:429) Finished: FAILURE Jenkins version 2.107.2, plugins up-to-date at time of build (2018-06-26).
          Hide
          edeleff Emily Deleff added a comment -

          I am experiencing the same issue with concurrent builds. This works as expected in isolation but any case with multiple jobs being triggered at the same time will result in failure. The first job succeeds while the second one running at the same time fails because the root on the jenkins-libarary workspace is still set to the first one.

          The failed cases have been triggered by either polling or periodic trigger.

          ERROR: P4 Task: failed: com.perforce.p4java.exception.P4JavaException: com.perforce.p4java.exception.P4JavaException: hudson.AbortException: P4JAVA: Error(s):
          Path 'jenkins/workspace-Job_02/lib/...' is not under client's root 'jenkins/workspace-Job_01/lib/...'.
          
          org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
          WorkflowScript: Loading libraries failed
          
          1 error	
                  at org.codehaus.groovy.control.ErrorCollector.failIfErrors(ErrorCollector.java:310)
          	at org.codehaus.groovy.control.CompilationUnit.applyToPrimaryClassNodes(CompilationUnit.java:1085)
          	at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:603)
          	at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:581)
          	at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:558)
          	at groovy.lang.GroovyClassLoader.doParseClass(GroovyClassLoader.java:298)
          	at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:268)
          	at groovy.lang.GroovyShell.parseClass(GroovyShell.java:688)
          	at groovy.lang.GroovyShell.parse(GroovyShell.java:700)
          	at org.jenkinsci.plugins.workflow.cps.CpsGroovyShell.doParse(CpsGroovyShell.java:131)
          	at org.jenkinsci.plugins.workflow.cps.CpsGroovyShell.reparse(CpsGroovyShell.java:125)
          	at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.parseScript(CpsFlowExecution.java:560)
          	at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.start(CpsFlowExecution.java:521)
          	at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:329)
          	at hudson.model.ResourceController.execute(ResourceController.java:97)
          	at hudson.model.Executor.run(Executor.java:429)
          Finished: FAILURE

          I am running Jenkins 2.130 and P4 1.8.10. 

          Show
          edeleff Emily Deleff added a comment - I am experiencing the same issue with concurrent builds. This works as expected in isolation but any case with multiple jobs being triggered at the same time will result in failure. The first job succeeds while the second one running at the same time fails because the root on the jenkins-libarary workspace is still set to the first one. The failed cases have been triggered by either polling or periodic trigger. ERROR: P4 Task: failed: com.perforce.p4java.exception.P4JavaException: com.perforce.p4java.exception.P4JavaException: hudson.AbortException: P4JAVA: Error(s): Path 'jenkins/workspace-Job_02/lib/...' is not under client's root 'jenkins/workspace-Job_01/lib/...'. org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: WorkflowScript: Loading libraries failed 1 error at org.codehaus.groovy.control.ErrorCollector.failIfErrors(ErrorCollector.java:310) at org.codehaus.groovy.control.CompilationUnit.applyToPrimaryClassNodes(CompilationUnit.java:1085) at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:603) at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:581) at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:558) at groovy.lang.GroovyClassLoader.doParseClass(GroovyClassLoader.java:298) at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:268) at groovy.lang.GroovyShell.parseClass(GroovyShell.java:688) at groovy.lang.GroovyShell.parse(GroovyShell.java:700) at org.jenkinsci.plugins.workflow.cps.CpsGroovyShell.doParse(CpsGroovyShell.java:131) at org.jenkinsci.plugins.workflow.cps.CpsGroovyShell.reparse(CpsGroovyShell.java:125) at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.parseScript(CpsFlowExecution.java:560) at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.start(CpsFlowExecution.java:521) at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:329) at hudson.model.ResourceController.execute(ResourceController.java:97) at hudson.model.Executor.run(Executor.java:429) Finished: FAILURE I am running Jenkins 2.130 and P4 1.8.10. 
          Hide
          p4paul Paul Allen added a comment -

          Resolved in 1.8.12

          Related to JENKINS-50975

          Show
          p4paul Paul Allen added a comment - Resolved in 1.8.12 Related to  JENKINS-50975

            People

            • Assignee:
              p4paul Paul Allen
              Reporter:
              simon_watts Simon Watts
            • Votes:
              4 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: