Upgrading Jenkins Requires Double Restart

Article ID:223690888
2 minute readKnowledge base

Issue

Upgrading CloudBees Jenkins Enterprise causes a banner stating "This Jenkins Instance must be restarted to complete license activation".

Environment

  • CloudBees Jenkins Enterprise

  • CloudBees Jenkins Operations Center

Resolution

Double restart might be needed

A double restart of your Jenkins instance will resolve this issue as documented on our documentation

After performing double restart still get the banner

If after performing the double restart you are still getting the message "This Jenkins Instance must be restarted to complete license activation" then likely there is a failed bundled plugin on the instance.

Check 1. Check that the cloudbees-license plugin is at least in version 7.13

Firstly, ensure that cloudbees-license plugin >= 7.13 and then:

Check 2. Check there is not any failed plugin on the instance from a support bundle

  1. Generate a support-bundle

  2. Go to the section plugins/failed

  3. Check if there is any failed plugin and fix the issue

  4. Restart the instance - after this you might need to perform a last double restart.

Check 3. Check there is not any disabled plugin which is bundled on jenkins.war

When a new license is applied the PluginHelper iterates through all the bundled plugins inside jenkins.war and compare with the ones inside the $JENKINS_HOME. When a disabled plugin is in $JENKINS_HOME the following is executed. https://github.com/jenkinsci/optional-plugin-helper-module/blob/master/src/main/java/org/jenkinsci/modules/optpluginhelper/PluginHelper.java#L435

Then, right after, link:(PluginHelper tries to add the new plugins - even if those are disabled - so the operation above might have a NFS collision with this one - what is a bug on the product, but will not be fixed since in the next release of the product - first Jenkins 2.0 release - we don’t use this mechanism anymore. https://github.com/jenkinsci/optional-plugin-helper-module/blob/master/src/main/java/org/jenkinsci/modules/optpluginhelper/PluginHelper.java#L451

In short, if there is any disabled plugin which is bundled on the jenkins.war and you are using a NFS system, you might get the banner. The solution is for the moment to enable all the bundled plugins in the instance to avoid this problem until you install Jenkins 2.0

Notice that this issue might happen in case you use NFS and you have disabled bundled plugins.

Still getting the banner?

If after this, you still get the banner:

  1. Create a custom logger for org.jenkinsci.modules.optpluginhelper = ALL

  2. Restart the instance

  3. Once you get the banner again generate a support bundle and open a case attaching the support bundle.