• Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Blocker Blocker
    • docker-plugin
    • None
    • Jenkins 2.9, docker-plugin 0.16.0

      jenkins | SEVERE: Error in provisioning; template='DockerTemplate{configVersion=2, labelString='buildslave-centos6', launcher=com.nirima.jenkins.plugins.docker.launcher.DockerComputerSSHLauncher@785ec7f5, remoteFsMapping='', remoteFs='/home/jenkins', instanceCap=1, mode=NORMAL, retentionStrategy=com.nirima.jenkins.plugins.docker.strategy.DockerOnceRetentionStrategy@38f86c7b, numExecutors=1, dockerTemplateBase=DockerTemplateBase

      {image=buildslave-centos6}

      , removeVolumes=false, pullStrategy=PULL_LATEST}' for cloud='docker'
      jenkins | com.github.dockerjava.api.BadRequestException:

      {"message":"starting container with HostConfig was deprecated since v1.10 and removed in v1.12"}

      at org.glassfish.jersey.client.ClientFilteringStages$ResponseFilterStage.apply(ClientFilteringStages.java:123)
      jenkins | at org.glassfish.jersey.process.internal.Stages.process(Stages.java:171)
      jenkins | at org.glassfish.jersey.client.ClientRuntime.invoke(ClientRuntime.java:251)
      jenkins | at org.glassfish.jersey.client.JerseyInvocation$1.call(JerseyInvocation.java:667)
      jenkins | at org.glassfish.jersey.client.JerseyInvocation$1.call(JerseyInvocation.java:664)
      jenkins | at org.glassfish.jersey.internal.Errors.process(Errors.java:315)
      jenkins | at org.glassfish.jersey.internal.Errors.process(Errors.java:297)
      jenkins | at org.glassfish.jersey.internal.Errors.process(Errors.java:228)
      jenkins | at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:424)
      jenkins | at org.glassfish.jersey.client.JerseyInvocation.invoke(JerseyInvocation.java:664)
      jenkins | at org.glassfish.jersey.client.JerseyInvocation$Builder.method(JerseyInvocation.java:424)
      jenkins | at org.glassfish.jersey.client.JerseyInvocation$Builder.post(JerseyInvocation.java:333)
      jenkins | at com.github.dockerjava.jaxrs.StartContainerCmdExec.execute(StartContainerCmdExec.java:28)
      jenkins | at com.github.dockerjava.jaxrs.StartContainerCmdExec.execute(StartContainerCmdExec.java:13)
      jenkins | at com.github.dockerjava.jaxrs.AbstrSyncDockerCmdExec.exec(AbstrSyncDockerCmdExec.java:24)
      jenkins | at com.github.dockerjava.core.command.AbstrDockerCmd.exec(AbstrDockerCmd.java:33)
      jenkins | at com.github.dockerjava.core.command.StartContainerCmdImpl.exec(StartContainerCmdImpl.java:53)
      jenkins | at com.nirima.jenkins.plugins.docker.DockerCloud.runContainer(DockerCloud.java:288)
      jenkins | at com.nirima.jenkins.plugins.docker.DockerCloud.provisionWithWait(DockerCloud.java:366)
      jenkins | at com.nirima.jenkins.plugins.docker.DockerCloud.access$000(DockerCloud.java:57)
      jenkins | at com.nirima.jenkins.plugins.docker.DockerCloud$1.call(DockerCloud.java:242)
      jenkins | at com.nirima.jenkins.plugins.docker.DockerCloud$1.call(DockerCloud.java:239)
      jenkins | at jenkins.util.ContextResettingExecutorService$2.call(ContextResettingExecutorService.java:46)
      jenkins | at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      jenkins | at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      jenkins | at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      jenkins | at java.lang.Thread.run(Thread.java:745)
      jenkins |
      jenkins | Jun 19, 2016 7:47:37 PM com.nirima.jenkins.plugins.docker.DockerCloud provision

          [JENKINS-36080] docker 1.12 breaks plugin because of HostConfig

          I'm also getting this under 1.12 (final)

          João Magalhães added a comment - I'm also getting this under 1.12 (final)

          magnayn added a comment -

          See
          https://github.com/docker-java/docker-java/issues/617

          If you want to fix this, you'll probably have to
          a) Get the above fixed in docker-java
          b) Migrate all of jenkins-docker to use docker-java's 3.x API (as 2.x is "discontinued due to lack of resources")
          c) Ensure 3.x (or fork thereof) includes something equivalent to https://github.com/docker-java/docker-java/pull/610

          None of these are likely hard ( (b) is a touch fiddly, I tried once but backed out when I had no available time).

          Good luck!

          magnayn added a comment - See https://github.com/docker-java/docker-java/issues/617 If you want to fix this, you'll probably have to a) Get the above fixed in docker-java b) Migrate all of jenkins-docker to use docker-java's 3.x API (as 2.x is "discontinued due to lack of resources") c) Ensure 3.x (or fork thereof) includes something equivalent to https://github.com/docker-java/docker-java/pull/610 None of these are likely hard ( (b) is a touch fiddly, I tried once but backed out when I had no available time). Good luck!

          Jan Dohl added a comment -

          Same issue for me. Downgrading Docker engine to 1.11. fixes the problem temporarily.

          Jan Dohl added a comment - Same issue for me. Downgrading Docker engine to 1.11. fixes the problem temporarily.

          Phillip Wirth added a comment -

          Same here...

          derjan https://github.com/docker-java/docker-java/issues/617 is still open...
          However there is also https://github.com/docker/docker/issues/25667 which would fix that specific problem at least

          Also take a look at https://github.com/jenkinsci/docker-plugin/pull/329 which is kinda bad for us now. There you could have specified the API Version. And v1.23 works just fine.

          I reverted that commit and build the plugin - works.

          Maybe there should be an API Version detection too?

          Phillip Wirth added a comment - Same here... derjan https://github.com/docker-java/docker-java/issues/617 is still open... However there is also https://github.com/docker/docker/issues/25667 which would fix that specific problem at least Also take a look at https://github.com/jenkinsci/docker-plugin/pull/329 which is kinda bad for us now. There you could have specified the API Version. And v1.23 works just fine. I reverted that commit and build the plugin - works. Maybe there should be an API Version detection too?

          magnayn added a comment -

          So in the jenkinsci/docker-plugin there is a docker-java-next branch, which targets the changed 3.x docker-java API

          I also have a fork of docker-java (magnayn/docker-java) that contains necessary patches for some parts that I suspect will take a long time to get upstreamed.

          If you want to hack a fix to docker-java, we can include it in the forked repo in lieu of an upstream fix. I also suspect being able to specify the API version as a configuration element would indeed be useful and ought not to have been removed (I have to do this on the commandline for some hosts).

          magnayn added a comment - So in the jenkinsci/docker-plugin there is a docker-java-next branch, which targets the changed 3.x docker-java API I also have a fork of docker-java (magnayn/docker-java) that contains necessary patches for some parts that I suspect will take a long time to get upstreamed. If you want to hack a fix to docker-java, we can include it in the forked repo in lieu of an upstream fix. I also suspect being able to specify the API version as a configuration element would indeed be useful and ought not to have been removed (I have to do this on the commandline for some hosts).

          Phillip Wirth added a comment - - edited

          I made a Pull Request https://github.com/jenkinsci/docker-plugin/pull/418
          well it dosen't build, since the branch I used, your docker-java-nex has this SNAPSHOT dependency ..

          My Testing environment:
          Debian jessie with docker 1.12.0
          Fedora with docker version 1.12.0

          Jenkins was running in docker as well from the image jenkins.

          Phillip Wirth added a comment - - edited I made a Pull Request https://github.com/jenkinsci/docker-plugin/pull/418 well it dosen't build, since the branch I used, your docker-java-nex has this SNAPSHOT dependency .. My Testing environment: Debian jessie with docker 1.12.0 Fedora with docker version 1.12.0 Jenkins was running in docker as well from the image jenkins.

          Phillip Wirth added a comment -

          magnayn Thanks for merging the pull requests an putting them into master

          Phillip Wirth added a comment - magnayn Thanks for merging the pull requests an putting them into master

          Same here under environment:
          Jenkins ver. 2.18
          Docker version 1.12.0, build 8eab29e
          Docker plugin 0.16.1

          I'll downgrade Docker version temporarily...

          Cristian Todea added a comment - Same here under environment: Jenkins ver. 2.18 Docker version 1.12.0, build 8eab29e Docker plugin 0.16.1 I'll downgrade Docker version temporarily...

          Andrey Moor added a comment -

          Is there any progress on this?

          Andrey Moor added a comment - Is there any progress on this?

          Nico Bollen added a comment -

          Seems to be fixed in docker plugin 0.16.2... thanks

          Nico Bollen added a comment - Seems to be fixed in docker plugin 0.16.2... thanks

            magnayn magnayn
            mansm mans matulewicz
            Votes:
            17 Vote for this issue
            Watchers:
            23 Start watching this issue

              Created:
              Updated:
              Resolved: