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

System Configuration issue post Jenkins upgrade

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Critical
    • Resolution: Not A Defect
    • _unsorted
    • None

    Description

      An instance of Jenkins started not saving changes made under 'Manage Jenkins > System Configuration'.

      In an attempt to solve it, I have 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)
      ...

      Unfortunately, it is not clear where the problem comes from.

      I have tried the following:

      1. Stop jenkins
      2. Delete $JENKINS_HOME/config.xml (after making a copy)
      3. Start jenkins

      It did solve the saving issue but all the security configurations (i.e. logins/users and the Matrix-based authorizations, as far as I have checked) were missing after that, hence I have reverted to the old config.xml.

       

      From where I stand, I see 2 problems:

      • Incomplete information on where is the issue
      • Format migration of the XML files not being applied when upgrading jenkins and/or its plugins

      Attachments

        Activity

          markewaite Mark Waite added a comment -

          Please refer to the steps listed at https://community.jenkins.io/t/migrating-jenkins/894/5 in order to investigate issues related to saving configuration forms. Jenkins 2.277.1 updated the HTML to use div tags instead of table tags. That needed changes in many plugins. Some plugins have still not been updated. The steps in that page will guide you as you explore the specific configuration of your system and identify the plugins that may be causing the issue.

          markewaite Mark Waite added a comment - Please refer to the steps listed at https://community.jenkins.io/t/migrating-jenkins/894/5 in order to investigate issues related to saving configuration forms. Jenkins 2.277.1 updated the HTML to use div tags instead of table tags. That needed changes in many plugins. Some plugins have still not been updated. The steps in that page will guide you as you explore the specific configuration of your system and identify the plugins that may be causing the issue.
          ceddaerrix Cedric H added a comment -

          As far as I have checked so far, I seem to have solved my issue (re-)doing the following:

          1. Stop jenkins
          2. Delete $JENKINS_HOME/config.xml (after making a copy)
          3. Start jenkins
          4. Login with the admin user
          5. Accessed 'Manage Jenkins > Configure Global Security' and set (as I used to have):
            1. Security Realm = Jenkins' own user database
            2. Authorization = Matrix-based security

           

          In my first attempt, I may have assumed that the 2 settings above should have been picked up from somewhere. Now I understand that they are part of the config.xml.

          I will do more test to be 100% sure that everything is OK now.

          ceddaerrix Cedric H added a comment - As far as I have checked so far, I seem to have solved my issue (re-)doing the following: Stop jenkins Delete $JENKINS_HOME/config.xml (after making a copy) Start jenkins Login with the admin user Accessed 'Manage Jenkins > Configure Global Security' and set (as I used to have): Security Realm = Jenkins' own user database Authorization = Matrix-based security   In my first attempt, I may have assumed that the 2 settings above should have been picked up from somewhere. Now I understand that they are part of the config.xml . I will do more test to be 100% sure that everything is OK now.

          People

            Unassigned Unassigned
            ceddaerrix Cedric H
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: