jenkinsci / docker-swarm-plugin

Jenkins plugin which allows to add a Docker Swarm as a cloud agent provider
https://plugins.jenkins.io/docker-swarm/
MIT License
55 stars 47 forks source link

Swarm Agents are not started in 1.10 with Jenkins 2.281 #108

Closed gutschet closed 3 years ago

gutschet commented 3 years ago

Since update to 1.10 my swarm agents are no longer started. I start a job in jenkins and nothing happens, no agent is created. In the logs of jenkins I see the following:

jenkins-ci-tools_jenkins-ci-tools.1.wirlnip0c877@docker-hw3-p    | 2021-02-25 09:52:21.222+0000 [id=332]        WARNING hudson.model.Queue$BuildableItem#enter: QueueListener failed while processing hudson.model.Queue$BuildableItem:hudson.maven.MavenModuleSet@781dab68[TESTJOB]:21
jenkins-ci-tools_jenkins-ci-tools.1.wirlnip0c877@docker-hw3-p    | java.lang.NullPointerException
jenkins-ci-tools_jenkins-ci-tools.1.wirlnip0c877@docker-hw3-p    |      at org.jenkinsci.plugins.docker.swarm.DockerSwarmAgent.<init>(DockerSwarmAgent.java:31)
jenkins-ci-tools_jenkins-ci-tools.1.wirlnip0c877@docker-hw3-p    |      at org.jenkinsci.plugins.docker.swarm.BuildScheduler.scheduleBuild(BuildScheduler.java:27)
jenkins-ci-tools_jenkins-ci-tools.1.wirlnip0c877@docker-hw3-p    |      at org.jenkinsci.plugins.docker.swarm.OneShotProvisionQueueListener.onEnterBuildable(OneShotProvisionQueueListener.java:25)
jenkins-ci-tools_jenkins-ci-tools.1.wirlnip0c877@docker-hw3-p    |      at hudson.model.Queue$BuildableItem.enter(Queue.java:2731)
jenkins-ci-tools_jenkins-ci-tools.1.wirlnip0c877@docker-hw3-p    |      at hudson.model.Queue$BuildableRunnable.run(Queue.java:3033)
jenkins-ci-tools_jenkins-ci-tools.1.wirlnip0c877@docker-hw3-p    |      at hudson.model.Queue.maintain(Queue.java:1563)
jenkins-ci-tools_jenkins-ci-tools.1.wirlnip0c877@docker-hw3-p    |      at hudson.model.Queue$1.call(Queue.java:336)
jenkins-ci-tools_jenkins-ci-tools.1.wirlnip0c877@docker-hw3-p    |      at hudson.model.Queue$1.call(Queue.java:333)
jenkins-ci-tools_jenkins-ci-tools.1.wirlnip0c877@docker-hw3-p    |      at jenkins.util.AtmostOneTaskExecutor$1.call(AtmostOneTaskExecutor.java:108)
jenkins-ci-tools_jenkins-ci-tools.1.wirlnip0c877@docker-hw3-p    |      at jenkins.util.AtmostOneTaskExecutor$1.call(AtmostOneTaskExecutor.java:98)
jenkins-ci-tools_jenkins-ci-tools.1.wirlnip0c877@docker-hw3-p    |      at jenkins.security.ImpersonatingExecutorService$2.call(ImpersonatingExecutorService.java:80)
jenkins-ci-tools_jenkins-ci-tools.1.wirlnip0c877@docker-hw3-p    |      at java.util.concurrent.FutureTask.run(FutureTask.java:266)
jenkins-ci-tools_jenkins-ci-tools.1.wirlnip0c877@docker-hw3-p    |      at hudson.remoting.AtmostOneThreadExecutor$Worker.run(AtmostOneThreadExecutor.java:118)
jenkins-ci-tools_jenkins-ci-tools.1.wirlnip0c877@docker-hw3-p    |      at java.lang.Thread.run(Thread.java:748)
theweblab-gr commented 3 years ago

Same error . I have one more line before the above error ( warning)

WARNING hudson.model.Queue$BuildableItem#enter: QueueListener failed while processing hudson.model.Queue$BuildableItem:ExecutorStepExecution.PlaceholderTask{runId=04.Testing/Test_pipeline#160,label=docker-jenkins-agent-image,context=CpsStepContext[4:node]:Owner[04.Testing/Test_pipeline/160:04.Testing/Test_pipeline#160],cookie=null,auth=testuser}:34

Same situation as Originally posted by @gutschet in https://github.com/jenkinsci/docker-swarm-plugin/issues/107#issuecomment-785786846

gutschet commented 3 years ago

@theweblab-gr right, just formatted my post wrong. I have the same warning above the error, too. Original post updated.

wgillaspy commented 3 years ago

Created https://issues.jenkins.io/browse/JENKINS-64963 for this.

theweblab-gr commented 3 years ago

Created https://issues.jenkins.io/browse/JENKINS-64963 for this.

This occurs also with Jenkins 2.267. My wild guess is that it is a plugin issue

Roemer commented 3 years ago

I suspect this hast to do with #62. I reverted it and published a new release and it seems to work so far.

theweblab-gr commented 3 years ago

it works with 2.281 & 1.11

gutschet commented 3 years ago

Checked 2.281 with plugin 1.11 and works again. Thanks for the quick solution