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

Jenkins failed to start after updating pluins and restart

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      I have tried to install role-strategy-plugin, then it requires me to update matrix auth and cloudbees folder and then restart.

      I did that and it cannot be started again

      I have checked that there is no disabled files + I have tried to remove the installed/updated files, but it does not work.

      Also, I lost the previous version of config.xml so I cannot roll back.

      Please Help me, I cannot leave the office with this problem going on...

       

      The errors are:

       

      hudson.util.HudsonFailedToLoad: org.jvnet.hudson.reactor.ReactorException: java.io.IOException: Unable to read C:\Program Files (x86)\Jenkins-232\config.xml

      Caused by: org.jvnet.hudson.reactor.ReactorException: java.io.IOException: Unable to read C:\Program Files (x86)\Jenkins-232\config.xml

      ...

      Caused by: java.io.IOException: Unable to read C:\Program Files (x86)\Jenkins-232\config.xml

      ...

      Caused by: jenkins.util.xstream.CriticalXStreamException: hudson.security.ProjectMatrixAuthorizationStrategy : hudson.security.ProjectMatrixAuthorizationStrategy
      ---- Debugging information ----
      message : hudson.security.ProjectMatrixAuthorizationStrategy
      cause-exception : com.thoughtworks.xstream.mapper.CannotResolveClassException
      cause-message : hudson.security.ProjectMatrixAuthorizationStrategy
      class : hudson.model.Hudson
      required-type : hudson.model.Hudson
      converter-type : hudson.util.RobustReflectionConverter
      path : /hudson/authorizationStrategy
      line number : 10
      version : not available

      ...

      Caused by: com.thoughtworks.xstream.mapper.CannotResolveClassException: hudson.security.ProjectMatrixAuthorizationStrategy

      ...

       

      config.xml: 

      <?xml version='1.0' encoding='UTF-8'?>

      ....

      <authorizationStrategy class="hudson.security.ProjectMatrixAuthorizationStrategy">
        <permission>hudson.model.Hudson.Administer:HK IT Team</permission>
      <permission>hudson.model.Hudson.Administer:bchuang</permission>
      <permission>hudson.model.Hudson.Read:anonymous</permission>
      <permission>hudson.model.Hudson.Read:authenticated</permission>
      <permission>hudson.model.Hudson.RunScripts:authenticated</permission>
      <permission>hudson.model.Item.Build:anonymous</permission>
      <permission>hudson.model.Item.Discover:anonymous</permission>
      <permission>hudson.model.Item.Read:anonymous</permission>
      <permission>hudson.model.View.Read:anonymous</permission>
      </authorizationStrategy>

       

       

      Please help me!

       

       

       

        Attachments

          Activity

          Hide
          dnusbaum Devin Nusbaum added a comment -

          Sam Tang This kind of question is much better suited for the jenkinsci-users mailing list or IRC, see https://jenkins.io/mailing-lists/ and https://jenkins.io/chat/.

          Based on CannotResolveClassException: hudson.security.ProjectMatrixAuthorizationStrategy, it looks like you do not have the Matrix Authorization Strategy Plugin installed, or maybe your version is too old. I would post your question on the mailing list or ask in IRC, and include the output of `ls -l $JENKINS_HOME/plugins` so we can see what plugins are installed on your instance. If matrix-auth is not listed in that directory, then I would manually download https://updates.jenkins.io/2.73/latest/matrix-auth.hpi and copy into that directory and try to restart. I would also make sure to take a backup of your current Jenkins Home directory before you lose any additional data or configuration.

          Show
          dnusbaum Devin Nusbaum added a comment - Sam Tang This kind of question is much better suited for the jenkinsci-users mailing list or IRC, see https://jenkins.io/mailing-lists/ and https://jenkins.io/chat/ . Based on CannotResolveClassException: hudson.security.ProjectMatrixAuthorizationStrategy , it looks like you do not have the Matrix Authorization Strategy Plugin installed, or maybe your version is too old. I would post your question on the mailing list or ask in IRC, and include the output of `ls -l $JENKINS_HOME/plugins` so we can see what plugins are installed on your instance. If matrix-auth is not listed in that directory, then I would manually download https://updates.jenkins.io/2.73/latest/matrix-auth.hpi and copy into that directory and try to restart. I would also make sure to take a backup of your current Jenkins Home directory before you lose any additional data or configuration.
          Hide
          neiamenase Sam Tang added a comment - - edited

          The first 2 entries in mailing list is gone, I guess... 

          Thanks for your reply, I appreciate it. 

          I am here to report that the problem is sovled, hoping it might help anyone in the future.

          The error caused by

          1. very old version of Jenkins (2.32.2), well... it seems the colleagues in my new company do not maintain Jenkins.

          2. some latest plugins installed / updated, in this case, role-strategy, matrix auth and cloudbees folder

          3. Afterthat, Jenkins required me to restart, I restart jenkins by pressing the button located on the bottom left corner of Update Center (Dashboard > Manage Jenkins -> Manage Plugins -> Intalled> Restart Once No Jobs Are Running).

          4. Jenkins went down...

          5. I guessed maybe it is some dependency issue, so I download all the dependent plugins for role-strategy, matrix auth and cloudbees folder with latest version, but it is still down.

          6. Lastly, I have sort of "solve" the problem by replacing ProjectMatrixAuthorizationStrategy in config.xml with FullControlOnceLoggedInAuthorizationStrategy. Jenkins can be accessed by my team members now.

           

          Maybe the solution is to update Jenkins, well, In my company, updating the whole system requires some time for discussion amoung the leaders, so I could not give it a try. Anyway, once it is accessible, my leaders had just finished the discussion and agreed to update Jenkins.

          But sadly, ALL OF THE ABOVE REASONS ARE MY HYPOTHESIS, NO EXCEPTION REALLY TOLD ME WHAT HAPPENS

           

           

          Show
          neiamenase Sam Tang added a comment - - edited The first 2 entries in mailing list is gone, I guess...  Thanks for your reply, I appreciate it.  I am here to report that the problem is sovled, hoping it might help anyone in the future. The error caused by 1. very old version of Jenkins (2.32.2), well... it seems the colleagues in my new company do not maintain Jenkins. 2. some latest plugins installed / updated, in this case, role-strategy, matrix auth and cloudbees folder 3. Afterthat, Jenkins required me to restart, I restart jenkins by pressing the button located on the bottom left corner of Update Center (Dashboard > Manage Jenkins -> Manage Plugins -> Intalled> Restart Once No Jobs Are Running). 4. Jenkins went down... 5. I guessed maybe it is some dependency issue, so I download all the dependent plugins for role-strategy, matrix auth and cloudbees folder with latest version, but it is still down. 6. Lastly, I have sort of "solve" the problem by replacing ProjectMatrixAuthorizationStrategy in config.xml with  FullControlOnceLoggedInAuthorizationStrategy.  Jenkins can be accessed by my team members now.   Maybe the solution is to update Jenkins, well, In my company, updating the whole system requires some time for discussion amoung the leaders, so I could not give it a try. Anyway, once it is accessible, my leaders had just finished the discussion and agreed to update Jenkins. But sadly, ALL OF THE ABOVE REASONS ARE MY HYPOTHESIS, NO EXCEPTION REALLY TOLD ME WHAT HAPPENS    
          Hide
          dnusbaum Devin Nusbaum added a comment -

          Sam Tang I am glad to hear that the issue is fixed for you. I think it is very likely that the outdated Jenkins version was the problem. My guess is that when you manually updated dependencies you ended up with a plugin whose version was not compatible with 2.32.3. Normally in this case, you should get errors about "Failed to load plugin" in your Jenkins startup logs that indicate the version mismatch, so if you did not see those messages maybe your problem was something else, although I do not have any other ideas of what could have happened.

          Show
          dnusbaum Devin Nusbaum added a comment - Sam Tang I am glad to hear that the issue is fixed for you. I think it is very likely that the outdated Jenkins version was the problem. My guess is that when you manually updated dependencies you ended up with a plugin whose version was not compatible with 2.32.3. Normally in this case, you should get errors about "Failed to load plugin" in your Jenkins startup logs that indicate the version mismatch, so if you did not see those messages maybe your problem was something else, although I do not have any other ideas of what could have happened.

            People

            • Assignee:
              dnusbaum Devin Nusbaum
              Reporter:
              neiamenase Sam Tang
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: