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

Jenkins cannot restart because of NoClassDefFoundError of CloudHelper

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: In Review (View Workflow)
    • Priority: Critical
    • Resolution: Unresolved
    • Component/s: ec2-plugin
    • Labels:
      None
    • Similar Issues:

      Description

      • Start Jenkins 2.235 without any plugin installation
      • Install ec2-plugin 1.50.2
      • Configure a ec2 cloud
      • Configure a linux template
      • Run some job to check it works
      • Install manually a new version of ec2-plugin (silly change) to test it
      • Click restart Jenkins
      • Jenkins doesn't start any time you try failing with:
      2020-05-09 12:19:26.516+0000 [id=38]    WARNING jenkins.model.Jenkins$5#runTask: Loading global config failed perhaps due to plugin dependency issues
      java.lang.LinkageError: loader constraint violation: when resolving method "org.slf4j.impl.StaticLoggerBinder.getLoggerFactory()Lorg/slf4j/ILoggerFactory;" the class loader (instance of hudson/PluginFirstClassLoader) of the current class, org/slf4j/LoggerFactory, and the class loader (instance of org/eclipse/jetty/webapp/WebAppClassLoader) for the method's defining class, org/slf4j/impl/StaticLoggerBinder, have different Class objects for the type org/slf4j/ILoggerFactory used in the signature
              at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:418)
              at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:357)
              at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:383)
              at hudson.plugins.ec2.CloudHelper.<clinit>(CloudHelper.java:24)
              at hudson.plugins.ec2.EC2Computer.getState(EC2Computer.java:139)
              at hudson.plugins.ec2.EC2RetentionStrategy.start(EC2RetentionStrategy.java:241)
              at hudson.plugins.ec2.EC2RetentionStrategy.start(EC2RetentionStrategy.java:52)
              at hudson.model.AbstractCIBase.updateComputer(AbstractCIBase.java:162)
              at hudson.model.AbstractCIBase.access$000(AbstractCIBase.java:44)
              at hudson.model.AbstractCIBase$2.run(AbstractCIBase.java:224)
              at hudson.model.Queue._withLock(Queue.java:1398)
              at hudson.model.Queue.withLock(Queue.java:1275)
              at hudson.model.AbstractCIBase.updateComputerList(AbstractCIBase.java:207)
              at jenkins.model.Jenkins.updateComputerList(Jenkins.java:1635)
              at jenkins.model.Nodes$9.run(Nodes.java:351)
              at hudson.model.Queue._withLock(Queue.java:1398)
              at hudson.model.Queue.withLock(Queue.java:1275)
              at jenkins.model.Nodes.load(Nodes.java:346)
              at jenkins.model.Jenkins$13.run(Jenkins.java:3254)
              at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:169)
              at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:296)
              at jenkins.model.Jenkins$5.runTask(Jenkins.java:1131)
              at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:214)
              at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
              at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:59)
              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)
      
      
      ...
      
      
      
      
      2020-05-09 12:19:27.321+0000 [id=46]    SEVERE  hudson.triggers.SafeTimerTask#run: Timer task hudson.slaves.ComputerRetentionWork@5988e277 failed
      java.lang.NoClassDefFoundError: Could not initialize class hudson.plugins.ec2.CloudHelper
              at hudson.plugins.ec2.EC2Computer.getState(EC2Computer.java:139)
              at hudson.plugins.ec2.EC2RetentionStrategy.internalCheck(EC2RetentionStrategy.java:146)
              at hudson.plugins.ec2.EC2RetentionStrategy.check(EC2RetentionStrategy.java:107)
              at hudson.plugins.ec2.EC2RetentionStrategy.check(EC2RetentionStrategy.java:52)
              at hudson.slaves.ComputerRetentionWork$1.run(ComputerRetentionWork.java:70)
              at hudson.model.Queue._withLock(Queue.java:1398)
              at hudson.model.Queue.withLock(Queue.java:1275)
              at hudson.slaves.ComputerRetentionWork.doRun(ComputerRetentionWork.java:61)
              at hudson.triggers.SafeTimerTask.run(SafeTimerTask.java:91)
              at jenkins.security.ImpersonatingScheduledExecutorService$1.run(ImpersonatingScheduledExecutorService.java:58)
              at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
              at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
              at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
              at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
              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)
      
      

      The problem is that the logger used is org.slf4j.Logger instead of the usual java.util.logging.Logger

        Attachments

          Issue Links

            Activity

            Show
            mramonleon Ramon Leon added a comment - PR: https://github.com/jenkinsci/ec2-plugin/pull/461

              People

              Assignee:
              mramonleon Ramon Leon
              Reporter:
              mramonleon Ramon Leon
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated: