Home > database >  Jenkins System configuration error when saving
Jenkins System configuration error when saving

Time:09-13

An instance of Jenkins started not saving changes made under 'Manage Jenkins > System Configuration'. In an attempt to solve it, I have recently upgraded to Jenkins 2.346.3 (including all the plugins). Unfortunately, this behavior still persists and the System Log only shows:

Error while serving http://<jenkins_url>/configSubmit
java.lang.ClassCastException: java.lang.Integer cannot be cast to hudson.model.Describable
    at hudson.util.DescribableList.get(DescribableList.java:128)
    at hudson.util.DescribableList.rebuild(DescribableList.java:170)
    at jenkins.model.GlobalNodePropertiesConfiguration.configure(GlobalNodePropertiesConfiguration.java:24)
    at jenkins.model.Jenkins.configureDescriptor(Jenkins.java:4017)
    at jenkins.model.Jenkins.doConfigSubmit(Jenkins.java:3981)
    at java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:627)
    at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:397)
Caused: java.lang.reflect.InvocationTargetException
    at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:401)
    at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:409)
    at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:207)
    <snippet>

Any idea on the possible cause?


UPDATE

After 2 attempts on restarting Jenkins without the config.xml, I succeeded in having Jenkins 'Manage Jenkins > System Configuration' behaving as expected. After the first attempt, I reverted to the old configuration file as all the security related configurations were missing and I ended up raising the ticket https://issues.jenkins.io/browse/JENKINS-69548

On the 2nd attempt, I did what I described in the ticket comment https://issues.jenkins.io/browse/JENKINS-69548?focusedCommentId=430091&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-430091 (i.e. re-introducing the security-related configurations)

CodePudding user response:

You probably have a corrupted config.xml from your old installation. Try deleting the config.xml(Back it up) located at $JENKINS_HOME(if you have not changed the default JENKINS_HOME in most cases it will be at USER_HOME/.jenkins(~/.jenkins)) and restarting Jenkins. If it's successful you can start reconfiguring or moving the configs from there.

  • Related