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

GitHub Plugins cause dead Jenkins after 2.0 upgrade

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Not A Defect
    • Component/s: core
    • Environment:
      Debian Jessie
      java version "1.7.0_95"
      OpenJDK Runtime Environment (IcedTea 2.6.4) (7u95-2.6.4-1~deb8u1)
      OpenJDK 64-Bit Server VM (build 24.95-b01, mixed mode)
      Jenkins installed from Debian Repositories
    • Similar Issues:

      Description

      I was upgrading Jenkins from 1.656 to 2.0 when I stumbled on this issue. My Jenkins installation comes from the DEB packages provided by http://pkg.jenkins-ci.org/debian.

      My procedure for the update was the following:

      • Unpin all Plugins (problem also exists if I don't do this)
      • Update all Plugins to their latest version (problem also exists if I don't do this)
      • Shutdown Jenkins
      • Update the DEB packages
      • Start Jenkins
      • Run the "New feature wizard"
      • Restart Jenkins

      All went well until the "Install new features"-wizard tries to install a series of plugins. Since I've already experimented with workflows, only the following plugins are installed:

      • Pipeline
      • Pipeline: REST API Plugin
      • JavaScript GUI Lib: Handlebars bundle plugin
      • JavaScript GUI Lib: Moment.js bundle plugin
      • Pipeline: Stage View Plugin
      • GitHub API Plugin
      • Plain Credentials Plugin
      • GitHub plugin
      • GitHub Branch Source Plugin
      • GitHub Organization Folder Plugin

      The last Plugin fails to install with the following error:

      java.io.IOException: Failed to dynamically deploy this plugin
      	at hudson.model.UpdateCenter$InstallationJob._run(UpdateCenter.java:1678)
      	at hudson.model.UpdateCenter$DownloadJob.run(UpdateCenter.java:1456)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:262)
      	at hudson.remoting.AtmostOneThreadExecutor$Worker.run(AtmostOneThreadExecutor.java:110)
      	at java.lang.Thread.run(Thread.java:745)
      Caused by: java.io.IOException: Failed to install github-organization-folder plugin
      	at hudson.PluginManager.dynamicLoad(PluginManager.java:698)
      	at hudson.model.UpdateCenter$InstallationJob._run(UpdateCenter.java:1674)
      	... 5 more
      Caused by: jenkins.ExtensionRefreshException: com.google.inject.internal.guava.collect.$ComputationException: java.lang.NoClassDefFoundError: org/jenkinsci/plugins/workflow/job/WorkflowJob
      	at hudson.ExtensionFinder$GuiceFinder.refresh(ExtensionFinder.java:347)
      	at jenkins.model.Jenkins.refreshExtensions(Jenkins.java:2383)
      	at hudson.PluginManager.dynamicLoad(PluginManager.java:691)
      	... 6 more
      Caused by: com.google.inject.internal.guava.collect.$ComputationException: java.lang.NoClassDefFoundError: org/jenkinsci/plugins/workflow/job/WorkflowJob
      	at com.google.inject.internal.guava.collect.$ComputingConcurrentHashMap$ComputingMapAdapter.get(ComputingConcurrentHashMap.java:397)
      	at com.google.inject.internal.FailableCache.get(FailableCache.java:49)
      	at com.google.inject.internal.MembersInjectorStore.get(MembersInjectorStore.java:66)
      	at com.google.inject.internal.ConstructorInjectorStore.createConstructor(ConstructorInjectorStore.java:74)
      	at com.google.inject.internal.ConstructorInjectorStore.access$000(ConstructorInjectorStore.java:29)
      	at com.google.inject.internal.ConstructorInjectorStore$1.create(ConstructorInjectorStore.java:37)
      	at com.google.inject.internal.ConstructorInjectorStore$1.create(ConstructorInjectorStore.java:33)
      	at com.google.inject.internal.FailableCache$1.apply(FailableCache.java:38)
      	at com.google.inject.internal.guava.collect.$ComputingConcurrentHashMap$ComputingValueReference.compute(ComputingConcurrentHashMap.java:355)
      	at com.google.inject.internal.guava.collect.$ComputingConcurrentHashMap$ComputingSegment.compute(ComputingConcurrentHashMap.java:184)
      	at com.google.inject.internal.guava.collect.$ComputingConcurrentHashMap$ComputingSegment.getOrCompute(ComputingConcurrentHashMap.java:153)
      	at com.google.inject.internal.guava.collect.$ComputingConcurrentHashMap.getOrCompute(ComputingConcurrentHashMap.java:69)
      	at com.google.inject.internal.guava.collect.$ComputingConcurrentHashMap$ComputingMapAdapter.get(ComputingConcurrentHashMap.java:393)
      	at com.google.inject.internal.FailableCache.get(FailableCache.java:49)
      	at com.google.inject.internal.ConstructorInjectorStore.get(ConstructorInjectorStore.java:50)
      	at com.google.inject.internal.ConstructorBindingImpl.initialize(ConstructorBindingImpl.java:137)
      	at com.google.inject.internal.InjectorImpl.initializeBinding(InjectorImpl.java:537)
      	at com.google.inject.internal.AbstractBindingProcessor$Processor$1.run(AbstractBindingProcessor.java:160)
      	at com.google.inject.internal.ProcessedBindingData.initializeBindings(ProcessedBindingData.java:44)
      	at com.google.inject.internal.InternalInjectorCreator.initializeStatically(InternalInjectorCreator.java:123)
      	at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:107)
      	at com.google.inject.internal.InjectorImpl.createChildInjector(InjectorImpl.java:230)
      	at hudson.ExtensionFinder$GuiceFinder.refresh(ExtensionFinder.java:334)
      	... 8 more
      Caused by: java.lang.NoClassDefFoundError: org/jenkinsci/plugins/workflow/job/WorkflowJob
      	at java.lang.Class.getDeclaredConstructors0(Native Method)
      	at java.lang.Class.privateGetDeclaredConstructors(Class.java:2595)
      	at java.lang.Class.getDeclaredConstructors(Class.java:1914)
      	at com.google.inject.spi.InjectionPoint.forConstructorOf(InjectionPoint.java:245)
      	at com.google.inject.internal.ConstructorBindingImpl.create(ConstructorBindingImpl.java:99)
      	at com.google.inject.internal.InjectorImpl.createUninitializedBinding(InjectorImpl.java:661)
      	at com.google.inject.internal.InjectorImpl.createJustInTimeBinding(InjectorImpl.java:871)
      	at com.google.inject.internal.InjectorImpl.createJustInTimeBindingRecursive(InjectorImpl.java:798)
      	at com.google.inject.internal.InjectorImpl.createJustInTimeBindingRecursive(InjectorImpl.java:787)
      	at com.google.inject.internal.InjectorImpl.createJustInTimeBindingRecursive(InjectorImpl.java:787)
      	at com.google.inject.internal.InjectorImpl.createJustInTimeBindingRecursive(InjectorImpl.java:787)
      	at com.google.inject.internal.InjectorImpl.createJustInTimeBindingRecursive(InjectorImpl.java:787)
      	at com.google.inject.internal.InjectorImpl.createJustInTimeBindingRecursive(InjectorImpl.java:787)
      	at com.google.inject.internal.InjectorImpl.createJustInTimeBindingRecursive(InjectorImpl.java:787)
      	at com.google.inject.internal.InjectorImpl.createJustInTimeBindingRecursive(InjectorImpl.java:787)
      	at com.google.inject.internal.InjectorImpl.createJustInTimeBindingRecursive(InjectorImpl.java:787)
      	at com.google.inject.internal.InjectorImpl.createJustInTimeBindingRecursive(InjectorImpl.java:787)
      	at com.google.inject.internal.InjectorImpl.getJustInTimeBinding(InjectorImpl.java:286)
      	at com.google.inject.internal.InjectorImpl.getBindingOrThrow(InjectorImpl.java:218)
      	at com.google.inject.internal.SingleFieldInjector.<init>(SingleFieldInjector.java:42)
      	at com.google.inject.internal.MembersInjectorStore.getInjectors(MembersInjectorStore.java:126)
      	at com.google.inject.internal.MembersInjectorStore.createWithListeners(MembersInjectorStore.java:96)
      	at com.google.inject.internal.MembersInjectorStore.access$000(MembersInjectorStore.java:35)
      	at com.google.inject.internal.MembersInjectorStore$1.create(MembersInjectorStore.java:43)
      	at com.google.inject.internal.MembersInjectorStore$1.create(MembersInjectorStore.java:40)
      	at com.google.inject.internal.FailableCache$1.apply(FailableCache.java:38)
      	at com.google.inject.internal.guava.collect.$ComputingConcurrentHashMap$ComputingValueReference.compute(ComputingConcurrentHashMap.java:355)
      	at com.google.inject.internal.guava.collect.$ComputingConcurrentHashMap$ComputingSegment.compute(ComputingConcurrentHashMap.java:184)
      	at com.google.inject.internal.guava.collect.$ComputingConcurrentHashMap$ComputingSegment.getOrCompute(ComputingConcurrentHashMap.java:153)
      	at com.google.inject.internal.guava.collect.$ComputingConcurrentHashMap.getOrCompute(ComputingConcurrentHashMap.java:69)
      	at com.google.inject.internal.guava.collect.$ComputingConcurrentHashMap$ComputingMapAdapter.get(ComputingConcurrentHashMap.java:393)
      	... 30 more
      Caused by: java.lang.ClassNotFoundException: org.jenkinsci.plugins.workflow.job.WorkflowJob
      	at jenkins.util.AntClassLoader.findClassInComponents(AntClassLoader.java:1376)
      	at jenkins.util.AntClassLoader.findClass(AntClassLoader.java:1326)
      	at jenkins.util.AntClassLoader.loadClass(AntClassLoader.java:1079)
      	at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
      	... 61 more
      

      When I restart Jenkins now, it will be dead (i.e. just come up with an error, no way to interact with the Web-UI). The error is the following:

      hudson.util.HudsonFailedToLoad: org.jvnet.hudson.reactor.ReactorException: java.lang.Error: java.lang.reflect.InvocationTargetException
      	at hudson.WebAppMain$3.run(WebAppMain.java:237)
      Caused by: org.jvnet.hudson.reactor.ReactorException: java.lang.Error: java.lang.reflect.InvocationTargetException
      	at org.jvnet.hudson.reactor.Reactor.execute(Reactor.java:269)
      	at jenkins.InitReactorRunner.run(InitReactorRunner.java:44)
      	at jenkins.model.Jenkins.executeReactor(Jenkins.java:1020)
      	at jenkins.model.Jenkins.<init>(Jenkins.java:864)
      	at hudson.model.Hudson.<init>(Hudson.java:85)
      	at hudson.model.Hudson.<init>(Hudson.java:81)
      	at hudson.WebAppMain$3.run(WebAppMain.java:225)
      Caused by: java.lang.Error: java.lang.reflect.InvocationTargetException
      	at hudson.init.TaskMethodFinder.invoke(TaskMethodFinder.java:110)
      	at hudson.init.TaskMethodFinder$TaskImpl.run(TaskMethodFinder.java:175)
      	at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:282)
      	at jenkins.model.Jenkins$8.runTask(Jenkins.java:1009)
      	at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:210)
      	at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      	at java.lang.Thread.run(Thread.java:745)
      Caused by: java.lang.reflect.InvocationTargetException
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:606)
      	at hudson.init.TaskMethodFinder.invoke(TaskMethodFinder.java:104)
      	... 8 more
      Caused by: java.lang.NullPointerException
      	at hudson.plugins.git.GitSCM.onLoaded(GitSCM.java:1734)
      	... 13 more
      

      Since I can't tell the Upgrade Wizard to exclude the Github Plugins a workaround I've found is to prevent the restart and after the wizard is done uninstall all GitHub Plugins (uninstall is required, just deactivating them is not sufficient). Only then will Jenkins come up again with a usable interface and no exceptions in the logs.

      This is an installation running on a test-server so if it helps, I can reset it to a snapshot before the update to gain additional info.

        Attachments

          Issue Links

            Activity

            Hide
            danielbeck Daniel Beck added a comment -

            Are there any disabled plugins? Maybe the Git plugin? If so, enable and restart, possibly by deleting the pluginname.jpi.disabled files in JENKINS_HOME/plugins

            Show
            danielbeck Daniel Beck added a comment - Are there any disabled plugins? Maybe the Git plugin? If so, enable and restart, possibly by deleting the pluginname.jpi.disabled files in JENKINS_HOME/plugins
            Hide
            derjan Jan Dohl added a comment -

            Yes, did another install after re-enabling all plugins and apparently that worked.

            Show
            derjan Jan Dohl added a comment - Yes, did another install after re-enabling all plugins and apparently that worked.
            Hide
            danielbeck Daniel Beck added a comment -

            Configuration issue, mostly.

            We have fixes for this in the pipeline (heh), which should get merged into Jenkins over the next few weeks.

            Show
            danielbeck Daniel Beck added a comment - Configuration issue, mostly. We have fixes for this in the pipeline (heh), which should get merged into Jenkins over the next few weeks.

              People

              • Assignee:
                Unassigned
                Reporter:
                derjan Jan Dohl
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: