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

An attempt to save the global configuration was made before it was loaded

    XMLWordPrintable

Details

    Description

      In an update from Jenkins version 2.204.4 to 2.332.1, I got the following error:

      java.lang.IllegalStateException: An attempt to save the global configuration was made before it was loaded
      	at jenkins.model.Jenkins.save(Jenkins.java:3519)
      	at jenkins.model.Jenkins.saveQuietly(Jenkins.java:3546)
      	at jenkins.model.Jenkins.setSecurityRealm(Jenkins.java:2743)
      	at jenkins.model.Jenkins$15.run(Jenkins.java:3481)
      	at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:175)
      	at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:305)
      	at jenkins.model.Jenkins$5.runTask(Jenkins.java:1156)
      	at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:222)
      	at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:121)
      	at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:68)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      	at java.lang.Thread.run(Unknown Source)
      Caused: org.jvnet.hudson.reactor.ReactorException
      	at org.jvnet.hudson.reactor.Reactor.execute(Reactor.java:291)
      	at jenkins.InitReactorRunner.run(InitReactorRunner.java:49)
      	at jenkins.model.Jenkins.executeReactor(Jenkins.java:1191)
      	at jenkins.model.Jenkins.<init>(Jenkins.java:981)
      	at hudson.model.Hudson.<init>(Hudson.java:86)
      	at hudson.model.Hudson.<init>(Hudson.java:82)
      	at hudson.WebAppMain$3.run(WebAppMain.java:247)
      Caused: hudson.util.HudsonFailedToLoad
      	at hudson.WebAppMain$3.run(WebAppMain.java:264)
      

      I was able to bypass this by commenting out the <authorizationStrategy> and <securityRealm> tags in the config.xml file, however; that wiped out all the Active Directory settings as well as all the Role Based permissions my company had saved.  I had saved a version of the config.xml, so I was able to manually recreate these roles, however; after having restarted Jenkins I am now receiving the same error.

      I do not want to have to re-enter all the roles each time Jenkins must be restarted, a fairly common action.

      Is there something I am doing incorrectly, or is this a Jenkins issue?

      The only workarounds I have found are the commenting out the xml tags or downgrading to Jenkins 2.263.1.  I tried the downgrade, but that did not work either.

      Thank you in advance.

      Edit: Removing the Active Directory plugin from the possible issue list.  I enabled only the Security Realm with AD enabled, and rebooted Jenkins.  The issue did not arise...

      Edit 2: Installing Configuration as Code plugin did not fix the issue, as there is still information saved in the <authorizationStrategy> block in config.xml which causes the error to arise on restart.

       

      Attachments

        Activity

          jander69 Jack Anderson created issue -
          jander69 Jack Anderson made changes -
          Field Original Value New Value
          Component/s role-strategy-plugin [ 15758 ]
          jander69 Jack Anderson made changes -
          Description In an update from Jenkins version 2.204.4 to 2.332.1, I got the following error:


          {code:java}
          java.lang.IllegalStateException: An attempt to save the global configuration was made before it was loaded
          at jenkins.model.Jenkins.save(Jenkins.java:3519)
          at jenkins.model.Jenkins.saveQuietly(Jenkins.java:3546)
          at jenkins.model.Jenkins.setSecurityRealm(Jenkins.java:2743)
          at jenkins.model.Jenkins$15.run(Jenkins.java:3481)
          at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:175)
          at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:305)
          at jenkins.model.Jenkins$5.runTask(Jenkins.java:1156)
          at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:222)
          at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:121)
          at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:68)
          at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
          at java.lang.Thread.run(Unknown Source)
          Caused: org.jvnet.hudson.reactor.ReactorException
          at org.jvnet.hudson.reactor.Reactor.execute(Reactor.java:291)
          at jenkins.InitReactorRunner.run(InitReactorRunner.java:49)
          at jenkins.model.Jenkins.executeReactor(Jenkins.java:1191)
          at jenkins.model.Jenkins.<init>(Jenkins.java:981)
          at hudson.model.Hudson.<init>(Hudson.java:86)
          at hudson.model.Hudson.<init>(Hudson.java:82)
          at hudson.WebAppMain$3.run(WebAppMain.java:247)
          Caused: hudson.util.HudsonFailedToLoad
          at hudson.WebAppMain$3.run(WebAppMain.java:264)
          {code}

          I was able to bypass this by commenting out the <authorizationStrategy> and <securityRealm> tags in the config.xml file, however; that wiped out all the Active Directory settings as well as all the Role Based permissions my company had saved.  I had saved a version of the config.xml, so I was able to manually recreate these roles, however; after having restarted Jenkins I am now receiving the same error.

          I do not want to have to re-enter all the roles each time Jenkins must be restarted, a fairly common action.

          Is there something I am doing incorrectly, or is this a Jenkins issue?

          The only workarounds I have found are the commenting out the xml tags or downgrading to Jenkins 2.263.1.  I tried the downgrade, but that did not work either.

          Thank you in advance.
          In an update from Jenkins version 2.204.4 to 2.332.1, I got the following error:
          {code:java}
          java.lang.IllegalStateException: An attempt to save the global configuration was made before it was loaded
          at jenkins.model.Jenkins.save(Jenkins.java:3519)
          at jenkins.model.Jenkins.saveQuietly(Jenkins.java:3546)
          at jenkins.model.Jenkins.setSecurityRealm(Jenkins.java:2743)
          at jenkins.model.Jenkins$15.run(Jenkins.java:3481)
          at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:175)
          at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:305)
          at jenkins.model.Jenkins$5.runTask(Jenkins.java:1156)
          at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:222)
          at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:121)
          at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:68)
          at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
          at java.lang.Thread.run(Unknown Source)
          Caused: org.jvnet.hudson.reactor.ReactorException
          at org.jvnet.hudson.reactor.Reactor.execute(Reactor.java:291)
          at jenkins.InitReactorRunner.run(InitReactorRunner.java:49)
          at jenkins.model.Jenkins.executeReactor(Jenkins.java:1191)
          at jenkins.model.Jenkins.<init>(Jenkins.java:981)
          at hudson.model.Hudson.<init>(Hudson.java:86)
          at hudson.model.Hudson.<init>(Hudson.java:82)
          at hudson.WebAppMain$3.run(WebAppMain.java:247)
          Caused: hudson.util.HudsonFailedToLoad
          at hudson.WebAppMain$3.run(WebAppMain.java:264)
          {code}
          I was able to bypass this by commenting out the <authorizationStrategy> and <securityRealm> tags in the config.xml file, however; that wiped out all the Active Directory settings as well as all the Role Based permissions my company had saved.  I had saved a version of the config.xml, so I was able to manually recreate these roles, however; after having restarted Jenkins I am now receiving the same error.

          I do not want to have to re-enter all the roles each time Jenkins must be restarted, a fairly common action.

          Is there something I am doing incorrectly, or is this a Jenkins issue?

          The only workarounds I have found are the commenting out the xml tags or downgrading to Jenkins 2.263.1.  I tried the downgrade, but that did not work either.

          Thank you in advance.

          Edit: Removing the Active Directory plugin from the possible issue list.  I enabled only the Security Realm with AD enabled, and rebooted Jenkins.  The issue did not arise...
          jander69 Jack Anderson made changes -
          Component/s active-directory-plugin [ 15526 ]
          jander69 Jack Anderson made changes -
          Description In an update from Jenkins version 2.204.4 to 2.332.1, I got the following error:
          {code:java}
          java.lang.IllegalStateException: An attempt to save the global configuration was made before it was loaded
          at jenkins.model.Jenkins.save(Jenkins.java:3519)
          at jenkins.model.Jenkins.saveQuietly(Jenkins.java:3546)
          at jenkins.model.Jenkins.setSecurityRealm(Jenkins.java:2743)
          at jenkins.model.Jenkins$15.run(Jenkins.java:3481)
          at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:175)
          at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:305)
          at jenkins.model.Jenkins$5.runTask(Jenkins.java:1156)
          at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:222)
          at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:121)
          at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:68)
          at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
          at java.lang.Thread.run(Unknown Source)
          Caused: org.jvnet.hudson.reactor.ReactorException
          at org.jvnet.hudson.reactor.Reactor.execute(Reactor.java:291)
          at jenkins.InitReactorRunner.run(InitReactorRunner.java:49)
          at jenkins.model.Jenkins.executeReactor(Jenkins.java:1191)
          at jenkins.model.Jenkins.<init>(Jenkins.java:981)
          at hudson.model.Hudson.<init>(Hudson.java:86)
          at hudson.model.Hudson.<init>(Hudson.java:82)
          at hudson.WebAppMain$3.run(WebAppMain.java:247)
          Caused: hudson.util.HudsonFailedToLoad
          at hudson.WebAppMain$3.run(WebAppMain.java:264)
          {code}
          I was able to bypass this by commenting out the <authorizationStrategy> and <securityRealm> tags in the config.xml file, however; that wiped out all the Active Directory settings as well as all the Role Based permissions my company had saved.  I had saved a version of the config.xml, so I was able to manually recreate these roles, however; after having restarted Jenkins I am now receiving the same error.

          I do not want to have to re-enter all the roles each time Jenkins must be restarted, a fairly common action.

          Is there something I am doing incorrectly, or is this a Jenkins issue?

          The only workarounds I have found are the commenting out the xml tags or downgrading to Jenkins 2.263.1.  I tried the downgrade, but that did not work either.

          Thank you in advance.

          Edit: Removing the Active Directory plugin from the possible issue list.  I enabled only the Security Realm with AD enabled, and rebooted Jenkins.  The issue did not arise...
          In an update from Jenkins version 2.204.4 to 2.332.1, I got the following error:
          {code:java}
          java.lang.IllegalStateException: An attempt to save the global configuration was made before it was loaded
          at jenkins.model.Jenkins.save(Jenkins.java:3519)
          at jenkins.model.Jenkins.saveQuietly(Jenkins.java:3546)
          at jenkins.model.Jenkins.setSecurityRealm(Jenkins.java:2743)
          at jenkins.model.Jenkins$15.run(Jenkins.java:3481)
          at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:175)
          at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:305)
          at jenkins.model.Jenkins$5.runTask(Jenkins.java:1156)
          at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:222)
          at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:121)
          at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:68)
          at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
          at java.lang.Thread.run(Unknown Source)
          Caused: org.jvnet.hudson.reactor.ReactorException
          at org.jvnet.hudson.reactor.Reactor.execute(Reactor.java:291)
          at jenkins.InitReactorRunner.run(InitReactorRunner.java:49)
          at jenkins.model.Jenkins.executeReactor(Jenkins.java:1191)
          at jenkins.model.Jenkins.<init>(Jenkins.java:981)
          at hudson.model.Hudson.<init>(Hudson.java:86)
          at hudson.model.Hudson.<init>(Hudson.java:82)
          at hudson.WebAppMain$3.run(WebAppMain.java:247)
          Caused: hudson.util.HudsonFailedToLoad
          at hudson.WebAppMain$3.run(WebAppMain.java:264)
          {code}
          I was able to bypass this by commenting out the <authorizationStrategy> and <securityRealm> tags in the config.xml file, however; that wiped out all the Active Directory settings as well as all the Role Based permissions my company had saved.  I had saved a version of the config.xml, so I was able to manually recreate these roles, however; after having restarted Jenkins I am now receiving the same error.

          I do not want to have to re-enter all the roles each time Jenkins must be restarted, a fairly common action.

          Is there something I am doing incorrectly, or is this a Jenkins issue?

          The only workarounds I have found are the commenting out the xml tags or downgrading to Jenkins 2.263.1.  I tried the downgrade, but that did not work either.

          Thank you in advance.

          Edit: Removing the Active Directory plugin from the possible issue list.  I enabled only the Security Realm with AD enabled, and rebooted Jenkins.  The issue did not arise...

          Edit 2: Installing Configuration as Code plugin did not fix the issue, as there is still information saved in the <authorizationStrategy> block in config.xml which causes the error to arise on restart.

           
          jander69 Jack Anderson made changes -
          Resolution Not A Defect [ 7 ]
          Status Open [ 1 ] Fixed but Unreleased [ 10203 ]

          People

            Unassigned Unassigned
            jander69 Jack Anderson
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: