jenkinsci / helm-charts

Jenkins helm charts
https://artifacthub.io/packages/helm/jenkinsci/jenkins
Apache License 2.0
565 stars 890 forks source link

Plugin manager ignoring some plugin updates #861

Open FranAguiar opened 1 year ago

FranAguiar commented 1 year ago

Describe the bug

When jenkins pod is initializing there is in the log the exception below, but initialization ends and the logs says that 'Jenkins is fully up and running'. Everything works, the only odd thing I see is some plugins are not getting updated and I don't know if is related or not.

If not, what could be the cause to ignore the plugins update?

The log:

Running from: /usr/share/jenkins/jenkins.war
2023-04-26 14:25:17.021+0000 [id=1] INFO    winstone.Logger#logInternal: Beginning extraction from war file
2023-04-26 14:25:18.787+0000 [id=1] WARNING o.e.j.s.handler.ContextHandler#setContextPath: Empty contextPath
2023-04-26 14:25:18.862+0000 [id=1] INFO    org.eclipse.jetty.server.Server#doStart: jetty-10.0.13; built: 2022-12-07T20:13:20.134Z; git: 1c2636ea05c0ca8de1ffd6ca7f3a98ac084c766d; jvm 11.0.18+10
2023-04-26 14:25:19.184+0000 [id=1] INFO    o.e.j.w.StandardDescriptorProcessor#visitServlet: NO JSP Support for /, did not find org.eclipse.jetty.jsp.JettyJspServlet
2023-04-26 14:25:19.259+0000 [id=1] INFO    o.e.j.s.s.DefaultSessionIdManager#doStart: Session workerName=node0
2023-04-26 14:25:19.742+0000 [id=1] INFO    hudson.WebAppMain#contextInitialized: Jenkins home directory: /var/jenkins_home found at: EnvVars.masterEnvVars.get("JENKINS_HOME")
2023-04-26 14:25:20.026+0000 [id=1] INFO    o.e.j.s.handler.ContextHandler#doStart: Started w.@64469d8{Jenkins v2.387.2,/,file:///var/jenkins_cache/war/,AVAILABLE}{/var/jenkins_cache/war}
2023-04-26 14:25:20.072+0000 [id=1] INFO    o.e.j.server.AbstractConnector#doStart: Started ServerConnector@3f390d63{HTTP/1.1, (http/1.1)}{0.0.0.0:8080}
2023-04-26 14:25:20.107+0000 [id=1] INFO    org.eclipse.jetty.server.Server#doStart: Started Server@66b7550d{STARTING}[10.0.13,sto=0] @3849ms
2023-04-26 14:25:20.117+0000 [id=24]    INFO    winstone.Logger#logInternal: Winstone Servlet Engine running: controlPort=disabled
2023-04-26 14:25:20.342+0000 [id=29]    INFO    jenkins.InitReactorRunner$1#onAttained: Started initialization
2023-04-26 14:25:20.668+0000 [id=28]    INFO    jenkins.InitReactorRunner$1#onAttained: Listed all plugins
2023-04-26 14:25:25.319+0000 [id=31]    INFO    jenkins.InitReactorRunner$1#onAttained: Prepared all plugins
2023-04-26 14:25:25.373+0000 [id=30]    INFO    jenkins.InitReactorRunner$1#onAttained: Started all plugins
2023-04-26 14:25:25.570+0000 [id=28]    INFO    jenkins.InitReactorRunner$1#onAttained: Augmented all extensions
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.codehaus.groovy.vmplugin.v7.Java7$1 (file:/var/jenkins_cache/war/WEB-INF/lib/groovy-all-2.4.21.jar) to constructor java.lang.invoke.MethodHandles$Lookup(java.lang.Class,int)
WARNING: Please consider reporting this to the maintainers of org.codehaus.groovy.vmplugin.v7.Java7$1
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
2023-04-26 14:25:26.693+0000 [id=30]    WARNING h.ExtensionFinder$GuiceFinder$FaultTolerantScope$1#error: Failed to instantiate Key[type=hudson.tools.JDKInstaller$DescriptorImpl, annotation=[none]]; skipping this component
java.lang.ClassNotFoundException: org.apache.commons.httpclient.Credentials
    at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:476)
    at jenkins.util.URLClassLoader2.findClass(URLClassLoader2.java:35)
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:589)
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
Caused: java.lang.NoClassDefFoundError: org/apache/commons/httpclient/Credentials
    at java.base/java.lang.Class.getDeclaredMethods0(Native Method)
    at java.base/java.lang.Class.privateGetDeclaredMethods(Class.java:3166)
    at java.base/java.lang.Class.getMethodsRecursive(Class.java:3307)
    at java.base/java.lang.Class.getMethod0(Class.java:3293)
    at java.base/java.lang.Class.getMethod(Class.java:2106)
    at hudson.model.Descriptor.<init>(Descriptor.java:305)
    at hudson.tools.ToolInstallerDescriptor.<init>(ToolInstallerDescriptor.java:41)
    at hudson.tools.JDKInstaller$DescriptorImpl.<init>(JDKInstaller.java:821)
    at hudson.tools.JDKInstaller$DescriptorImpl$$FastClassByGuice$$701100579.GUICE$TRAMPOLINE(<generated>)
    at hudson.tools.JDKInstaller$DescriptorImpl$$FastClassByGuice$$701100579.apply(<generated>)
    at com.google.inject.internal.DefaultConstructionProxyFactory$FastClassProxy.newInstance(DefaultConstructionProxyFactory.java:82)
    at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:114)
    at com.google.inject.internal.ConstructorInjector.access$000(ConstructorInjector.java:33)
    at com.google.inject.internal.ConstructorInjector$1.call(ConstructorInjector.java:98)
    at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:109)
    at hudson.ExtensionFinder$GuiceFinder$SezpozModule.onProvision(ExtensionFinder.java:607)
    at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:117)
    at com.google.inject.internal.ProvisionListenerStackCallback.provision(ProvisionListenerStackCallback.java:66)
    at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:93)
    at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:300)
    at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
Caused: com.google.inject.ProvisionException: Unable to provision, see the following errors:

1) [Guice/ErrorInjectingConstructor]: NoClassDefFoundError: org/apache/commons/httpclient/Credentials
  at JDKInstaller$DescriptorImpl.<init>(JDKInstaller.java:821)

Learn more:
  https://github.com/google/guice/wiki/ERROR_INJECTING_CONSTRUCTOR

1 error

======================
Full classname legend:
======================
JDKInstaller$DescriptorImpl: "hudson.tools.JDKInstaller$DescriptorImpl"
========================
End of classname legend:
========================

    at com.google.inject.internal.InternalProvisionException.toProvisionException(InternalProvisionException.java:251)
    at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:43)
    at com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:169)
    at hudson.ExtensionFinder$GuiceFinder$FaultTolerantScope$1.get(ExtensionFinder.java:445)
    at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:45)
    at com.google.inject.internal.InjectorImpl$1.get(InjectorImpl.java:1101)
    at hudson.ExtensionFinder$GuiceFinder._find(ExtensionFinder.java:403)
    at hudson.ExtensionFinder$GuiceFinder.find(ExtensionFinder.java:394)
    at hudson.ClassicPluginStrategy.findComponents(ClassicPluginStrategy.java:359)
    at hudson.ExtensionList.load(ExtensionList.java:384)
    at hudson.ExtensionList.ensureLoaded(ExtensionList.java:320)
    at hudson.ExtensionList.iterator(ExtensionList.java:172)
    at jenkins.model.Jenkins.getDescriptorByType(Jenkins.java:1652)
    at hudson.plugins.git.GitSCM.onLoaded(GitSCM.java:2161)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    at hudson.init.TaskMethodFinder.invoke(TaskMethodFinder.java:109)
    at hudson.init.TaskMethodFinder$TaskImpl.run(TaskMethodFinder.java:185)
    at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:305)
    at jenkins.model.Jenkins$5.runTask(Jenkins.java:1164)
    at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:221)
    at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:120)
    at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:68)
    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:829)
2023-04-26 14:25:27.797+0000 [id=28]    INFO    jenkins.InitReactorRunner$1#onAttained: System config loaded
2023-04-26 14:25:28.943+0000 [id=29]    WARNING i.j.p.casc.BaseConfigurator#createAttribute: Can't handle class jenkins.plugins.git.GitSCMSource#owner: type is abstract but not Describable.
2023-04-26 14:25:29.179+0000 [id=29]    WARNING i.j.p.casc.BaseConfigurator#createAttribute: Can't handle class jenkins.plugins.git.GitSCMSource#owner: type is abstract but not Describable.
2023-04-26 14:25:29.191+0000 [id=29]    INFO    jenkins.InitReactorRunner$1#onAttained: System config adapted
2023-04-26 14:25:29.191+0000 [id=28]    INFO    jenkins.InitReactorRunner$1#onAttained: Loaded all jobs
2023-04-26 14:25:29.194+0000 [id=28]    INFO    jenkins.InitReactorRunner$1#onAttained: Configuration for all jobs updated
2023-04-26 14:25:29.274+0000 [id=31]    INFO    jenkins.InitReactorRunner$1#onAttained: Completed initialization
2023-04-26 14:25:29.381+0000 [id=22]    INFO    hudson.lifecycle.Lifecycle#onReady: Jenkins is fully up and running

Version of Helm and Kubernetes

- Helm: {Version:"v3.9.0", GitCommit:"7ceeda6c585217a19a1131663d8cd1f7d641b2a7", GitTreeState:"clean", GoVersion:"go1.18.2"}
- Kubernetes: {Major:"1", Minor:"24", GitVersion:"v1.24.10-gke.2300", GitCommit:"1d7ae0799b40b0cd95502e3a5e698db62572e341", GitTreeState:"clean", BuildDate:"2023-02-22T09:28:49Z", GoVersion:"go1.19.6 X:boringcrypto", Compiler:"gc", Platform:"linux/amd64"}

Chart version

4.3.22

What happened?

I noticed some of the plugins weren't getting the update specified in the values file and I start digging and found that in the log.

Some of the plugins are in my values file, like cloudbees-bitbucket-branch-source the installed But others are the default plugins in the chart, like kubernetes that is several versions older.

What you expected to happen?

Plugins get the update

How to reproduce it

jenkins:
    additionalPlugins:
      - job-dsl:1.83 # https://plugins.jenkins.io/job-dsl/#releases
      - cloudbees-bitbucket-branch-source:800.va_b_b_9a_a_5035c1 # https://plugins.jenkins.io/cloudbees-bitbucket-branch-source/#releases
      - bitbucket:223.vd12f2bca5430 # https://plugins.jenkins.io/bitbucket/#releases
      - config-file-provider:3.11.1 # https://plugins.jenkins.io/config-file-provider/#releases
      - google-oauth-plugin:1.0.8 # https://plugins.jenkins.io/google-oauth-plugin/#releases
      - pipeline-utility-steps:2.15.1 # https://plugins.jenkins.io/pipeline-utility-steps/#releases
      - pipeline-stage-view:2.32 # https://plugins.jenkins.io/pipeline-stage-view/#releases
      - junit:1198.ve38db_d1b_c975 # https://plugins.jenkins.io/junit/#releases
      - htmlpublisher:1.31 # https://plugins.jenkins.io/htmlpublisher/#releases
      - testcafe:1.0 # https://plugins.jenkins.io/testcafe/#releases
MarkEWaite commented 1 year ago

I can't duplicate the problem as described. I wasn't sure of the precise plugin versions installed in the default helm chart so I installed Jenkins 2.387.2 with the plugins and versions listed in the report, then updated the plugins to their latest releases and removed the deprecated plugins. In no case did I see the class not found exception.

Precise plugin versions I used with 2.387.2:

apache-httpcomponents-client-4-api:4.5.14-150.v7a_b_9d17134a_5
authentication-tokens:1.53.v1c90fd9191a_b_
bitbucket:223.vd12f2bca5430
bootstrap5-api:5.2.2-2
bouncycastle-api:2.27
branch-api:2.1071.v1a_188a_562481
caffeine-api:3.1.6-115.vb_8b_b_328e59d8
checks-api:2.0.0
cloudbees-bitbucket-branch-source:800.va_b_b_9a_a_5035c1
cloudbees-folder:6.815.v0dd5a_cb_40e0e
command-launcher:100.v2f6722292ee8
commons-lang3-api:3.12.0-36.vd97de6465d5b_
commons-text-api:1.10.0-36.vc008c8fcda_7b_
config-file-provider:3.11.1
credentials:1224.vc23ca_a_9a_2cb_0
credentials-binding:604.vb_64480b_c56ca_
display-url-api:2.3.7
echarts-api:5.4.0-3
font-awesome-api:6.3.0-2
git:5.0.1
git-client:4.2.0
google-oauth-plugin:1.0.8
handy-uri-templates-2-api:2.1.8-22.v77d5b_75e6953
htmlpublisher:1.31
instance-identity:142.v04572ca_5b_265
ionicons-api:45.vf54fca_5d2154
jackson2-api:2.15.0-334.v317a_165f9b_7c
jakarta-activation-api:2.0.1-3
jakarta-mail-api:2.0.1-3
javax-activation-api:1.2.0-6
javax-mail-api:1.6.2-9
jaxb:2.3.8-1
jdk-tool:66.vd8fa_64ee91b_d
job-dsl:1.83
jquery3-api:3.6.4-1
jsch:0.1.55.61.va_e9ee26616e7
junit:1198.ve38db_d1b_c975
mailer:448.v5b_97805e3767
matrix-project:789.v57a_725b_63c79
mercurial:1260.vdfb_723cdcc81
mina-sshd-api-common:2.9.2-62.v199162f0a_2f8
mina-sshd-api-core:2.9.2-62.v199162f0a_2f8
oauth-credentials:0.645.ve666a_c332668
pipeline-graph-analysis:202.va_d268e64deb_3
pipeline-input-step:468.va_5db_051498a_4
pipeline-rest-api:2.32
pipeline-stage-step:305.ve96d0205c1c6
pipeline-stage-view:2.32
pipeline-utility-steps:2.15.2
plain-credentials:143.v1b_df8b_d3b_e48
plugin-util-api:3.2.0
popper2-api:2.11.6-2
scm-api:667.v8b_6e07cdc7f2
script-security:1244.ve463715a_f89c
snakeyaml-api:1.33-95.va_b_a_e3e47b_fa_4
ssh-credentials:305.v8f4381501156
sshd:3.275.v9e17c10f2571
structs:324.va_f5d6774f3a_d
testcafe:1.0
token-macro:359.vb_cde11682e0c
trilead-api:2.84.v72119de229b_7
workflow-api:1208.v0cc7c6e0da_9e
workflow-cps:3659.v582dc37621d8
workflow-job:1292.v27d8cc3e2602
workflow-multibranch:746.v05814d19c001
workflow-scm-step:408.v7d5b_135a_b_d49
workflow-step-api:639.v6eca_cd8c04a_a_
workflow-support:839.v35e2736cfd5c

Can you provide the precise list of plugins?

Have you tried updating the plugins to their most recent releases? The Jenkins 2.387.1 changelog notes that HttpClient 3 has been removed from Jenkins core and that Jenkins plugins have been updated to not require HttpClient 3. If you upgrade the Jenkins controller, the guidance is to also upgrade the plugins.

francisco-aguiar-imt commented 1 year ago

Thanks for the feedback, I'm using the same version. How can I get the list of the installed plugins?

The default plugins listed in the chart are:

MarkEWaite commented 1 year ago

Thanks for the feedback, I'm using the same version. How can I get the list of the installed plugins?

There is a script that can be run in the Groovy script console.

francisco-aguiar-imt commented 1 year ago

I updated all the plugins manually and the error is gone. I think the cause was the kubernetes plugin because was an older version than the one in the chart (kubernetes:3900.va_dce992317b_4), now I'm above the chart I hope it doesn't cause any error with the next chart release.

Here is my plugins list, just in case. I think this can be closed now. Thanks for your help.


OS: Linux - 5.10.162+
Java: 11.0.18 - Eclipse Adoptium (OpenJDK 64-Bit Server VM)
---
ace-editor:1.1
apache-httpcomponents-client-4-api:4.5.14-150.v7a_b_9d17134a_5
authentication-tokens:1.53.v1c90fd9191a_b_
bitbucket:223.vd12f2bca5430
bootstrap5-api:5.2.2-2
bouncycastle-api:2.27
branch-api:2.1071.v1a_188a_562481
caffeine-api:3.1.6-115.vb_8b_b_328e59d8
checks-api:2.0.0
cloudbees-bitbucket-branch-source:800.va_b_b_9a_a_5035c1
cloudbees-folder:6.815.v0dd5a_cb_40e0e
command-launcher:100.v2f6722292ee8
commons-lang3-api:3.12.0-36.vd97de6465d5b_
commons-text-api:1.10.0-36.vc008c8fcda_7b_
config-file-provider:3.11.1
configuration-as-code:1625.v27444588cc3d
credentials:1236.v31e44e6060c0
credentials-binding:604.vb_64480b_c56ca_
display-url-api:2.3.7
durable-task:504.vb10d1ae5ba2f
echarts-api:5.4.0-3
font-awesome-api:6.3.0-2
git:5.0.1
git-client:4.2.0
google-oauth-plugin:1.0.8
handy-uri-templates-2-api:2.1.8-22.v77d5b_75e6953
htmlpublisher:1.31
instance-identity:142.v04572ca_5b_265
ionicons-api:45.vf54fca_5d2154
jackson2-api:2.15.0-334.v317a_165f9b_7c
jakarta-activation-api:2.0.1-3
jakarta-mail-api:2.0.1-3
javax-activation-api:1.2.0-6
javax-mail-api:1.6.2-5
jaxb:2.3.8-1
jdk-tool:66.vd8fa_64ee91b_d
job-dsl:1.83
jquery3-api:3.6.4-1
jsch:0.1.55.61.va_e9ee26616e7
junit:1198.ve38db_d1b_c975
kubernetes:3923.v294a_d4250b_91
kubernetes-client-api:6.4.1-215.v2ed17097a_8e9
kubernetes-credentials:0.10.0
mailer:448.v5b_97805e3767
matrix-project:789.v57a_725b_63c79
mercurial:1260.vdfb_723cdcc81
metrics:4.2.13-420.vea_2f17932dd6
mina-sshd-api-common:2.9.2-62.v199162f0a_2f8
mina-sshd-api-core:2.9.2-62.v199162f0a_2f8
momentjs:1.1.1
oauth-credentials:0.645.ve666a_c332668
okhttp-api:4.10.0-132.v7a_7b_91cef39c
pipeline-build-step:491.v1fec530da_858
pipeline-graph-analysis:202.va_d268e64deb_3
pipeline-groovy-lib:656.va_a_ceeb_6ffb_f7
pipeline-input-step:468.va_5db_051498a_4
pipeline-milestone-step:111.v449306f708b_7
pipeline-model-api:2.2125.vddb_a_44a_d605e
pipeline-model-definition:2.2125.vddb_a_44a_d605e
pipeline-model-extensions:2.2125.vddb_a_44a_d605e
pipeline-rest-api:2.32
pipeline-stage-step:305.ve96d0205c1c6
pipeline-stage-tags-metadata:2.2125.vddb_a_44a_d605e
pipeline-stage-view:2.32
pipeline-utility-steps:2.15.2
plain-credentials:143.v1b_df8b_d3b_e48
plugin-util-api:3.2.0
popper2-api:2.11.6-2
scm-api:667.v8b_6e07cdc7f2
script-security:1244.ve463715a_f89c
snakeyaml-api:1.33-95.va_b_a_e3e47b_fa_4
ssh-credentials:305.v8f4381501156
sshd:3.236.ved5e1b_cb_50b_2
structs:324.va_f5d6774f3a_d
testcafe:1.0
token-macro:359.vb_cde11682e0c
trilead-api:2.84.v72119de229b_7
variant:59.vf075fe829ccb
workflow-aggregator:596.v8c21c963d92d
workflow-api:1208.v0cc7c6e0da_9e
workflow-basic-steps:1017.vb_45b_302f0cea_
workflow-cps:3659.v582dc37621d8
workflow-durable-task-step:1246.v5524618ea_097
workflow-job:1292.v27d8cc3e2602
workflow-multibranch:746.v05814d19c001
workflow-scm-step:408.v7d5b_135a_b_d49
workflow-step-api:639.v6eca_cd8c04a_a_
workflow-support:839.v35e2736cfd5c```