question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Docker plugin creates endless number of container

See original GitHub issue

Hello,

#Docker plugin
0.16.1
#cat /etc/debian_version
8.5
#uname -a
Linux mail 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt25-2+deb8u3 (2016-07-02) x86_64 GNU/Linux
#docker --version
Docker version 1.12.0, build 8eab29e

I notices that the docker plugin is creating an endless number of containers. This leads somewhen to a point, at which my docker daemon is unable to handle containers anymore.

I noticed that the docker plugin produces the following warnings while starting a jenkins build that is running with docker plugin:

Aug 17, 2016 10:39:29 AM INFORMATION com.nirima.jenkins.plugins.docker.DockerCloud provision
Asked to provision 1 slave(s) for: arch-build
Aug 17, 2016 10:39:29 AM INFORMATION com.nirima.jenkins.plugins.docker.DockerCloud provision
Will provision 'nbars/arch-jenkins-slave-docker', for label: 'arch-build', in cloud: 'docker'
Aug 17, 2016 10:39:29 AM INFORMATION com.nirima.jenkins.plugins.docker.DockerCloud addProvisionedSlave
Provisioning 'nbars/arch-jenkins-slave-docker' number '0' on 'docker'; Total containers: '0'
Aug 17, 2016 10:39:29 AM INFORMATION com.nirima.jenkins.plugins.docker.DockerCloud provisionWithWait
Trying to run container for nbars/arch-jenkins-slave-docker
Aug 17, 2016 10:39:29 AM SCHWERWIEGEND com.nirima.jenkins.plugins.docker.DockerCloud$1 call
Error in provisioning; template='DockerTemplate{configVersion=2, labelString='arch-build', launcher=com.nirima.jenkins.plugins.docker.launcher.DockerComputerSSHLauncher@6b483e7d, remoteFsMapping='', remoteFs='/home/jenkins', instanceCap=1, mode=NORMAL, retentionStrategy=com.nirima.jenkins.plugins.docker.strategy.DockerOnceRetentionStrategy@77c5bbab, numExecutors=1, dockerTemplateBase=DockerTemplateBase{image=nbars/arch-jenkins-slave-docker}, removeVolumes=false, pullStrategy=PULL_LATEST}' for cloud='docker'
com.github.dockerjava.api.BadRequestException: {"message":"starting container with HostConfig was deprecated since v1.10 and removed in v1.12"}

    at com.github.dockerjava.jaxrs.filter.ResponseStatusExceptionFilter.filter(ResponseStatusExceptionFilter.java:43)
    at org.glassfish.jersey.client.ClientFilteringStages$ResponseFilterStage.apply(ClientFilteringStages.java:134)
    at org.glassfish.jersey.client.ClientFilteringStages$ResponseFilterStage.apply(ClientFilteringStages.java:123)
    at org.glassfish.jersey.process.internal.Stages.process(Stages.java:171)
    at org.glassfish.jersey.client.ClientRuntime.invoke(ClientRuntime.java:251)
    at org.glassfish.jersey.client.JerseyInvocation$1.call(JerseyInvocation.java:667)
    at org.glassfish.jersey.client.JerseyInvocation$1.call(JerseyInvocation.java:664)
    at org.glassfish.jersey.internal.Errors.process(Errors.java:315)
    at org.glassfish.jersey.internal.Errors.process(Errors.java:297)
    at org.glassfish.jersey.internal.Errors.process(Errors.java:228)
    at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:424)
    at org.glassfish.jersey.client.JerseyInvocation.invoke(JerseyInvocation.java:664)
    at org.glassfish.jersey.client.JerseyInvocation$Builder.method(JerseyInvocation.java:424)
    at org.glassfish.jersey.client.JerseyInvocation$Builder.post(JerseyInvocation.java:333)
    at com.github.dockerjava.jaxrs.StartContainerCmdExec.execute(StartContainerCmdExec.java:28)
    at com.github.dockerjava.jaxrs.StartContainerCmdExec.execute(StartContainerCmdExec.java:13)
    at com.github.dockerjava.jaxrs.AbstrSyncDockerCmdExec.exec(AbstrSyncDockerCmdExec.java:23)
    at com.github.dockerjava.core.command.AbstrDockerCmd.exec(AbstrDockerCmd.java:33)
    at com.github.dockerjava.core.command.StartContainerCmdImpl.exec(StartContainerCmdImpl.java:53)
    at com.nirima.jenkins.plugins.docker.DockerCloud.runContainer(DockerCloud.java:294)
    at com.nirima.jenkins.plugins.docker.DockerCloud.provisionWithWait(DockerCloud.java:372)
    at com.nirima.jenkins.plugins.docker.DockerCloud.access$000(DockerCloud.java:58)
    at com.nirima.jenkins.plugins.docker.DockerCloud$1.call(DockerCloud.java:248)
    at com.nirima.jenkins.plugins.docker.DockerCloud$1.call(DockerCloud.java:245)
    at jenkins.util.ContextResettingExecutorService$2.call(ContextResettingExecutorService.java:46)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:745)

Could it be possible that the docker plugin treads the deprecation warning as an error and thus is thinking that the container creation failed? This error message appear many times and it looks like that the docker plugin is creating a new container every 10 seconds.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
changsijaycommented, Aug 19, 2016

after I remove 1.12 and install 1.11.2 by:

sudo apt-get install docker-engine=1.11.2-0~xenial

it works fine 💃

1reaction
Jochen-A-Fuerbachercommented, Aug 17, 2016

Hello,

AFAIK the current version of the Docker Plugin (0.16.1) doesn’t work with your Docker version (1.12.0). See also: https://issues.jenkins-ci.org/browse/JENKINS-36080

Downgrading Docker to 1.11.0 should resolve this problem.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Runtime options with Memory, CPUs, and GPUs
Docker provides ways to control how much memory, or CPU a container can use, setting runtime configuration flags of the docker run command....
Read more >
fabric8io/docker-maven-plugin
This is a Maven plugin for managing Docker images and containers. ... Containers are created and started with the docker:start goal and ...
Read more >
Docker Plugin Reference 9.0.x - XebiaLabs
The XL Deploy Docker plugin allows you to create containers and connect networks and volumes to them. The plugin uses the docker-py Jython...
Read more >
docker update <container> | Fig
--pids-limit <int>, Tune container pids limit (set -1 for unlimited). --restart <string>, Restart policy to apply when a container exits ...
Read more >
Docker driver - Nomad - HashiCorp Developer
The Docker driver handles downloading containers, mapping ports, ... such as reaping zombie processes, are performed inside the created container.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found