jenkinsci / groovy-events-listener-plugin

A Jenkins plugin, which executes groovy code when an event occurs.
https://plugins.jenkins.io/groovy-events-listener-plugin/
MIT License
36 stars 34 forks source link

Cannot install version 1.017 on Jenkins 2.200 #49

Closed stephank closed 4 years ago

stephank commented 4 years ago

Steps to reproduce

  1. Try to install from the plugin manager UI in Jenkins.

Expected behaviour

Installation should succeed and the settings should be available.

Actual behaviour

Jenkins refuses to load the plugin with the following exception:

2019-10-15 14:30:05.821+0000 [id=27]    WARNING jenkins.model.Jenkins$5#runTask: Loading plugin Groovy Events Listener Plugin v1.017 (groovy-events-listener-plugin) failed perhaps due to plugin dependency issues
groovy.lang.GroovyRuntimeException: Conflicting module versions. Module [groovy-all is loaded in version 2.4.8 and you are trying to load version 2.4.12
    at org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl$DefaultModuleListener.onModule(MetaClassRegistryImpl.java:513)
    at org.codehaus.groovy.runtime.m12n.ExtensionModuleScanner.scanExtensionModuleFromProperties(ExtensionModuleScanner.java:80)
    at org.codehaus.groovy.runtime.m12n.ExtensionModuleScanner.scanExtensionModuleFromMetaInf(ExtensionModuleScanner.java:74)
    at org.codehaus.groovy.runtime.m12n.ExtensionModuleScanner.scanClasspathModules(ExtensionModuleScanner.java:56)
    at org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl.<init>(MetaClassRegistryImpl.java:113)
    at org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl.<init>(MetaClassRegistryImpl.java:74)
    at groovy.lang.GroovySystem.<clinit>(GroovySystem.java:36)
Caused: java.lang.ExceptionInInitializerError
    at org.codehaus.groovy.runtime.InvokerHelper.<clinit>(InvokerHelper.java:66)
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.createCallStaticSite(CallSiteArray.java:75)
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.createCallSite(CallSiteArray.java:162)
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:117)
    at org.jenkinsci.plugins.globalEventsPlugin.GlobalEventsPlugin.<clinit>(GlobalEventsPlugin.groovy:22)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
    at java.lang.Class.newInstance(Class.java:442)
    at hudson.ClassicPluginStrategy.load(ClassicPluginStrategy.java:374)
Caused: java.io.IOException: Unable to load org.jenkinsci.plugins.globalEventsPlugin.GlobalEventsPlugin from groovy-events-listener-plugin
    at hudson.ClassicPluginStrategy.load(ClassicPluginStrategy.java:380)
    at hudson.PluginManager$2$1$1.run(PluginManager.java:547)
    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:1124)
    at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:214)
    at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)

Server configuration

Operating system: Ubuntu 14.04.6 LTS Jenkins Version: 2.200 (official deb) Plugin Version: 1.017

Other info

May be related to #48. Per discussion there, I'm including a list of plugins I have installed:

name version description
ace-editor 1.1 JavaScript GUI Lib: ACE Editor bundle plugin
ansicolor 0.6.2 AnsiColor
ant 1.10 Ant Plugin
antisamy-markup-formatter 1.6 OWASP Markup Formatter Plugin
apache-httpcomponents-client-4-api 4.5.10-2.0 Apache HttpComponents Client 4.x API Plugin
authentication-tokens 1.3 Authentication Tokens API Plugin
aws-credentials 1.28 CloudBees AWS Credentials Plugin
aws-java-sdk 1.11.650 Amazon Web Services SDK
basic-branch-build-strategies 1.3.2 Basic Branch Build Strategies Plugin
blueocean 1.19.0 Blue Ocean
blueocean-autofavorite 1.2.4 Autofavorite for Blue Ocean
blueocean-bitbucket-pipeline 1.19.0 Bitbucket Pipeline for Blue Ocean
blueocean-commons 1.19.0 Common API for Blue Ocean
blueocean-config 1.19.0 Config API for Blue Ocean
blueocean-core-js 1.19.0 Blue Ocean Core JS
blueocean-dashboard 1.19.0 Dashboard for Blue Ocean
blueocean-display-url 2.3.0 Display URL for Blue Ocean
blueocean-events 1.19.0 Events API for Blue Ocean
blueocean-executor-info 1.19.0 Blue Ocean Executor Info
blueocean-git-pipeline 1.19.0 Git Pipeline for Blue Ocean
blueocean-github-pipeline 1.19.0 GitHub Pipeline for Blue Ocean
blueocean-i18n 1.19.0 i18n for Blue Ocean
blueocean-jira 1.19.0 JIRA Integration for Blue Ocean
blueocean-jwt 1.19.0 JWT for Blue Ocean
blueocean-personalization 1.19.0 Personalization for Blue Ocean
blueocean-pipeline-api-impl 1.19.0 Pipeline implementation for Blue Ocean
blueocean-pipeline-editor 1.19.0 Blue Ocean Pipeline Editor
blueocean-pipeline-scm-api 1.19.0 Pipeline SCM API for Blue Ocean
blueocean-rest 1.19.0 REST API for Blue Ocean
blueocean-rest-impl 1.19.0 REST Implementation for Blue Ocean
blueocean-web 1.19.0 Web for Blue Ocean
bouncycastle-api 2.17 bouncycastle API Plugin
branch-api 2.5.4 Branch API Plugin
cloudbees-bitbucket-branch-source 2.5.0 Bitbucket Branch Source Plugin
cloudbees-folder 6.9 Folders Plugin
command-launcher 1.3 Command Agent Launcher Plugin
credentials 2.3.0 Credentials Plugin
credentials-binding 1.20 Credentials Binding Plugin
display-url-api 2.3.2 Display URL API
docker-build-publish 1.3.2 CloudBees Docker Build and Publish plugin
docker-commons 1.15 Docker Commons Plugin
docker-workflow 1.21 Docker Pipeline
durable-task 1.30 Durable Task Plugin
ec2 1.45 Amazon EC2 plugin
favorite 2.3.2 Favorite
git 3.12.1 Git plugin
git-client 2.9.0 Git client plugin
git-server 1.8 GIT server Plugin
github 1.29.5 GitHub plugin
github-api 1.95 GitHub API Plugin
github-branch-source 2.5.8 GitHub Branch Source Plugin
gravatar 2.1 Gravatar plugin
handlebars 1.1.1 JavaScript GUI Lib: Handlebars bundle plugin
handy-uri-templates-2-api 2.1.7-1.0 Handy Uri Templates 2.x API Plugin
htmlpublisher 1.21 HTML Publisher plugin
icon-shim 2.0.3 Icon Shim Plugin
jackson2-api 2.10.0 Jackson 2 API Plugin
jdk-tool 1.3 Oracle Java SE Development Kit Installer Plugin
jenkins-design-language 1.19.0 Design Language
jira 3.0.10 JIRA plugin
jquery-detached 1.2.1 JavaScript GUI Lib: jQuery bundles (jQuery and jQuery UI) plugin
jsch 0.1.55.1 JSch dependency plugin
junit 1.28 JUnit Plugin
ldap 1.20 LDAP Plugin
lockable-resources 2.6 Lockable Resources plugin
mailer 1.29 Mailer Plugin
matrix-auth 2.5 Matrix Authorization Strategy Plugin
matrix-project 1.14 Matrix Project Plugin
mercurial 2.8 Mercurial plugin
metrics 4.0.2.6 Metrics Plugin
momentjs 1.1.1 JavaScript GUI Lib: Moment.js bundle plugin
node-iterator-api 1.5.0 Node Iterator API Plugin
pipeline-build-step 2.9 Pipeline: Build Step
pipeline-github-lib 1.0 Pipeline: GitHub Groovy Libraries
pipeline-graph-analysis 1.10 Pipeline Graph Analysis Plugin
pipeline-input-step 2.11 Pipeline: Input Step
pipeline-milestone-step 1.3.1 Pipeline: Milestone Step
pipeline-model-api 1.3.9 Pipeline: Model API
pipeline-model-declarative-agent 1.1.1 Pipeline: Declarative Agent API
pipeline-model-definition 1.3.9 Pipeline: Declarative
pipeline-model-extensions 1.3.9 Pipeline: Declarative Extension Points API
pipeline-rest-api 2.12 Pipeline: REST API Plugin
pipeline-stage-step 2.3 Pipeline: Stage Step
pipeline-stage-tags-metadata 1.3.9 Pipeline: Stage Tags Metadata
pipeline-stage-view 2.12 Pipeline: Stage View Plugin
plain-credentials 1.5 Plain Credentials Plugin
pubsub-light 1.13 Pub-Sub "light" Bus
scm-api 2.6.3 SCM API Plugin
script-security 1.66 Script Security Plugin
slack 2.34 Slack Notification Plugin
sse-gateway 1.20 Server Sent Events (SSE) Gateway Plugin
ssh-agent 1.17 SSH Agent Plugin
ssh-credentials 1.18 SSH Credentials Plugin
ssh-slaves 1.31.0 SSH Slaves plugin
structs 1.20 Structs Plugin
token-macro 2.8 Token Macro Plugin
trilead-api 1.0.5 Trilead API Plugin
variant 1.3 Variant Plugin
windows-slaves 1.5 WMI Windows Agents Plugin
workflow-aggregator 2.6 Pipeline
workflow-api 2.37 Pipeline: API
workflow-basic-steps 2.18 Pipeline: Basic Steps
workflow-cps 2.74 Pipeline: Groovy
workflow-cps-global-lib 2.15 Pipeline: Shared Groovy Libraries
workflow-durable-task-step 2.34 Pipeline: Nodes and Processes
workflow-job 2.35 Pipeline: Job
workflow-multibranch 2.21 Pipeline: Multibranch
workflow-scm-step 2.9 Pipeline: SCM Step
workflow-step-api 2.20 Pipeline: Step API
workflow-support 3.3 Pipeline: Supporting APIs
stephank commented 4 years ago

I just tried reproducing this locally, and this actually also happens on a clean install of Jenkins 2.200 on my mac. I simply installed Jenkins using brew install jenkins, started it, stepped through the wizard installing no plugins at all, confirmed no plugins were installed in the plugin manager, then tried to install groovy-events-listener-plugin 1.017, and had the same exception.

The dependencies installed are:

name version description
command-launcher 1.3 Command Agent Launcher Plugin
jdk-tool 1.3 Oracle Java SE Development Kit Installer Plugin
script-security 1.66 Script Security Plugin
trilead-api 1.0.5 Trilead API Plugin

Btw, is 1.017 simply not tagged here in the repository?

vortarian commented 4 years ago

This reproduces it pretty easily:

$ cat Dockerfile 
FROM jenkins/jenkins:lts-jdk11

RUN unset HTTP_PROXY HTTPS_PROXY http_proxy https_proxy \
  && /usr/local/bin/install-plugins.sh groovy-events-listener-plugin:latest

USER 0

EXPOSE 8080 50000

$ docker build -t groovy-test . $ docker run -it groovy-test:latest

Running from: /usr/share/jenkins/jenkins.war
webroot: EnvVars.masterEnvVars.get("JENKINS_HOME")
2019-10-17 21:10:54.235+0000 [id=1] INFO    org.eclipse.jetty.util.log.Log#initialized: Logging initialized @423ms to org.eclipse.jetty.util.log.JavaUtilLog
2019-10-17 21:10:54.279+0000 [id=1] INFO    winstone.Logger#logInternal: Beginning extraction from war file
2019-10-17 21:10:54.890+0000 [id=1] WARNING o.e.j.s.handler.ContextHandler#setContextPath: Empty contextPath
2019-10-17 21:10:54.935+0000 [id=1] INFO    org.eclipse.jetty.server.Server#doStart: jetty-9.4.z-SNAPSHOT; built: 2019-05-02T00:04:53.875Z; git: e1bc35120a6617ee3df052294e433f3a25ce7097; jvm 11.0.4+11
2019-10-17 21:10:55.152+0000 [id=1] INFO    o.e.j.w.StandardDescriptorProcessor#visitServlet: NO JSP Support for /, did not find org.eclipse.jetty.jsp.JettyJspServlet
2019-10-17 21:10:55.182+0000 [id=1] INFO    o.e.j.s.s.DefaultSessionIdManager#doStart: DefaultSessionIdManager workerName=node0
2019-10-17 21:10:55.182+0000 [id=1] INFO    o.e.j.s.s.DefaultSessionIdManager#doStart: No SessionScavenger set, using defaults
2019-10-17 21:10:55.185+0000 [id=1] INFO    o.e.j.server.session.HouseKeeper#startScavenging: node0 Scavenging every 600000ms
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.thoughtworks.xstream.core.util.Fields (file:/var/jenkins_home/war/WEB-INF/lib/xstream-1.4.7-jenkins-1.jar) to field java.util.TreeMap.comparator
WARNING: Please consider reporting this to the maintainers of com.thoughtworks.xstream.core.util.Fields
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
Jenkins home directory: /var/jenkins_home found at: EnvVars.masterEnvVars.get("JENKINS_HOME")
2019-10-17 21:10:55.588+0000 [id=1] INFO    o.e.j.s.handler.ContextHandler#doStart: Started w.@f3021cb{Jenkins v2.190.1,/,file:///var/jenkins_home/war/,AVAILABLE}{/var/jenkins_home/war}
2019-10-17 21:10:55.602+0000 [id=1] INFO    o.e.j.server.AbstractConnector#doStart: Started ServerConnector@2cc3ad05{HTTP/1.1,[http/1.1]}{0.0.0.0:8080}
2019-10-17 21:10:55.602+0000 [id=1] INFO    org.eclipse.jetty.server.Server#doStart: Started @1791ms
2019-10-17 21:10:55.603+0000 [id=24]    INFO    winstone.Logger#logInternal: Winstone Servlet Engine v4.0 running: controlPort=disabled
2019-10-17 21:10:55.837+0000 [id=31]    INFO    jenkins.InitReactorRunner$1#onAttained: Started initialization
2019-10-17 21:10:56.072+0000 [id=47]    WARNING hudson.ClassicPluginStrategy#createClassJarFromWebInfClasses: Created /var/jenkins_home/plugins/groovy-events-listener-plugin/WEB-INF/lib/classes.jar; update plugin to a version created with a newer harness
2019-10-17 21:10:56.102+0000 [id=47]    INFO    hudson.PluginManager#considerDetachedPlugin: Loading a detached plugin as a dependency: /var/jenkins_home/plugins/command-launcher.jpi
2019-10-17 21:10:56.110+0000 [id=47]    INFO    hudson.PluginManager#considerDetachedPlugin: Loading a detached plugin as a dependency: /var/jenkins_home/plugins/jdk-tool.jpi
2019-10-17 21:10:56.118+0000 [id=47]    INFO    hudson.PluginManager#considerDetachedPlugin: Loading a detached plugin as a dependency: /var/jenkins_home/plugins/trilead-api.jpi
2019-10-17 21:10:56.139+0000 [id=47]    INFO    hudson.PluginManager#considerDetachedPlugin: Loading a detached plugin as a dependency: /var/jenkins_home/plugins/script-security.jpi
2019-10-17 21:10:56.149+0000 [id=47]    INFO    hudson.PluginManager#considerDetachedPlugin: Loading a detached plugin as a dependency: /var/jenkins_home/plugins/jaxb.jpi
2019-10-17 21:10:56.177+0000 [id=52]    INFO    jenkins.InitReactorRunner$1#onAttained: Listed all plugins
2019-10-17 21:10:56.305+0000 [id=45]    WARNING jenkins.model.Jenkins$5#runTask: Loading plugin Groovy Events Listener Plugin v1.017 (groovy-events-listener-plugin) failed perhaps due to plugin dependency issues
groovy.lang.GroovyRuntimeException: Conflicting module versions. Module [groovy-all is loaded in version 2.4.8 and you are trying to load version 2.4.12
    at ..
Seros commented 4 years ago

The same here for me. Works with the fixed self-built version of the plugin from https://github.com/merc1031/groovy-events-listener-plugin/commit/2c4c3500dd0526dcde283db93ba03e0f3ff524bf mentioned in https://github.com/jenkinsci/groovy-events-listener-plugin/issues/48#issuecomment-531224396, so a PR and merge would be great! Having Jenkins 2.200 running in Docker (jenkins/jenkins:2.200-jdk11) with the following plugins:

Name Version Enabled
ace-editor 1.1 true
ansicolor 0.6.2 true
ant 1.10 true
antisamy-markup-formatter 1.6 true
apache-httpcomponents-client-4-api 4.5.10-2.0 true
artifactory 3.4.1 true
authentication-tokens 1.3 true
basic-branch-build-strategies 1.3.2 true
blueocean 1.19.0 true
blueocean-autofavorite 1.2.4 true
blueocean-bitbucket-pipeline 1.19.0 true
blueocean-commons 1.19.0 true
blueocean-config 1.19.0 true
blueocean-core-js 1.19.0 true
blueocean-dashboard 1.19.0 true
blueocean-display-url 2.3.0 true
blueocean-events 1.19.0 true
blueocean-git-pipeline 1.19.0 true
blueocean-github-pipeline 1.19.0 true
blueocean-i18n 1.19.0 true
blueocean-jira 1.19.0 true
blueocean-jwt 1.19.0 true
blueocean-personalization 1.19.0 true
blueocean-pipeline-api-impl 1.19.0 true
blueocean-pipeline-editor 1.19.0 true
blueocean-pipeline-scm-api 1.19.0 true
blueocean-rest 1.19.0 true
blueocean-rest-impl 1.19.0 true
blueocean-web 1.19.0 true
bouncycastle-api 2.17 true
branch-api 2.5.4 true
build-monitor-plugin 1.12+build.201809061734 true
build-token-root 1.5 true
buildtriggerbadge 2.10 true
cloudbees-bitbucket-branch-source 2.5.0 true
cloudbees-folder 6.9 true
command-launcher 1.2 true
conditional-buildstep 1.3.6 true
config-file-provider 3.6.2 true
configuration-as-code 1.32 true
configuration-as-code-groovy 1.1 true
copy-data-to-workspace-plugin 1.0 true
copyartifact 1.43 true
credentials 2.3.0 true
credentials-binding 1.20 true
display-url-api 2.3.2 true
docker-commons 1.15 true
docker-workflow 1.21 true
durable-task 1.30 true
external-monitor-job 1.4 true
favorite 2.3.2 true
git 3.12.1 true
git-changelog 2.19 true
git-client 2.9.0 true
git-server 1.8 true
github 1.29.5 true
github-api 1.95 true
github-branch-source 2.5.8 true
gradle 1.34 true
greenballs 1.15 true
groovy-events-listener-plugin 1.017 true
handlebars 1.1.1 true
handy-uri-templates-2-api 2.1.8-1.0 true
hashicorp-vault-plugin 3.0.0 true
htmlpublisher 1.21 true
image-gallery 1.4 true
ivy 2.1 true
jackson2-api 2.10.0 true
javadoc 1.5 true
jaxb 2.3.0 true
jdk-tool 1.0 true
jenkins-design-language 1.19.0 true
jira 3.0.10 true
job-dsl 1.76 true
jquery-detached 1.2.1 true
jsch 0.1.55.1 true
junit 1.28 true
ldap 1.11 true
lockable-resources 2.6 true
mailer 1.29 true
matrix-auth 2.5 true
matrix-project 1.14 true
maven-plugin 3.4 true
mercurial 2.8 true
metrics 4.0.2.6 true
momentjs 1.1.1 true
nomad 0.6.10 true
pam-auth 1.5.1 true
parameterized-trigger 2.35.2 true
permissive-script-security 0.5 true
pipeline-build-step 2.9 true
pipeline-graph-analysis 1.10 true
pipeline-input-step 2.11 true
pipeline-milestone-step 1.3.1 true
pipeline-model-api 1.3.9 true
pipeline-model-declarative-agent 1.1.1 true
pipeline-model-definition 1.3.9 true
pipeline-model-extensions 1.3.9 true
pipeline-rest-api 2.12 true
pipeline-stage-step 2.3 true
pipeline-stage-tags-metadata 1.3.9 true
pipeline-stage-view 2.12 true
pipeline-utility-steps 2.3.1 true
plain-credentials 1.5 true
prometheus 2.0.0 true
pubsub-light 1.13 true
resource-disposer 0.14 true
role-strategy 2.15 true
run-condition 1.2 true
saml 1.1.3 true
scm-api 2.6.3 true
script-security 1.66 true
simple-theme-plugin 0.5.1 true
skip-notifications-trait 1.0.3 true
slack 2.34 true
sse-gateway 1.20 true
ssh-agent 1.17 true
ssh-credentials 1.18 true
structs 1.20 true
timestamper 1.10 true
token-macro 2.8 true
trilead-api 1.0.5 true
variant 1.3 true
windows-slaves 1.0 true
workflow-aggregator 2.6 true
workflow-api 2.37 true
workflow-basic-steps 2.18 true
workflow-cps 2.74 true
workflow-cps-global-lib 2.15 true
workflow-durable-task-step 2.34 true
workflow-job 2.35 true
workflow-multibranch 2.21 true
workflow-scm-step 2.9 true
workflow-step-api 2.20 true
workflow-support 3.3 true
ws-cleanup 0.37 true
honglin6688 commented 2 years ago

it seems this issue appear again on new jenkins ( 2.319), the error log is the same.