• Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • pipeline
    • Jenkins 2.222.1

      After a recent resatrt of the server on which Jenkins is running, Jenkins failed to resume most of the pipeline jobs - there were no updates made to plugins nor to jenkins itself

      [2020-05-08T15:00:44.723Z] Input requested
      Resuming build at Mon May 11 01:26:46 CEST 2020 after Jenkins restart
      Waiting to resume part of Delivery Pipelines » mdp-delivery-pipeline » master mdp-release-1.5.52#23: In the quiet period. Expires in 0 ms
      [Pipeline] End of Pipeline
      [Bitbucket] Notifying commit build result
      [Bitbucket] Build result notified
      java.lang.ClassNotFoundException: ch.swisscard.jenkins.pipeline.util.OctopusUtils
      	at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
      	at java.lang.ClassLoader.loadClass(ClassLoader.java:419)
      	at groovy.lang.GroovyClassLoader.loadClass(GroovyClassLoader.java:677)
      	at groovy.lang.GroovyClassLoader.loadClass(GroovyClassLoader.java:787)
      	at groovy.lang.GroovyClassLoader.loadClass(GroovyClassLoader.java:775)
      	at java.lang.Class.forName0(Native Method)
      	at java.lang.Class.forName(Class.java:348)
      	at org.jboss.marshalling.AbstractClassResolver.loadClass(AbstractClassResolver.java:123)
      ...
      Caused: java.io.IOException: Failed to load build state
      	at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution$3.onSuccess(CpsFlowExecution.java:855)
      	at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution$3.onSuccess(CpsFlowExecution.java:853)
      	at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution$4$1.run(CpsFlowExecution.java:907)
      	at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$1.run(CpsVmExecutorService.java:38)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      	at hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:131)
      	at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
      	at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:59)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      	at java.lang.Thread.run(Thread.java:748

      Check jenkins.log for detailed call stack

          [JENKINS-62248] Pipeline fails to resume after master restart

          Patrick Riegler added a comment - - edited

          We ran into a similar problem and it took us a while to figure out the solution.

          In our case the issue was, that the name of the "package" in the included library wasn't properly defined.
          It is essential, that the name of the package is the same as the folder path and filename as described in this example:
          https://www.jenkins.io/doc/book/pipeline/shared-libraries/#writing-libraries

          // src/org/foo/Zot.groovy 
          package org.foo 
          
          def checkOutFrom(repo) { 
            git url: "git@github.com:jenkinsci/${repo}" 
          } 
          
          return this 

          and in the pipeline script use:

          def z = new org.foo.Zot()
          z.checkOutFrom(repo) 

          It would work if the package is called:

          package org.something.foo  

          but the class cannot be found after serialization.

          I hope this is of help 

          Patrick Riegler added a comment - - edited We ran into a similar problem and it took us a while to figure out the solution. In our case the issue was, that the name of the "package" in the included library wasn't properly defined. It is essential, that the name of the package is the same as the folder path and filename as described in this example: https://www.jenkins.io/doc/book/pipeline/shared-libraries/#writing-libraries // src/org/foo/Zot.groovy package org.foo  def checkOutFrom(repo) { git url: "git@github.com:jenkinsci/${repo}" } return this and in the pipeline script use: def z = new org.foo.Zot() z.checkOutFrom(repo) It would work if the package is called: package org.something.foo  but the class cannot be found after serialization. I hope this is of help 

          papanito added a comment -

          Thanks for the update. Guess the issue can be closed then

          papanito added a comment - Thanks for the update. Guess the issue can be closed then

            Unassigned Unassigned
            papanito papanito
            Votes:
            3 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: