jenkinsci / docker-plugin

Jenkins cloud plugin that uses Docker
https://plugins.jenkins.io/docker-plugin/
MIT License
489 stars 318 forks source link

docker node offline every two times #915

Open safeYYY opened 2 years ago

safeYYY commented 2 years ago

Jenkins and plugins versions report

Environment ```text Jenkins 2.319.3 docker-plugin 1.2.9 ```

What Operating System are you using (both controller, and any agents involved in the problem)?

centos

Reproduction steps

  1. I created a docker node in "configure Clouds", "Version = 20.10.17, API Version = 1.41" returned after Test Connection every time
  2. I created a pipeline to use this node

Expected Results

everytime works ok

Actual Results

first time run the pipeline success ,but the second time I run it shows that All nodes of label '***‘are offline

log:

first time: java.net.SocketException: Socket closed hudson.remoting.ChannelClosedException: Channel "docker-001904zkzutn1": channel is already closed Stopped container '9f6cd2f575bf3590d130d49b0adf99dad16ac04ae42aa7d588a1b329ce84ab5f' for node 'docker-001904zkzutn1'. Sep 21, 2022 1:06:24 PM INFO io.jenkins.docker.DockerTransientNode$1 println Removed container '9f6cd2f575bf3590d130d49b0adf99dad16ac04ae42aa7d588a1b329ce84ab5f' for node 'docker-001904zkzutn1'.

second time: Status 404: {"message":"No such container: 9f6cd2f575bf3590d130d49b0adf99dad16ac04ae42aa7d588a1b329ce84ab5f"}

Anything else?

No response

safeYYY commented 2 years ago

I hope every time I run the task success,but the actual result is : success, offline, success, offline, success, offline, success, offline, success, offline, ........

song-liang commented 1 year ago

I also encounter such problems. How can I solve them

lessismordaunt commented 2 weeks ago

Which image are you using for these containers?