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

Exception in "Create Container" Docker build step

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Labels:
    • Environment:
      Running jenkins in Docker container (from image jenkins/jenkins:lts-alpine)

      Jenkins version: 2.121.1
      docker-build-step version: 2.0
      docker version: 17.12.1-ce
    • Similar Issues:

      Description

      The docker container is actually created but the step fails with this exception.

      ERROR: Build step failed with exception
      com.fasterxml.jackson.databind.JsonMappingException: No suitable constructor found for type [simple type, class com.github.dockerjava.api.model.Volume]: can not instantiate from JSON object (missing default constructor or creator, or perhaps need to add/enable type information?)
       at [Source: {"Args":[],"Config":{"AttachStderr":false,"AttachStdin":false,"AttachStdout":false,"Domainname":"","Entrypoint":["/entrypoint.sh"],"Env":["PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"],"Hostname":"sf-testenv","Image":"ettchris/sf-testenv","Labels":{"org.label-schema.schema-version":"= 1.0     org.label-schema.name=CentOS Base Image     org.label-schema.vendor=CentOS     org.label-schema.license=GPLv2     org.label-schema.build-date=20180402"},"OpenStdin":false,"StdinOnce":false,"Tty":false,"User":"","Volumes":{"/skedflex/sftest":{}},"WorkingDir":"/skedflex/sftest"},"Created":"2018-06-29T01:38:28.757358403Z","Driver":"overlay2","ExecDriver":null,"HostConfig":{"Binds":["/data/jenkins/home/workspace/test2:/skedflex/sftest:rw"],"BlkioWeight":0,"ContainerIDFile":"","CpuPeriod":0,"CpuShares":0,"CpuQuota":0,"CpusetCpus":"","CpusetMems":"","LogConfig":{"Type":"journald","Config":{}},"Memory":0,"MemorySwap":0,"MemoryReservation":0,"KernelMemory":0,"NetworkMode":"default","OomKillDisable":false,"OomScoreAdj":false,"Privileged":false,"PublishAllPorts":false,"ReadonlyRootfs":false,"RestartPolicy":{"MaximumRetryCount":0,"Name":""},"PidMode":"","CgroupParent":"","VolumeDriver":"","ShmSize":67108864,"PidsLimit":0},"HostnamePath":"","HostsPath":"","LogPath":"","Id":"0d069cbfa4671a78bb43b839e1cc56c7048f0f76ad1de047d969dced034492b4","SizeRootFs":null,"Image":"sha256:c765766382e2f8ab09db6ce9de7c2e8129a0f034e3883126017525042b262d56","MountLabel":"","Name":"/sf-testenv","RestartCount":0,"NetworkSettings":{"Bridge":"","SandboxID":"","HairpinMode":false,"LinkLocalIPv6Address":"","LinkLocalIPv6PrefixLen":0,"Ports":{},"SandboxKey":"","SecondaryIPAddresses":null,"SecondaryIPv6Addresses":null,"EndpointID":"","Gateway":"","PortMapping":null,"GlobalIPv6Address":"","GlobalIPv6PrefixLen":0,"IPAddress":"","IPPrefixLen":0,"IPv6Gateway":"","MacAddress":"","Networks":{"bridge":{"IPAMConfig":null,"Links":null,"Aliases":null,"NetworkID":"","EndpointID":"","Gateway":"","IPAddress":"","IPPrefixLen":0,"IPv6Gateway":"","GlobalIPv6Address":"","GlobalIPv6PrefixLen":0,"MacAddress":""}}},"Path":"/entrypoint.sh","ProcessLabel":"","ResolvConfPath":"","ExecIDs":null,"State":{"oomkilled":false,"Status":"created","Running":false,"Paused":false,"Restarting":false,"OOMKilled":false,"Dead":false,"Pid":0,"ExitCode":0,"Error":"","StartedAt":"0001-01-01T00:00:00Z","FinishedAt":"0001-01-01T00:00:00Z","Health":null},"Volumes":null,"VolumesRW":null,"Mounts":[{"Name":null,"Source":"/data/jenkins/home/workspace/test2","Destination":{"path":"/skedflex/sftest"},"Driver":null,"Mode":"rw","RW":true}]}; line: 1, column: 2541] (through reference chain: com.github.dockerjava.api.command.InspectContainerResponse["Mounts"]->java.util.ArrayList[0]->com.github.dockerjava.api.command.Mount["Destination"])
      	at com.fasterxml.jackson.databind.JsonMappingException.from(JsonMappingException.java:148)
      	at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.deserializeFromObjectUsingNonDefault(BeanDeserializerBase.java:1106)
      	at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserializeFromObject(BeanDeserializer.java:296)
      	at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:133)
      	at com.fasterxml.jackson.databind.deser.SettableBeanProperty.deserialize(SettableBeanProperty.java:520)
      	at com.fasterxml.jackson.databind.deser.impl.FieldProperty.deserializeAndSet(FieldProperty.java:101)
      	at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:258)
      	at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:125)
      	at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:245)
      	at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:217)
      	at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:25)
      	at com.fasterxml.jackson.databind.deser.SettableBeanProperty.deserialize(SettableBeanProperty.java:520)
      	at com.fasterxml.jackson.databind.deser.impl.FieldProperty.deserializeAndSet(FieldProperty.java:101)
      	at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:258)
      	at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:125)
      	at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:3736)
      	at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:2726)
      	at org.jenkinsci.plugins.dockerbuildstep.cmd.CreateContainerCommand.execute(CreateContainerCommand.java:217)
      Caused: java.lang.IllegalArgumentException
      	at org.jenkinsci.plugins.dockerbuildstep.cmd.CreateContainerCommand.execute(CreateContainerCommand.java:225)
      	at org.jenkinsci.plugins.dockerbuildstep.DockerBuilder.perform(DockerBuilder.java:77)
      	at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:744)
      	at hudson.model.Build$BuildExecution.build(Build.java:206)
      	at hudson.model.Build$BuildExecution.doRun(Build.java:163)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:504)
      	at hudson.model.Run.execute(Run.java:1794)
      	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      	at hudson.model.ResourceController.execute(ResourceController.java:97)
      	at hudson.model.Executor.run(Executor.java:429)
      Build step 'Execute Docker command' marked build as failure
      

        Attachments

          Activity

          Hide
          oleg_nenashev Oleg Nenashev added a comment -

          This plugin uses Docker Java without shading, so there may be a version conflict with other pkugins using Docker Java API plugin.

          Or, maybe, a wrong Docker API version is accessed

          Show
          oleg_nenashev Oleg Nenashev added a comment - This plugin uses Docker Java without shading, so there may be a version conflict with other pkugins using Docker Java API plugin. Or, maybe, a wrong Docker API version is accessed

            People

            • Assignee:
              vjuranek vjuranek
              Reporter:
              ettchris Chris Lajoie
            • Votes:
              2 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated: