jenkinsci / docker-plugin

Jenkins cloud plugin that uses Docker
https://plugins.jenkins.io/docker-plugin/
MIT License
486 stars 322 forks source link

Docker plugin Version 1.2.8 with Docker API Plugin Version 3.2.13-35.vb82bff5c8bd0 #884

Closed dnwe closed 2 years ago

dnwe commented 2 years ago

Jenkins and plugins versions report

Environment ```text Jenkins: 2.332.1 OS: Linux - 4.15.0-173-generic --- ace-editor:1.1 analysis-model-api:10.10.0 ansicolor:1.0.1 ant:1.13 antisamy-markup-formatter:2.7 apache-httpcomponents-client-4-api:4.5.13-1.0 artifactory:3.16.1 authentication-tokens:1.4 authorize-project:1.4.0 badge:1.9.1 bootstrap4-api:4.6.0-3 bootstrap5-api:5.1.3-6 bouncycastle-api:2.25 branch-api:2.1044.v2c007e51b_87f build-keeper-plugin:1.3 build-user-vars-plugin:1.8 build-with-parameters:1.6 caffeine-api:2.9.2-29.v717aac953ff3 checks-api:1.7.2 cloudbees-disk-usage-simple:0.10 cloudbees-folder:6.714.v79e858ef76a_2 collapsing-console-sections:1.8.0 command-launcher:1.6 conditional-buildstep:1.4.2 config-file-provider:3.9.0 configuration-as-code:1414.v878271fc496f copyartifact:1.46.3 credentials:1087.1089.v2f1b_9a_b_040e4 credentials-binding:1.27.1 cvs:2.19.1 dark-theme:156.v6cf16af6f9ef data-tables-api:1.11.4-4 display-url-api:2.3.6 docker-commons:1.19 docker-java-api:3.2.13-35.vb82bff5c8bd0 docker-plugin:1.2.8 docker-workflow:1.28 durable-task:495.v29cd95ec10f2 echarts-api:5.3.2-1 email-ext:2.87 embeddable-build-status:2.0.3 envinject:2.854.vfa_1657078c97 envinject-api:1.199.v3ce31253ed13 extended-read-permission:3.2 external-monitor-job:191.v363d0d1efdf8 font-awesome-api:6.0.0-1 forensics-api:1.12.0 ghprb:1.42.2 git:4.11.0 git-client:3.11.0 git-parameter:0.9.16 git-server:1.10 github:1.34.3 github-api:1.301-378.v9807bd746da5 github-branch-source:1598.v91207e9f9b_4a_ google-oauth-plugin:1.0.6 gradle:1.38 groovy:2.4 groovy-postbuild:2.5 handlebars:3.0.8 http_request:1.14 ivy:2.1 jackson2-api:2.13.2.20220328-273.v11d70a_b_a_1a_52 jacoco:3.3.1 javadoc:217.v905b_86277a_2a_ javax-activation-api:1.2.0-2 javax-mail-api:1.6.2-5 jdk-tool:1.5 jjwt-api:0.11.2-9.c8b45b8bb173 jnr-posix-api:3.1.7-3 job-dsl:1.79 jobConfigHistory:1133.v0f5420f85053 jquery:1.12.4-1 jquery-detached:1.2.1 jquery3-api:3.6.0-2 jsch:0.1.55.2 junit:1.59 kubernetes:3580.v78271e5631dc kubernetes-client-api:5.12.1-187.v577c3e368fb_6 kubernetes-credentials:0.9.0 label-linked-jobs:6.0.1 ldap:2.8 lockable-resources:2.14 login-theme:1.1 mailer:408.vd726a_1130320 mapdb-api:1.0.9.0 mask-passwords:3.1 material-theme:0.4.1 matrix-auth:3.1 matrix-project:758.v7a_ea_491852f3 maven-plugin:3.18 metrics:4.1.6.1 momentjs:1.1.1 multiple-scms:0.8 next-build-number:1.8 oauth-credentials:0.5 okhttp-api:4.9.3-105.vb96869f8ac3a pam-auth:1.7 parameterized-trigger:2.44 pegdown-formatter:1.3 pipeline-build-step:2.17 pipeline-github-lib:36.v4c01db_ca_ed16 pipeline-graph-analysis:188.v3a01e7973f2c pipeline-input-step:447.v95e5a_6e3502a_ pipeline-milestone-step:100.v60a_03cd446e1 pipeline-model-api:2.2075.vce74e77b_ce40 pipeline-model-definition:2.2075.vce74e77b_ce40 pipeline-model-extensions:2.2075.vce74e77b_ce40 pipeline-rest-api:2.23 pipeline-stage-step:291.vf0a8a7aeeb50 pipeline-stage-tags-metadata:2.2075.vce74e77b_ce40 pipeline-stage-view:2.23 pipeline-utility-steps:2.12.0 plain-credentials:1.8 plugin-usage-plugin:2.2 plugin-util-api:2.16.0 popper-api:1.16.1-2 popper2-api:2.11.5-1 postbuild-task:1.9 prism-api:1.26.0-2 purge-build-queue-plugin:33.v59111a_551b_38 rebuild:1.33.1 run-condition:1.5 saferestart:0.3 saml:2.296.v0016349946db_ scm-api:602.v6a_81757a_31d2 script-security:1145.vb_cf6cf6ed960 sidebar-link:2.1.0 simple-theme-plugin:103.va_161d09c38c7 slack:608.v19e3b_44b_b_9ff snakeyaml-api:1.30.1 ssh:2.6.1 ssh-agent:1.24.1 ssh-credentials:1.19 ssh-slaves:1.806.v2253cedd3295 sshd:3.228.v4c9f9e652c86 structs:308.v852b473a2b8c subversion:2.15.4 theme-manager:0.6 timestamper:1.17 token-macro:285.vff7645a_56ff0 translation:1.16 trilead-api:1.57.v6e90e07157e1 variant:1.4 view-job-filters:2.3 warnings-ng:9.12.0 windows-slaves:1.8 workflow-aggregator:2.7 workflow-api:1143.v2d42f1e9dea_5 workflow-basic-steps:941.vdfe1b_a_132c64 workflow-cps:2686.v7c37e0578401 workflow-cps-global-lib:570.v21311f4951f8 workflow-durable-task-step:1128.v8c259d125340 workflow-job:1174.vdcb_d054cf74a_ workflow-multibranch:711.vdfef37cda_816 workflow-scm-step:2.13 workflow-step-api:622.vb_8e7c15b_c95a_ workflow-support:818.v4eb_969241b_c7 ```

What Operating System are you using (both controller, and any agents involved in the problem)?

Linux

Reproduction steps

  1. Apply all updates available today
  2. Restart Jenkins
  3. Attempt to schedule builds on a Docker Cloud configuration

Expected Results

Jobs schedule as normal.

Actual Results

@ericcitaire / @pjdarton I applied updates in Jenkins and am hitting this backtrace currently:


java.lang.NoSuchMethodError: com.github.dockerjava.netty.NettyDockerCmdExecFactory.withReadTimeout(Ljava/lang/Integer;)Lcom/github/dockerjava/netty/NettyDockerCmdExecFactory;
    at io.jenkins.docker.client.DockerAPI.makeClient(DockerAPI.java:250)
    at io.jenkins.docker.client.DockerAPI.getOrMakeClient(DockerAPI.java:200)
    at io.jenkins.docker.client.DockerAPI.getClient(DockerAPI.java:169)
    at io.jenkins.docker.client.DockerAPI.getClient(DockerAPI.java:152)
    at com.nirima.jenkins.plugins.docker.DockerCloud.countContainersInDocker(DockerCloud.java:630)
    at com.nirima.jenkins.plugins.docker.DockerCloud.canAddProvisionedAgent(DockerCloud.java:649)
    at com.nirima.jenkins.plugins.docker.DockerCloud.provision(DockerCloud.java:358)
    at hudson.slaves.Cloud.provision(Cloud.java:210)
    at hudson.slaves.NodeProvisioner$StandardStrategyImpl.apply(NodeProvisioner.java:727)
    at hudson.slaves.NodeProvisioner.update(NodeProvisioner.java:326)
    at hudson.slaves.NodeProvisioner.access$1000(NodeProvisioner.java:71)
    at hudson.slaves.NodeProvisioner$NodeProvisionerInvoker.doRun(NodeProvisioner.java:824)
    at hudson.triggers.SafeTimerTask.run(SafeTimerTask.java:92)
    at jenkins.security.ImpersonatingScheduledExecutorService$1.run(ImpersonatingScheduledExecutorService.java:67)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)

### Anything else?

_No response_
dnwe commented 2 years ago

Rolling back to docker-java-api 3.1.5.3-33.ve54af4fabd95 allowed builds to schedule as normal again

pjdarton commented 2 years ago

It's an API change in docker-java, breaking the docker-plugin code. It looks fairly easy to fix ... see #885

ericcitaire commented 2 years ago

I'm surprised this is happening regardless hpi.compatibleSinceVersion=3.2.

It was supposed to mark java-docker-api v3.2.x as incompatible with v3.1.x.

Since docker-plugin depends on 3.1.x, this should not happen (java-docker-api v3.2.x update should not be suggested / possible). See here.

What did I miss ?

pjdarton commented 2 years ago

@dnwe try the not-released-yet version of the docker-plugin, https://ci.jenkins.io/job/Plugins/job/docker-plugin/job/master/261/ onwards (go to "Artefacts", find the .hpi file, download it, and upload to your Jenkins using the Manage Jenkins -> Manage Plugins -> Advanced tab). This ought to be more compatible with the next docker-java-api-plugin version.

...but, as Eric said, you shouldn't've been given the 3.2.x version of the docker-java-api-plugin as that should have been flagged as "incompatible" - is it possible that you grabbed it despite the warning?

dnwe commented 2 years ago

Yes, it was some automation that applies all available updates and restarts Jenkins.

Notably it is a fairly soft disclaimer message rather than something that actively prevents you from updating though:

image
dnwe commented 2 years ago

(and it refers to "the installed version" rather than "all currently available versions")

MCMicS commented 2 years ago

@pjdarton The jenkins ci build fails because failing tests. I cant see the artifact to test it

fraz3alpha commented 2 years ago

I think this is related to an instance of Jenkins I was helping out with yesterday where the docker plugin was allowed to be updated to 1.2.8, but this didn't also bring in the docker-java-api update that it needed and gave a java.lang.ClassNotFoundException: io.jenkins.dockerjavaapi.client.DelegatingDockerClient error.

What I believe probably happened (but I don't have proof as I don't understand the internals) is that https://github.com/jenkinsci/docker-plugin/pull/882 led to docker-plugin requiring a newer version of the docker-java-api plugin than this Jenkins had, but maybe because the latest version available is marked as incompatible Jenkins decided not to update it at all - when in practice what it needed to have done was update to 3.1.5-31.v70b0ca3e8310, but as that wasn't the newest one, it didn't do anything?

There was probably a window where the latest version of docker-java-api wasn't incompatible, and installing that would have been fine, but then the latest one came out and that broke the dependency updating logic? I guess I can't recreate it now to see as the dependencies have moved on (perhaps I could with a custom update site JSON file?)

Where I ended up was that I don't know what Jenkins does when it tries to handle dependencies when it needs one that isn't the latest, but newer that the one that is installed - does it even handle this at all?

This the above is true it may continue to be a problem in the future if Jenkins doesn't "do the right thing" to install the correct versions of dependencies, and the docker-plugin is requiring something between a "minimum and maximum" version of docker-java-api.

Peter-Darton-i2 commented 2 years ago

@fraz3alpha You're correct - #882 made the docker-plugin require docker-java-api-plugin 3.1.5-31 or higher.

I've added some info into the changelog ... which caused jenkinsci to rebuild and this time the checks passed so there's now a .hpi file that can be downloaded.

If you use the very latest (1.2.9-SNAPSHOT) docker-plugin code then that should be compatible with the very latest docker-java-api-plugin. If you use docker-plugin 1.2.8 then that requires docker-java-api-plugin version 3.1.5-31.v70b0ca3e8310 or 3.1.5.3-33.ve54af4fabd95 (as 3.1.5-27 doesn't contain the code we now need in it, and 3.2.x onwards isn't binary-compatible)

My guess is that Jenkins didn't understand the docker-java-api-plugin versioning as it's a lot more complicated than n.n.n.n now.

Peter-Darton-i2 commented 2 years ago

@MCMicS , @dnwe There's now a build available at https://ci.jenkins.io/job/Plugins/job/docker-plugin/job/master/262/ - can you test that and let me know if it fixes the issue for you?

If I get positive confirmation that the not-released-yet code is an improvement then I'll release that.

tinmarino commented 2 years ago

@Peter-Darton-i2 that did not fix it for me, it seemed like the same error (sry I did not catch the log). As said above downgrading docker-java-api worked perfect.

I think you forgot to change the contructor too DockerAPI.java#L250

-            cmdExecFactory = new NettyDockerCmdExecFactory()
+           cmdExecFactory = new AbstractDockerCmdExecFactory()
ericcitaire commented 2 years ago

@Peter-Darton-i2 that did not fix it for me, it seemed like the same error (sry I did not catch the log). As said above downgrading docker-java-api worked perfect.

I think you forgot to change the contructor too DockerAPI.java#L250

-            cmdExecFactory = new NettyDockerCmdExecFactory()
+           cmdExecFactory = new AbstractDockerCmdExecFactory()

AbstractDockerCmdExecFactory is abstract, and thus cannot be instanciated.

Can you please check the logs and paste the error and trace here ?

johanlundberg commented 2 years ago

I tried Docker plugin version 1.2.9-rc1010.af05b45e225c with Docker API Plugin version 3.2.13-37.vf3411c9828b9 and I get the error below.

2022-04-21T09:25:31.496463102Z java.lang.NoSuchMethodError: 'com.github.dockerjava.netty.NettyDockerCmdExecFactory com.github.dockerjava.netty.NettyDockerCmdExecFactory.withReadTimeout(java.lang.Integer)'
2022-04-21T09:25:31.496473306Z  at io.jenkins.docker.client.DockerAPI.makeClient(DockerAPI.java:251)
2022-04-21T09:25:31.496478572Z  at io.jenkins.docker.client.DockerAPI.getOrMakeClient(DockerAPI.java:201)
2022-04-21T09:25:31.496483825Z  at io.jenkins.docker.client.DockerAPI.getClient(DockerAPI.java:170)
2022-04-21T09:25:31.496499756Z  at io.jenkins.docker.client.DockerAPI.getClient(DockerAPI.java:153)
2022-04-21T09:25:31.496506506Z  at com.nirima.jenkins.plugins.docker.DockerCloud.countContainersInDocker(DockerCloud.java:630)
2022-04-21T09:25:31.496511782Z  at com.nirima.jenkins.plugins.docker.DockerCloud.canAddProvisionedAgent(DockerCloud.java:649)
2022-04-21T09:25:31.496516891Z  at com.nirima.jenkins.plugins.docker.DockerCloud.provision(DockerCloud.java:358)
2022-04-21T09:25:31.496521855Z  at hudson.slaves.Cloud.provision(Cloud.java:210)
2022-04-21T09:25:31.496526836Z  at hudson.slaves.NodeProvisioner$StandardStrategyImpl.apply(NodeProvisioner.java:727)
2022-04-21T09:25:31.496532787Z  at hudson.slaves.NodeProvisioner.update(NodeProvisioner.java:326)
2022-04-21T09:25:31.496537567Z  at hudson.slaves.NodeProvisioner.access$1000(NodeProvisioner.java:71)
2022-04-21T09:25:31.496542276Z  at hudson.slaves.NodeProvisioner$NodeProvisionerInvoker.doRun(NodeProvisioner.java:822)
2022-04-21T09:25:31.496547032Z  at hudson.triggers.SafeTimerTask.run(SafeTimerTask.java:92)
2022-04-21T09:25:31.496551862Z  at jenkins.security.ImpersonatingScheduledExecutorService$1.run(ImpersonatingScheduledExecutorService.java:67)
2022-04-21T09:25:31.496556767Z  at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
2022-04-21T09:25:31.496561482Z  at java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305)
2022-04-21T09:25:31.496566232Z  at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305)
2022-04-21T09:25:31.496594849Z  at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
2022-04-21T09:25:31.496600312Z  at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
2022-04-21T09:25:31.496604573Z  at java.base/java.lang.Thread.run(Thread.java:829)
ericcitaire commented 2 years ago

Strange...

Another solution might be to cast to NettyDockerCmdExecFactory as described in this comment. @Osipion, who worked on a similar issue might have some insights.

bguerin commented 2 years ago

https://github.com/docker-java/docker-java/commit/978ac882a2c004e8edd317c2c80e4e2c855a1bc3

Methods withReadTimeout and withConnectTimeout moved from NettyDockerCmdExecFactory to AbstractDockerCmdExecFactory between 3.1 and 3.2

CJCombrink commented 2 years ago

When can we expect this fix to be released for installation through the Plugin UI?

CJCombrink commented 2 years ago

We installed the plugin from the latest build and fixed our issues: https://ci.jenkins.io/job/Plugins/job/docker-plugin/job/master/263/

Our issue after upgrading: We lost our configuration and when trying to add the clouds back we could not connect to our docker services. This is resolved with the latest build

smellouk commented 2 years ago

@pjdarton do you know when we can have the next release 1.2.9 ?

phreakadelle commented 2 years ago

I would also be very interested in this.

java.lang.NoSuchMethodError: com.github.dockerjava.netty.NettyDockerCmdExecFactory.withReadTimeout(Ljava/lang/Integer;)Lcom/github/dockerjava/netty/NettyDockerCmdExecFactory;
    at io.jenkins.docker.client.DockerAPI.makeClient(DockerAPI.java:250)
    at io.jenkins.docker.client.DockerAPI.getOrMakeClient(DockerAPI.java:200)
    at io.jenkins.docker.client.DockerAPI.getClient(DockerAPI.java:169)
    at io.jenkins.docker.client.DockerAPI.getClient(DockerAPI.java:152)
    at com.nirima.jenkins.plugins.docker.DockerCloud.countContainersInDocker(DockerCloud.java:630)
    at com.nirima.jenkins.plugins.docker.DockerCloud.canAddProvisionedAgent(DockerCloud.java:649)
    at com.nirima.jenkins.plugins.docker.DockerCloud.provision(DockerCloud.java:358)
    at hudson.slaves.Cloud.provision(Cloud.java:210)
    at hudson.slaves.NodeProvisioner$StandardStrategyImpl.apply(NodeProvisioner.java:727)
    at hudson.slaves.NodeProvisioner.update(NodeProvisioner.java:326)
    at hudson.slaves.NodeProvisioner.access$1000(NodeProvisioner.java:71)
    at hudson.slaves.NodeProvisioner$NodeProvisionerInvoker.doRun(NodeProvisioner.java:824)
    at hudson.triggers.SafeTimerTask.run(SafeTimerTask.java:92)
    at jenkins.security.ImpersonatingScheduledExecutorService$1.run(ImpersonatingScheduledExecutorService.java:67)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
    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)

I can confirm that with the HPI file from this build it works:

jacobwoffenden commented 2 years ago

+1

y-luis-rojo commented 2 years ago

+1

pjdarton commented 2 years ago

Urk, sorry folks - my "day job" suddenly got busy and I took my eye off the ball (and I think my email decided that a flood of messages about the docker plugin "must mean they're all spam", as nothing arrived in my email inbox either).

As a number of folks have (very kindly) confirmed that this change fixes the issue, I've done a release of 1.2.9 and have updated the changelog accordingly.

You can expect version 1.2.9 to be available in the Jenkins plugin update UI within a few hours (that doesn't happen immediately and I can't force it).

fraz3alpha commented 2 years ago

I can confirm it is available now (10:30 UTC)

Screenshot 2022-04-27 at 11 30 51

arareko commented 2 years ago

I think this is related to an instance of Jenkins I was helping out with yesterday where the docker plugin was allowed to be updated to 1.2.8, but this didn't also bring in the docker-java-api update that it needed and gave a java.lang.ClassNotFoundException: io.jenkins.dockerjavaapi.client.DelegatingDockerClient error.

@fraz3alpha can you recall what you did to get Jenkins stuck out of this error? I'm currently facing this issue after choosing to update all available plugins, except for Docker API given the warning shown in https://github.com/jenkinsci/docker-plugin/issues/884#issuecomment-1102593368. First I need to find out how to gain access to the EC2 AMI instance where we're running Jenkins but once I manage that, I'm not sure if I should manually downgrade/update plugins. Any pointers are greatly appreciated. Thanks!

fraz3alpha commented 2 years ago

You can either upgrade the docker Java API plugin or downgrade the docker plugin (to the previously installed one, which should still be on the filesystem) - either should work

On Wed, 25 May 2022, 07:29 Mauricio Herrera Cuadra, < @.***> wrote:

I think this is related to an instance of Jenkins I was helping out with yesterday where the docker plugin was allowed to be updated to 1.2.8, but this didn't also bring in the docker-java-api update that it needed and gave a java.lang.ClassNotFoundException: io.jenkins.dockerjavaapi.client.DelegatingDockerClient error.

@fraz3alpha https://github.com/fraz3alpha can you recall what you did to get Jenkins stuck out of this error? I'm currently facing this issue after choosing to update all available plugins, except for Docker API given the warning shown in #884 (comment) https://github.com/jenkinsci/docker-plugin/issues/884#issuecomment-1102593368. First I need to find out how to gain access to the EC2 AMI instance where we're running Jenkins but once I manage that, I'm not sure if I should manually downgrade/update plugins. Any pointers are greatly appreciated. Thanks!

— Reply to this email directly, view it on GitHub https://github.com/jenkinsci/docker-plugin/issues/884#issuecomment-1136789099, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAVIFWYOFRIXOLZEUJ2KQNTVLXCGFANCNFSM5TYFWTUQ . You are receiving this because you were mentioned.Message ID: @.***>

arareko commented 2 years ago

@fraz3alpha downgrading did the job. Thanks for the pointer!

exander77 commented 2 years ago

How to recover from this, I update plugins, after login I have this error right away: image

exander77 commented 2 years ago
java.lang.ClassNotFoundException: io.jenkins.dockerjavaapi.client.DelegatingDockerClient
    at org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoader.java:1402)
    at org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:1357)
    at org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:1112)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
Caused: java.lang.NoClassDefFoundError: io/jenkins/dockerjavaapi/client/DelegatingDockerClient
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:756)
    at org.apache.tools.ant.AntClassLoader.defineClassFromData(AntClassLoader.java:1172)
    at org.apache.tools.ant.AntClassLoader.getClassFromStream(AntClassLoader.java:1340)
    at org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoader.java:1392)
    at org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:1357)
    at org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:1112)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
    at java.lang.Class.getDeclaredMethods0(Native Method)
    at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
    at java.lang.Class.getDeclaredMethod(Class.java:2128)
    at com.thoughtworks.xstream.core.util.SerializationMembers.getMethod(SerializationMembers.java:186)
    at com.thoughtworks.xstream.core.util.SerializationMembers.getMethod(SerializationMembers.java:171)
    at com.thoughtworks.xstream.core.util.SerializationMembers.getRRMethod(SerializationMembers.java:202)
    at com.thoughtworks.xstream.core.util.SerializationMembers.callWriteReplace(SerializationMembers.java:97)
    at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:154)
    at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:68)
    at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:59)
    at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:83)
    at hudson.util.RobustReflectionConverter.marshallField(RobustReflectionConverter.java:283)
    at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:270)
    at hudson.util.RobustReflectionConverter$2.visit(RobustReflectionConverter.java:241)
    at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:174)
    at hudson.util.RobustReflectionConverter.doMarshal(RobustReflectionConverter.java:226)
    at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:163)
    at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:68)
    at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:59)
    at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:44)
    at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:87)
    at com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.writeBareItem(AbstractCollectionConverter.java:94)
    at com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.writeItem(AbstractCollectionConverter.java:66)
    at hudson.util.DescribableList$ConverterImpl.marshal(DescribableList.java:274)
    at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:68)
    at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:59)
    at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:83)
    at hudson.util.RobustReflectionConverter.marshallField(RobustReflectionConverter.java:283)
    at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:270)
    at hudson.util.RobustReflectionConverter$2.visit(RobustReflectionConverter.java:241)
    at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:174)
    at hudson.util.RobustReflectionConverter.doMarshal(RobustReflectionConverter.java:226)
    at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:163)
    at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:68)
    at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:59)
    at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:44)
    at com.thoughtworks.xstream.core.TreeMarshaller.start(TreeMarshaller.java:83)
    at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.marshal(AbstractTreeMarshallingStrategy.java:37)
    at com.thoughtworks.xstream.XStream.marshal(XStream.java:1266)
    at com.thoughtworks.xstream.XStream.marshal(XStream.java:1255)
    at com.thoughtworks.xstream.XStream.toXML(XStream.java:1228)
    at hudson.XmlFile.write(XmlFile.java:213)
    at jenkins.model.Jenkins.save(Jenkins.java:3541)
    at jenkins.model.Jenkins.<init>(Jenkins.java:1002)
    at hudson.model.Hudson.<init>(Hudson.java:86)
    at hudson.model.Hudson.<init>(Hudson.java:82)
    at hudson.WebAppMain$3.run(WebAppMain.java:247)
Caused: hudson.util.HudsonFailedToLoad
    at hudson.WebAppMain$3.run(WebAppMain.java:261)
exander77 commented 2 years ago

I would gladly downgrade, but I can't get beyond the login and this error.

arareko commented 2 years ago

I would gladly downgrade, but I can't get beyond the login and this error.

@exander77 You need to SSH into your Jenkins host and do the downgrade manually. As mentioned before, the backed up old version should still be there to be restored.

pjdarton commented 2 years ago

Yup, the docker-plugin and docker-java-api-plugin have been tightly inter-dependent until recently and it's been a pain - it was necessary to upgrade both together or neither ... and it was essential to get the right versions together.

The latest docker-plugin version is less fussy about the version of the docker-java-api-plugin it uses ... it merely needs a "recent" version rather than a specific version.

...but read the changelog for full details.