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 java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
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.