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

intermittent NoClassDefFoundError: Could not initialize class hudson.model.Hudson$MasterComputer

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: Critical Critical
    • core
    • None
    • LTS 2.303.1

      About half of the times Jenkins fails to start.

      The web UI displays:

      java.lang.NoClassDefFoundError: Could not initialize class hudson.model.Hudson$MasterComputer
        at jenkins.model.Jenkins.createComputer(Jenkins.java:3222)
        at hudson.model.AbstractCIBase.createNewComputerForNode(AbstractCIBase.java:162)
        at hudson.model.AbstractCIBase.updateComputer(AbstractCIBase.java:148)
        at hudson.model.AbstractCIBase.access$000(AbstractCIBase.java:48)
        at hudson.model.AbstractCIBase$2.run(AbstractCIBase.java:254)
        at hudson.model.Queue._withLock(Queue.java:1398)
        at hudson.model.Queue.withLock(Queue.java:1274)
        at hudson.model.AbstractCIBase.updateComputerList(AbstractCIBase.java:240)
        at jenkins.model.Jenkins.updateComputerList(Jenkins.java:1670)
        at jenkins.model.Jenkins.<init>(Jenkins.java:1023)
        at hudson.model.Hudson.<init>(Hudson.java:86)
        at hudson.model.Hudson.<init>(Hudson.java:82)
        at hudson.WebAppMain$3.run(WebAppMain.java:298)
      Caused: hudson.util.HudsonFailedToLoad
        at hudson.WebAppMain$3.run(WebAppMain.java:312)
      

      The log contains dozens of exceptions and stacktraces.

      Restarting often resolves the problem until the next time the service is restarted.

      This occurred after upgrading from 2.263.3 to 2.303.1

      The server was already running with OpenJDK11. That has not changed.

       

      Even a successful start results in 82345 lines of logging including 86 to 279 exceptions

          [JENKINS-66527] intermittent NoClassDefFoundError: Could not initialize class hudson.model.Hudson$MasterComputer

          Bram Mertens added a comment -

          It appears to be a problem with the update of openjdk.

           

          I reverted the entire update and tested by updating only openjdk:

          ---> Package java-11-openjdk-headless.x86_64 1:11.0.6.10-1.el7_7 will be updated
          ---> Package java-11-openjdk-headless.x86_64 1:11.0.12.0.7-0.el7_9 will be an update

          After this jenkins crashes as described.

          this is on RHEL7.

          Bram Mertens added a comment - It appears to be a problem with the update of openjdk.   I reverted the entire update and tested by updating only openjdk: ---> Package java-11-openjdk-headless.x86_64 1:11.0.6.10-1.el7_7 will be updated ---> Package java-11-openjdk-headless.x86_64 1:11.0.12.0.7-0.el7_9 will be an update After this jenkins crashes as described. this is on RHEL7.

          Mark Waite added a comment -

          We'll need more information about what makes your Jenkins installation different than the many installations where Jenkins 2.303.1 is running successfully with Java 11.

          Darin Pope reported in the 2.303.1 live stream that he's running on CentOS 7. The Jenkins Docker images use Adoptium Temurin Java 11.0.12, which should be very close to the rpm package you're using from RHEL 7. Possibly a small amount of available memory? Possibly some settings that are specific to your operating system?

          Mark Waite added a comment - We'll need more information about what makes your Jenkins installation different than the many installations where Jenkins 2.303.1 is running successfully with Java 11. Darin Pope reported in the 2.303.1 live stream that he's running on CentOS 7. The Jenkins Docker images use Adoptium Temurin Java 11.0.12, which should be very close to the rpm package you're using from RHEL 7. Possibly a small amount of available memory? Possibly some settings that are specific to your operating system?

          Bram Mertens added a comment -

          markewaite: Increasing the system's RAM from 2GB to 4GB does appear to resolve the problem.

          This controller does run a lot (192) plugins but has hardly any jobs.
          The [installation guide still says 256MB of RAM is sufficient to run the base system.

          Perhaps that needs to be reviewed?

          The same page does recommend 4GB+ for a small team but this instance is hardly used. (It is used mainly to test upgrades, new plugins etc.).

          Bram Mertens added a comment - markewaite : Increasing the system's RAM from 2GB to 4GB does appear to resolve the problem. This controller does run a lot (192) plugins but has hardly any jobs. The [installation guide still says 256MB of RAM is sufficient to run the base system. Perhaps that needs to be reviewed? The same page does recommend 4GB+ for a small team but this instance is hardly used. (It is used mainly to test upgrades, new plugins etc.).

          Mark Waite added a comment -

          RHEL 7 is no longer supported by the Jenkins project.

          Mark Waite added a comment - RHEL 7 is no longer supported by the Jenkins project.

            Unassigned Unassigned
            bram_mertens Bram Mertens
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: