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

Unable to serialize

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Critical
    • Resolution: Fixed
    • Component/s: docker-commons-plugin
    • Labels:
      None
    • Environment:
      Jenkins 1.646
      Docker Commons Plugin 1.2
      CloudBees Docker Custom Build Environment Plugin 1.6.4
    • Similar Issues:

      Description

      When trying to use the Docker plugins, I get an exception:

      FATAL: Unable to serialize org.jenkinsci.plugins.docker.commons.tools.DockerToolInstaller$1@5ee9f1aa
      java.io.IOException: Unable to serialize org.jenkinsci.plugins.docker.commons.tools.DockerToolInstaller$1@5ee9f1aa
      	at hudson.remoting.UserRequest.serialize(UserRequest.java:168)
      	at hudson.remoting.UserRequest.<init>(UserRequest.java:62)
      	at hudson.remoting.Channel.call(Channel.java:779)
      	at org.jenkinsci.plugins.docker.commons.tools.DockerToolInstaller.performInstallation(DockerToolInstaller.java:74)
      	at hudson.tools.InstallerTranslator.getToolHome(InstallerTranslator.java:68)
      	at hudson.tools.ToolLocationNodeProperty.getToolHome(ToolLocationNodeProperty.java:108)
      	at hudson.tools.ToolInstallation.translateFor(ToolInstallation.java:206)
      	at org.jenkinsci.plugins.docker.commons.tools.DockerTool.forNode(DockerTool.java:107)
      	at org.jenkinsci.plugins.docker.commons.tools.DockerTool.getExecutable(DockerTool.java:80)
      	at com.cloudbees.jenkins.plugins.docker_build_env.Docker.<init>(Docker.java:50)
      	at com.cloudbees.jenkins.plugins.docker_build_env.DockerBuildWrapper.decorateLauncher(DockerBuildWrapper.java:132)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.createLauncher(AbstractBuild.java:566)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:492)
      	at hudson.model.Run.execute(Run.java:1738)
      	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      	at hudson.model.ResourceController.execute(ResourceController.java:98)
      	at hudson.model.Executor.run(Executor.java:410)
      Caused by: java.io.NotSerializableException: org.jenkinsci.plugins.docker.commons.tools.DockerToolInstaller
      	at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1184)
      	at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1548)
      	at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1509)
      	at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1432)
      	at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178)
      	at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:348)
      	at hudson.remoting.UserRequest._serialize(UserRequest.java:157)
      	at hudson.remoting.UserRequest.serialize(UserRequest.java:166)
      	... 16 more
      Finished: FAILURE
      

        Attachments

          Issue Links

            Activity

            Hide
            sebglon sébastien glon added a comment -

            I have the same error with
            Jenkins ver. 1.625.3
            Docker plugin 0.16.0
            Docker Commons Plugin 1.2

            Show
            sebglon sébastien glon added a comment - I have the same error with Jenkins ver. 1.625.3 Docker plugin 0.16.0 Docker Commons Plugin 1.2
            Hide
            theobolo theo bolo added a comment -

            Hello,

            I've got the same error when i want to use the docker plugin to create a docker image with a Dockerfile after a gradle build.
            I run Jenkins on a Kubernetes cluster with a dynamic jenkins docker slave provisioning.

            Jenkins ver. 1.625.1
            Docker plugin 0.16.0
            Docker Commons Plugin 1.2

            Show
            theobolo theo bolo added a comment - Hello, I've got the same error when i want to use the docker plugin to create a docker image with a Dockerfile after a gradle build. I run Jenkins on a Kubernetes cluster with a dynamic jenkins docker slave provisioning. Jenkins ver. 1.625.1 Docker plugin 0.16.0 Docker Commons Plugin 1.2
            Hide
            vadimo Vadimo added a comment -

            me too.

            Question: Did you also have set Docker Engine to be automatically installed in the config settings?

            A wild guess is, that the Docker-engine installation fails.

            Show
            vadimo Vadimo added a comment - me too. Question: Did you also have set Docker Engine to be automatically installed in the config settings? A wild guess is, that the Docker-engine installation fails.
            Hide
            jglick Jesse Glick added a comment -

            Prevents docker.withTool from working on an agent when using the Docker Pipeline plugin.

            Implementing hudson.remoting.Callable as an anonymous inner class is a “classic rookie mistake”. I am surprised FindBugs does not catch this, in fact.

            Show
            jglick Jesse Glick added a comment - Prevents docker.withTool from working on an agent when using the Docker Pipeline plugin. Implementing hudson.remoting.Callable as an anonymous inner class is a “classic rookie mistake”. I am surprised FindBugs does not catch this, in fact.
            Hide
            jglick Jesse Glick added a comment -

            Would not work anyway due to JENKINS-36082.

            Using the Extract *.zip/*.tar.gz installer does not seem to be a viable workaround, because it does not create the directory structure expected by callers, with $TOOL_HOME/bin/docker.

            Show
            jglick Jesse Glick added a comment - Would not work anyway due to JENKINS-36082 . Using the Extract *.zip/*.tar.gz installer does not seem to be a viable workaround, because it does not create the directory structure expected by callers, with $TOOL_HOME/bin/docker .
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Jesse Glick
            Path:
            pom.xml
            src/main/java/org/jenkinsci/plugins/docker/commons/tools/DockerToolInstaller.java
            src/main/resources/org/jenkinsci/plugins/docker/commons/tools/Messages.properties
            src/test/java/org/jenkinsci/plugins/docker/commons/tools/DockerToolInstallerTest.java
            http://jenkins-ci.org/commit/docker-commons-plugin/dc2fd7547223d006f88c4998a518fcb3f6fd5c42
            Log:
            [FIXED JENKINS-36082] [FIXED JENKINS-32790] DockerToolInstaller was broken.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: pom.xml src/main/java/org/jenkinsci/plugins/docker/commons/tools/DockerToolInstaller.java src/main/resources/org/jenkinsci/plugins/docker/commons/tools/Messages.properties src/test/java/org/jenkinsci/plugins/docker/commons/tools/DockerToolInstallerTest.java http://jenkins-ci.org/commit/docker-commons-plugin/dc2fd7547223d006f88c4998a518fcb3f6fd5c42 Log: [FIXED JENKINS-36082] [FIXED JENKINS-32790] DockerToolInstaller was broken.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Jesse Glick
            Path:
            pom.xml
            src/main/java/org/jenkinsci/plugins/docker/commons/tools/DockerToolInstaller.java
            src/main/resources/org/jenkinsci/plugins/docker/commons/tools/Messages.properties
            src/test/java/org/jenkinsci/plugins/docker/commons/tools/DockerToolInstallerTest.java
            http://jenkins-ci.org/commit/docker-commons-plugin/92dbbf9ceb2abff86ff9fe4653132d467400d407
            Log:
            Merge pull request #53 from jglick/DockerToolInstaller

            JENKINS-36082 JENKINS-32790 DockerToolInstaller was broken

            Compare: https://github.com/jenkinsci/docker-commons-plugin/compare/004cc344caaf...92dbbf9ceb2a

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: pom.xml src/main/java/org/jenkinsci/plugins/docker/commons/tools/DockerToolInstaller.java src/main/resources/org/jenkinsci/plugins/docker/commons/tools/Messages.properties src/test/java/org/jenkinsci/plugins/docker/commons/tools/DockerToolInstallerTest.java http://jenkins-ci.org/commit/docker-commons-plugin/92dbbf9ceb2abff86ff9fe4653132d467400d407 Log: Merge pull request #53 from jglick/DockerToolInstaller JENKINS-36082 JENKINS-32790 DockerToolInstaller was broken Compare: https://github.com/jenkinsci/docker-commons-plugin/compare/004cc344caaf...92dbbf9ceb2a

              People

              • Assignee:
                jglick Jesse Glick
                Reporter:
                joshuaspence Joshua Spence
              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: