mika / jenkins-debian-glue

Scripts for Debian package/repository handling inside Jenkins
MIT License
131 stars 91 forks source link

Failed Loading plugin Pipeline v2.6 (workflow-aggregator) #226

Open CyrilBrulebois opened 5 years ago

CyrilBrulebois commented 5 years ago

Hi,

Even with the patches from https://github.com/mika/jenkins-debian-glue/pull/225 I'm getting startup errors in the logs, due to plugin dependencies:

Failed Loading plugin Pipeline v2.6 (workflow-aggregator)
java.io.IOException: Pipeline version 2.6 failed to load.
 - workflow-cps-global-lib version 2.11 is missing. To fix, install version 2.11 or later.
 - pipeline-build-step version 2.7 is missing. To fix, install version 2.7 or later.
 - lockable-resources version 2.3 is missing. To fix, install version 2.3 or later.
 - cloudbees-folder version 6.6 is missing. To fix, install version 6.6 or later.
 - jackson2-api version 2.8.11.3 is missing. To fix, install version 2.8.11.3 or later.
 - workflow-cps version 2.56 is missing. To fix, install version 2.56 or later.
 - pipeline-stage-step version 2.3 is missing. To fix, install version 2.3 or later.
 - pipeline-stage-view version 2.10 is missing. To fix, install version 2.10 or later.
 - pipeline-model-definition version 1.3.2 is missing. To fix, install version 1.3.2 or later.
 - workflow-multibranch version 2.20 is missing. To fix, install version 2.20 or later.
 - pipeline-milestone-step version 1.3.1 is missing. To fix, install version 1.3.1 or later.
        at hudson.PluginWrapper.resolvePluginDependencies(PluginWrapper.java:868)
        at hudson.PluginManager$2$1$1.run(PluginManager.java:544)
        at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:169)
        at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:296)
        at jenkins.model.Jenkins$5.runTask(Jenkins.java:1095)
        at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:214)
        at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at java.base/java.lang.Thread.run(Thread.java:834)

A big issue is that the setup wizard isn't shown, and one has to log in without having an initial password as usual (under /var/lib/jenkins/secrets/initialAdminPassword).

I've tried to add those plugins using jenkins::plugin::install and re-install from scratch, but the list kept on growing and I'm not sure this is the right approach.

When adding this:

jenkins::plugin::install { ['workflow-cps-global-lib', 'pipeline-build-step', 'lockable-resources', 'cloudbees-folder', 'jackson2-api', 'workflow-cps', 'pipeline-stage-step', 'pipeline-stage-view', 'pipeline-model-definition', 'workflow-multibranch', 'pipeline-milestone-step']: }

I'm getting this in jenkins.log:

GRAVE: Failed Loading plugin Pipeline: Groovy v2.73 (workflow-cps)
java.io.IOException: Pipeline: Groovy version 2.73 failed to load.
 - ace-editor version 1.0.1 is missing. To fix, install version 1.0.1 or later.
 - jquery-detached version 1.2.1 is missing. To fix, install version 1.2.1 or later.
        at hudson.PluginWrapper.resolvePluginDependencies(PluginWrapper.java:868)
        at hudson.PluginManager$2$1$1.run(PluginManager.java:544)
        at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:169)
        at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:296)
        at jenkins.model.Jenkins$5.runTask(Jenkins.java:1095)
        at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:214)
        at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at java.base/java.lang.Thread.run(Thread.java:834)

août 11, 2019 5:49:55 AM jenkins.InitReactorRunner$1 onTaskFailed
GRAVE: Failed Loading plugin Pipeline: Stage View Plugin v2.12 (pipeline-stage-view)
java.io.IOException: Pipeline: Stage View Plugin version 2.12 failed to load.
 - jquery-detached version 1.2.1 is missing. To fix, install version 1.2.1 or later.
 - momentjs version 1.1 is missing. To fix, install version 1.1 or later.
 - pipeline-rest-api version 2.12 is missing. To fix, install version 2.12 or later.
 - handlebars version 1.1.1 is missing. To fix, install version 1.1.1 or later.
        at hudson.PluginWrapper.resolvePluginDependencies(PluginWrapper.java:868)
        at hudson.PluginManager$2$1$1.run(PluginManager.java:544)
        at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:169)
        at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:296)
        at jenkins.model.Jenkins$5.runTask(Jenkins.java:1095)
        at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:214)
        at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at java.base/java.lang.Thread.run(Thread.java:834)

août 11, 2019 5:49:55 AM jenkins.InitReactorRunner$1 onTaskFailed
GRAVE: Failed Loading plugin Pipeline: Shared Groovy Libraries v2.15 (workflow-cps-global-lib)
java.io.IOException: Pipeline: Shared Groovy Libraries version 2.15 failed to load.
 - Pipeline: Groovy version 2.73 failed to load. Fix this plugin first.
        at hudson.PluginWrapper.resolvePluginDependencies(PluginWrapper.java:868)
        at hudson.PluginManager$2$1$1.run(PluginManager.java:544)
        at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:169)
        at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:296)
        at jenkins.model.Jenkins$5.runTask(Jenkins.java:1095)
        at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:214)
        at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at java.base/java.lang.Thread.run(Thread.java:834)

août 11, 2019 5:49:55 AM jenkins.InitReactorRunner$1 onTaskFailed
GRAVE: Failed Loading plugin Pipeline: Multibranch v2.21 (workflow-multibranch)
java.io.IOException: Pipeline: Multibranch version 2.21 failed to load.
 - Pipeline: Groovy version 2.73 failed to load. Fix this plugin first.
        at hudson.PluginWrapper.resolvePluginDependencies(PluginWrapper.java:868)
        at hudson.PluginManager$2$1$1.run(PluginManager.java:544)
        at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:169)
        at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:296)
        at jenkins.model.Jenkins$5.runTask(Jenkins.java:1095)
        at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:214)
        at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at java.base/java.lang.Thread.run(Thread.java:834)

août 11, 2019 5:49:55 AM jenkins.InitReactorRunner$1 onTaskFailed
GRAVE: Failed Loading plugin Pipeline: Declarative v1.3.9 (pipeline-model-definition)
java.io.IOException: Pipeline: Declarative version 1.3.9 failed to load.
 - Pipeline: Shared Groovy Libraries version 2.15 failed to load. Fix this plugin first.
        at hudson.PluginWrapper.resolvePluginDependencies(PluginWrapper.java:868)
        at hudson.PluginManager$2$1$1.run(PluginManager.java:544)
        at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:169)
        at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:296)
        at jenkins.model.Jenkins$5.runTask(Jenkins.java:1095)
        at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:214)
        at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at java.base/java.lang.Thread.run(Thread.java:834)

août 11, 2019 5:49:55 AM jenkins.InitReactorRunner$1 onTaskFailed
GRAVE: Failed Loading plugin Pipeline v2.6 (workflow-aggregator)
java.io.IOException: Pipeline version 2.6 failed to load.
 - Pipeline: Stage View Plugin version 2.12 failed to load. Fix this plugin first.
        at hudson.PluginWrapper.resolvePluginDependencies(PluginWrapper.java:868)
        at hudson.PluginManager$2$1$1.run(PluginManager.java:544)
        at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:169)
        at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:296)
        at jenkins.model.Jenkins$5.runTask(Jenkins.java:1095)
        at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:214)
        at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at java.base/java.lang.Thread.run(Thread.java:834)

and still no setup wizard…

CyrilBrulebois commented 5 years ago

Since my use case isn't exactly a direct use of the jobs as set up by jenkins-debian-glue (I'm mostly using Pipeline: Multibranch jobs but relying on jenkins-debian-glue binaries/helpers), I've decided to disable most plugins, and only keep a handful where names sounded security-relevant. Which means keeping these:

[
 'credentials',
 'icon-shim',
 'ssh-credentials',
 'script-security',
 'structs',
]

(structs version 1.7 can be documented as a dependency of Credentials Plugin version 2.2.1)

And while writing this comment, I realized the absence of setup wizard is normal, just due to the config.xml put in place by the jenkins::config class (which I ended up disabling), so that's not a consequence of issues with plugin dependencies… I'm posting this comment anyway, in case someone else needs a minimal amount of plugins to base their work on. ;)

default-work commented 4 years ago

[ 'credentials', 'icon-shim', 'ssh-credentials', 'script-security', 'structs', ]

@CyrilBrulebois Hi, will you make tips or guidelines how to remove all plugins on my Ubuntu 16.04, using command line, bash nano or Web UI, i cant figure this out

mika commented 4 years ago

@CyrilBrulebois yeah, the dependencies of the plugins can't be handled and we need to track all of this manually :-/ I try to keep the plugin setup working for everything that's supposed to work OOTB from j-d-g's perspective and its provided example jobs. I am afraid everything else needs to be handled by the operator (unless someone comes up with a proper solution for handling Jenkins plugin and its dependencies), though this is usually easy to fix from within the web interface of Jenkins at least for now.

The Pipeline plugin and all its dependencies are kind of impossible to keep up2date with the infrastructure we currently rely on, but we don't use it in any of the provided j-d-g Jenkins jobs. Visiting Jenkins UI and clicking "Correct" should be the easiest fix for this:

screenshot 2020-04-14T11:08:50

@funcelotwork I've no idea what you're actually trying to achieve, probably you're looking for $JENKINS_URL/pluginManager/?

upMKuhn commented 3 years ago

I encountered the same issue. The reason was Update required: Configuration as Code Plugin (1.29) to be updated to 1.35 or higher

mika commented 3 years ago

@upMKuhn just to clarify, it's only about the Pipeline plugin or some other plugin that j-d-g doesn't really rely on, right?

upMKuhn commented 3 years ago

I honestly replied to this issue without properly reading it. My setup is based on the K8S Jenkins Operator. The Jenkins container failed to start, because the Pipeline v2.6 (workflow-aggregator) plugin and others failed to be installed. Within 200 error messages I eventually found Configuration as Code Plugin (1.29) to be updated to 1.35 or higher. I followed the advice and upgraded this and a few other plugins . Boom it worked perfectly.

So maybe this issue shares a similar root cause of out dated dependent plugins.