Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-50480

UnsupportedOperationException: Refusing to marshal com.github.dockerjava.api.*

      The docker plugin serializes classes from the 3rd part docker-java library which have not been whitelisted.

      Originally reported as a GitHub issue: https://github.com/jenkinsci/docker-plugin/issues/614.

      Fixed in PR #619, which has not yet been released. (Although maybe these classes should not be whitelisted and instead the code should be changed to not serialize them. Needs investigation)

      Example stack trace:

      java.io.IOException: java.lang.RuntimeException: Failed to serialize hudson.model.Slave#launcher for class io.jenkins.docker.DockerTransientNode
          at hudson.XmlFile.write(XmlFile.java:200)
          at jenkins.model.Nodes.save(Nodes.java:274)
          at hudson.util.PersistedList.onModified(PersistedList.java:173)
          at hudson.util.PersistedList.replaceBy(PersistedList.java:85)
          at hudson.model.Slave.setNodeProperties(Slave.java:299)
          at com.nirima.jenkins.plugins.docker.DockerTemplate.provisionNode(DockerTemplate.java:448)
          at com.nirima.jenkins.plugins.docker.DockerCloud$1.run(DockerCloud.java:268)
          at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
          at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
          at java.util.concurrent.FutureTask.run(FutureTask.java:266)
          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)
         Caused by: java.lang.RuntimeException: Failed to serialize hudson.model.Slave#launcher for class io.jenkins.docker.DockerTransientNode
          at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:256)
          at hudson.util.RobustReflectionConverter$2.visit(RobustReflectionConverter.java:224)
          at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:138)
          at hudson.util.RobustReflectionConverter.doMarshal(RobustReflectionConverter.java:209)
          at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:150)
          at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69)
          at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58)
          at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:43)
          at com.thoughtworks.xstream.core.TreeMarshaller.start(TreeMarshaller.java:82)
          at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.marshal(AbstractTreeMarshallingStrategy.java:37)
          at com.thoughtworks.xstream.XStream.marshal(XStream.java:1026)
          at com.thoughtworks.xstream.XStream.marshal(XStream.java:1015)
          at com.thoughtworks.xstream.XStream.toXML(XStream.java:988)
          at hudson.XmlFile.write(XmlFile.java:193)
          ... 12 more
         Caused by: java.lang.RuntimeException: Failed to serialize hudson.slaves.DelegatingComputerLauncher#launcher for class io.jenkins.docker.connector.DockerComputerConnector$1
          at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:256)
          at hudson.util.RobustReflectionConverter$2.visit(RobustReflectionConverter.java:224)
          at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:138)
          at hudson.util.RobustReflectionConverter.doMarshal(RobustReflectionConverter.java:209)
          at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:150)
          at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69)
          at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58)
          at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:84)
          at hudson.util.RobustReflectionConverter.marshallField(RobustReflectionConverter.java:265)
          at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:252)
          ... 25 more
         Caused by: java.lang.RuntimeException: Failed to serialize io.jenkins.docker.connector.DockerComputerJNLPConnector$1#val$inspect for class io.jenkins.docker.connector.DockerComputerJNLPConnector$1
          at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:256)
          at hudson.util.RobustReflectionConverter$2.visit(RobustReflectionConverter.java:224)
          at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:138)
          at hudson.util.RobustReflectionConverter.doMarshal(RobustReflectionConverter.java:209)
          at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:150)
          at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69)
          at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58)
          at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:84)
          at hudson.util.RobustReflectionConverter.marshallField(RobustReflectionConverter.java:265)
          at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:252)
          ... 34 more
         Caused by: java.lang.UnsupportedOperationException: Refusing to marshal com.github.dockerjava.api.command.InspectContainerResponse for security reasons; see https://jenkins.io/redirect/class-filter/
          at hudson.util.XStream2$BlacklistedTypesConverter.marshal(XStream2.java:543)
          at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69)
          at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58)
          at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:84)
          at hudson.util.RobustReflectionConverter.marshallField(RobustReflectionConverter.java:265)
          at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:252)
          ... 43 more
      

          [JENKINS-50480] UnsupportedOperationException: Refusing to marshal com.github.dockerjava.api.*

          Devin Nusbaum created issue -
          Devin Nusbaum made changes -
          Description Original: The docker plugin serializes classes from the 3rd part docker-java library which have not been whitelisted.

          Originally reported as a GitHub issue: [https://github.com/jenkinsci/docker-plugin/issues/614].

          Fixed in [PR #619|https://github.com/jenkinsci/docker-plugin/pull/619/], which has not yet been released.

          Example stack trace:
          {noformat}
          java.io.IOException: java.lang.RuntimeException: Failed to serialize hudson.model.Slave#launcher for class io.jenkins.docker.DockerTransientNode
              at hudson.XmlFile.write(XmlFile.java:200)
              at jenkins.model.Nodes.save(Nodes.java:274)
              at hudson.util.PersistedList.onModified(PersistedList.java:173)
              at hudson.util.PersistedList.replaceBy(PersistedList.java:85)
              at hudson.model.Slave.setNodeProperties(Slave.java:299)
              at com.nirima.jenkins.plugins.docker.DockerTemplate.provisionNode(DockerTemplate.java:448)
              at com.nirima.jenkins.plugins.docker.DockerCloud$1.run(DockerCloud.java:268)
              at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
              at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
              at java.util.concurrent.FutureTask.run(FutureTask.java:266)
              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)
             Caused by: java.lang.RuntimeException: Failed to serialize hudson.model.Slave#launcher for class io.jenkins.docker.DockerTransientNode
              at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:256)
              at hudson.util.RobustReflectionConverter$2.visit(RobustReflectionConverter.java:224)
              at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:138)
              at hudson.util.RobustReflectionConverter.doMarshal(RobustReflectionConverter.java:209)
              at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:150)
              at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69)
              at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58)
              at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:43)
              at com.thoughtworks.xstream.core.TreeMarshaller.start(TreeMarshaller.java:82)
              at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.marshal(AbstractTreeMarshallingStrategy.java:37)
              at com.thoughtworks.xstream.XStream.marshal(XStream.java:1026)
              at com.thoughtworks.xstream.XStream.marshal(XStream.java:1015)
              at com.thoughtworks.xstream.XStream.toXML(XStream.java:988)
              at hudson.XmlFile.write(XmlFile.java:193)
              ... 12 more
             Caused by: java.lang.RuntimeException: Failed to serialize hudson.slaves.DelegatingComputerLauncher#launcher for class io.jenkins.docker.connector.DockerComputerConnector$1
              at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:256)
              at hudson.util.RobustReflectionConverter$2.visit(RobustReflectionConverter.java:224)
              at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:138)
              at hudson.util.RobustReflectionConverter.doMarshal(RobustReflectionConverter.java:209)
              at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:150)
              at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69)
              at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58)
              at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:84)
              at hudson.util.RobustReflectionConverter.marshallField(RobustReflectionConverter.java:265)
              at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:252)
              ... 25 more
             Caused by: java.lang.RuntimeException: Failed to serialize io.jenkins.docker.connector.DockerComputerJNLPConnector$1#val$inspect for class io.jenkins.docker.connector.DockerComputerJNLPConnector$1
              at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:256)
              at hudson.util.RobustReflectionConverter$2.visit(RobustReflectionConverter.java:224)
              at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:138)
              at hudson.util.RobustReflectionConverter.doMarshal(RobustReflectionConverter.java:209)
              at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:150)
              at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69)
              at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58)
              at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:84)
              at hudson.util.RobustReflectionConverter.marshallField(RobustReflectionConverter.java:265)
              at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:252)
              ... 34 more
             Caused by: java.lang.UnsupportedOperationException: Refusing to marshal com.github.dockerjava.api.command.InspectContainerResponse for security reasons; see https://jenkins.io/redirect/class-filter/
              at hudson.util.XStream2$BlacklistedTypesConverter.marshal(XStream2.java:543)
              at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69)
              at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58)
              at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:84)
              at hudson.util.RobustReflectionConverter.marshallField(RobustReflectionConverter.java:265)
              at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:252)
              ... 43 more
          {noformat}
          New: The docker plugin serializes classes from the 3rd part docker-java library which have not been whitelisted.

          Originally reported as a GitHub issue: [https://github.com/jenkinsci/docker-plugin/issues/614].

          Fixed in [PR #619|https://github.com/jenkinsci/docker-plugin/pull/619/], which has not yet been released. (Although maybe these classes should not be whitelisted and instead the code should be changed to not serialize them. Needs investigation)

          Example stack trace:
          {noformat}
          java.io.IOException: java.lang.RuntimeException: Failed to serialize hudson.model.Slave#launcher for class io.jenkins.docker.DockerTransientNode
              at hudson.XmlFile.write(XmlFile.java:200)
              at jenkins.model.Nodes.save(Nodes.java:274)
              at hudson.util.PersistedList.onModified(PersistedList.java:173)
              at hudson.util.PersistedList.replaceBy(PersistedList.java:85)
              at hudson.model.Slave.setNodeProperties(Slave.java:299)
              at com.nirima.jenkins.plugins.docker.DockerTemplate.provisionNode(DockerTemplate.java:448)
              at com.nirima.jenkins.plugins.docker.DockerCloud$1.run(DockerCloud.java:268)
              at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
              at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
              at java.util.concurrent.FutureTask.run(FutureTask.java:266)
              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)
             Caused by: java.lang.RuntimeException: Failed to serialize hudson.model.Slave#launcher for class io.jenkins.docker.DockerTransientNode
              at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:256)
              at hudson.util.RobustReflectionConverter$2.visit(RobustReflectionConverter.java:224)
              at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:138)
              at hudson.util.RobustReflectionConverter.doMarshal(RobustReflectionConverter.java:209)
              at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:150)
              at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69)
              at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58)
              at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:43)
              at com.thoughtworks.xstream.core.TreeMarshaller.start(TreeMarshaller.java:82)
              at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.marshal(AbstractTreeMarshallingStrategy.java:37)
              at com.thoughtworks.xstream.XStream.marshal(XStream.java:1026)
              at com.thoughtworks.xstream.XStream.marshal(XStream.java:1015)
              at com.thoughtworks.xstream.XStream.toXML(XStream.java:988)
              at hudson.XmlFile.write(XmlFile.java:193)
              ... 12 more
             Caused by: java.lang.RuntimeException: Failed to serialize hudson.slaves.DelegatingComputerLauncher#launcher for class io.jenkins.docker.connector.DockerComputerConnector$1
              at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:256)
              at hudson.util.RobustReflectionConverter$2.visit(RobustReflectionConverter.java:224)
              at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:138)
              at hudson.util.RobustReflectionConverter.doMarshal(RobustReflectionConverter.java:209)
              at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:150)
              at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69)
              at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58)
              at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:84)
              at hudson.util.RobustReflectionConverter.marshallField(RobustReflectionConverter.java:265)
              at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:252)
              ... 25 more
             Caused by: java.lang.RuntimeException: Failed to serialize io.jenkins.docker.connector.DockerComputerJNLPConnector$1#val$inspect for class io.jenkins.docker.connector.DockerComputerJNLPConnector$1
              at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:256)
              at hudson.util.RobustReflectionConverter$2.visit(RobustReflectionConverter.java:224)
              at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:138)
              at hudson.util.RobustReflectionConverter.doMarshal(RobustReflectionConverter.java:209)
              at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:150)
              at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69)
              at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58)
              at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:84)
              at hudson.util.RobustReflectionConverter.marshallField(RobustReflectionConverter.java:265)
              at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:252)
              ... 34 more
             Caused by: java.lang.UnsupportedOperationException: Refusing to marshal com.github.dockerjava.api.command.InspectContainerResponse for security reasons; see https://jenkins.io/redirect/class-filter/
              at hudson.util.XStream2$BlacklistedTypesConverter.marshal(XStream2.java:543)
              at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69)
              at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58)
              at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:84)
              at hudson.util.RobustReflectionConverter.marshallField(RobustReflectionConverter.java:265)
              at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:252)
              ... 43 more
          {noformat}
          Oleg Nenashev made changes -
          Link New: This issue relates to JENKINS-50509 [ JENKINS-50509 ]
          Oleg Nenashev made changes -
          Status Original: Open [ 1 ] New: In Progress [ 3 ]
          Oleg Nenashev made changes -
          Status Original: In Progress [ 3 ] New: In Review [ 10005 ]
          Oleg Nenashev made changes -
          Remote Link New: This issue links to "https://github.com/jenkinsci/docker-plugin/pull/619/ (Web Link)" [ 20354 ]
          Jesse Glick made changes -
          Remote Link New: This issue links to "PR 641 (Web Link)" [ 20361 ]
          Jesse Glick made changes -
          Devin Nusbaum made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: In Review [ 10005 ] New: Resolved [ 5 ]
          Oleg Nenashev made changes -
          Link New: This issue relates to JENKINS-50599 [ JENKINS-50599 ]
          James Dumay made changes -
          Remote Link New: This issue links to "CloudBees Internal OSS-2685 (Web Link)" [ 20549 ]

            ndeloof Nicolas De Loof
            dnusbaum Devin Nusbaum
            Votes:
            2 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: