jenkinsci / configuration-as-code-plugin

Jenkins Configuration as Code Plugin
https://plugins.jenkins.io/configuration-as-code
MIT License
2.69k stars 718 forks source link

Jenkins Docker agent connection closed after casc reload #1517

Closed janisliepins closed 3 years ago

janisliepins commented 3 years ago

Your checklist for this issue

🚨 Please review the guidelines for contributing to this repository.

Description

Performing CASC reload while running build on dynamically provisioned Docker container agent (defined in Docker Cloud agent template) causes agent to close down connection channel and agent is disconnected:

Cannot contact docker-000rb698gl5tz: hudson.remoting.ChannelClosedException: Channel "unknown": Remote call on JNLP4-connect connection from .... failed. The channel is closing down or has closed down

I suspect that this is because I have defined our existing static agents in nodes: section in jenkins.yml and, still this should not be expected behavior. Although i have to mention that this is not the case for Kubernetes Jenkins agents, their connection is not terminated after casc reload. Also found similar issue with Google Cloud nodes here: #715

What could be possible solution here?

Thank you!

jetersen commented 3 years ago

try updating to the newer docker plugin version at least: https://github.com/jenkinsci/docker-plugin/blob/master/CHANGELOG.md#118

Also this is an issue for the docker plugin as they are responsible for instructing Jenkins in how to maintain access.

janisliepins commented 3 years ago

@jetersen thanks, after docker plugin upgrade everything works ok