[JENKINS-50480] - UnsupportedOperationException: Refusing to marshal com.github.dockerjava.api.command.InspectContainerResponse
See original GitHub issueSeems to be a problem due to JEP 200. I use the latest version of Jenkins and this plugin.
java.io.IOException: java.lang.RuntimeException: Failed to serialize hudson.model.Slave#launcher for class io.jenkins.docker.DockerTransientNode
jenkins_1    |  at hudson.XmlFile.write(XmlFile.java:200)
jenkins_1    |  at jenkins.model.Nodes.save(Nodes.java:274)
jenkins_1    |  at hudson.util.PersistedList.onModified(PersistedList.java:173)
jenkins_1    |  at hudson.util.PersistedList.replaceBy(PersistedList.java:85)
jenkins_1    |  at hudson.model.Slave.setNodeProperties(Slave.java:299)
jenkins_1    |  at com.nirima.jenkins.plugins.docker.DockerTemplate.provisionNode(DockerTemplate.java:448)
jenkins_1    |  at com.nirima.jenkins.plugins.docker.DockerCloud$1.run(DockerCloud.java:268)
jenkins_1    |  at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
jenkins_1    |  at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
jenkins_1    |  at java.util.concurrent.FutureTask.run(FutureTask.java:266)
jenkins_1    |  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
jenkins_1    |  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
jenkins_1    |  at java.lang.Thread.run(Thread.java:748)
jenkins_1    | Caused by: java.lang.RuntimeException: Failed to serialize hudson.model.Slave#launcher for class io.jenkins.docker.DockerTransientNode
jenkins_1    |  at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:256)
jenkins_1    |  at hudson.util.RobustReflectionConverter$2.visit(RobustReflectionConverter.java:224)
jenkins_1    |  at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:138)
jenkins_1    |  at hudson.util.RobustReflectionConverter.doMarshal(RobustReflectionConverter.java:209)
jenkins_1    |  at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:150)
jenkins_1    |  at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69)
jenkins_1    |  at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58)
jenkins_1    |  at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:43)
jenkins_1    |  at com.thoughtworks.xstream.core.TreeMarshaller.start(TreeMarshaller.java:82)
jenkins_1    |  at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.marshal(AbstractTreeMarshallingStrategy.java:37)
jenkins_1    |  at com.thoughtworks.xstream.XStream.marshal(XStream.java:1026)
jenkins_1    |  at com.thoughtworks.xstream.XStream.marshal(XStream.java:1015)
jenkins_1    |  at com.thoughtworks.xstream.XStream.toXML(XStream.java:988)
jenkins_1    |  at hudson.XmlFile.write(XmlFile.java:193)
jenkins_1    |  ... 12 more
jenkins_1    | Caused by: java.lang.RuntimeException: Failed to serialize hudson.slaves.DelegatingComputerLauncher#launcher for class io.jenkins.docker.connector.DockerComputerConnector$1
jenkins_1    |  at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:256)
jenkins_1    |  at hudson.util.RobustReflectionConverter$2.visit(RobustReflectionConverter.java:224)
jenkins_1    |  at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:138)
jenkins_1    |  at hudson.util.RobustReflectionConverter.doMarshal(RobustReflectionConverter.java:209)
jenkins_1    |  at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:150)
jenkins_1    |  at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69)
jenkins_1    |  at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58)
jenkins_1    |  at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:84)
jenkins_1    |  at hudson.util.RobustReflectionConverter.marshallField(RobustReflectionConverter.java:265)
jenkins_1    |  at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:252)
jenkins_1    |  ... 25 more
jenkins_1    | Caused by: java.lang.RuntimeException: Failed to serialize io.jenkins.docker.connector.DockerComputerJNLPConnector$1#val$inspect for class io.jenkins.docker.connector.DockerComputerJNLPConnector$1
jenkins_1    |  at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:256)
jenkins_1    |  at hudson.util.RobustReflectionConverter$2.visit(RobustReflectionConverter.java:224)
jenkins_1    |  at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:138)
jenkins_1    |  at hudson.util.RobustReflectionConverter.doMarshal(RobustReflectionConverter.java:209)
jenkins_1    |  at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:150)
jenkins_1    |  at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69)
jenkins_1    |  at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58)
jenkins_1    |  at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:84)
jenkins_1    |  at hudson.util.RobustReflectionConverter.marshallField(RobustReflectionConverter.java:265)
jenkins_1    |  at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:252)
jenkins_1    |  ... 34 more
jenkins_1    | Caused by: java.lang.UnsupportedOperationException: Refusing to marshal com.github.dockerjava.api.command.InspectContainerResponse for security reasons; see https://jenkins.io/redirect/class-filter/
jenkins_1    |  at hudson.util.XStream2$BlacklistedTypesConverter.marshal(XStream2.java:543)
jenkins_1    |  at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69)
jenkins_1    |  at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58)
jenkins_1    |  at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:84)
jenkins_1    |  at hudson.util.RobustReflectionConverter.marshallField(RobustReflectionConverter.java:265)
jenkins_1    |  at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:252)
jenkins_1    |  ... 43 more
Issue Analytics
- State:
- Created 6 years ago
- Comments:11 (5 by maintainers)
 Top Results From Across the Web
Top Results From Across the Web
Refusing to marshal com.github.dockerjava.api.
The docker plugin serializes classes from the 3rd part docker-java ... UnsupportedOperationException: Refusing to marshal com.github.dockerjava.api.command.
Read more >InspectContainerResponse (docker-java 3.0.8 API) - javadoc.io
com.github.dockerjava.api.command.InspectContainerResponse. public class InspectContainerResponse extends Object ... static class, InspectContainerResponse.
Read more > Top Related Medium Post
Top Related Medium Post
No results found
 Top Related StackOverflow Question
Top Related StackOverflow Question
No results found
 Troubleshoot Live Code
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free Top Related Hackernoon Post
Top Related Hackernoon Post
No results found
 Top Related Tweet
Top Related Tweet
No results found
 Top Related Dev.to Post
Top Related Dev.to Post
No results found
 Top Related Hashnode Post
Top Related Hashnode Post
No results found

You could try to switch off whitelist using -Djenkins.security.ClassFilterImpl.SUPPRESS_WHITELIST=true
As @jglick discovered in https://github.com/jenkinsci/docker-plugin/pull/641, this particular bug is fixed in 1.1.3 by https://github.com/jenkinsci/docker-plugin/commit/5a2a123cd808a9c82d154cbcc22ef906a6a97907 . It’s not clear whether there are other JEP-200 in the code, to be checked