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.

Plugin stopped working after updating Jenkins to 2.235 - using a specific task definition

See original GitHub issue

Hello,

I have used this great plugin for few months, and after upgrading today Jenkins to 2.235 (changelog), the plugin stopped working when I am specifying a specific task definition (this is not the first time that I am trying to launch an agent using this task definition). If I am not specifying any task definition, then the agent will be launched without any problems.

Log:

Asked to provision 1 agent(s) for: image-builder
May 07, 2020 8:07:13 AM INFO com.cloudbees.jenkins.plugins.amazonecs.ECSCloud provision
Will provision ecs-cloud-image-builder-88s7f, for label: image-builder
May 07, 2020 8:07:23 AM WARNING com.cloudbees.jenkins.plugins.amazonecs.ECSLauncher launch
[ecs-cloud-image-builder-88s7f]: Error in provisioning; agent=com.cloudbees.jenkins.plugins.amazonecs.ECSSlave[ecs-cloud-image-builder-88s7f]
java.lang.NullPointerException
	at com.cloudbees.jenkins.plugins.amazonecs.ECSService.findTaskDefinition(ECSService.java:306)
	at com.cloudbees.jenkins.plugins.amazonecs.ECSLauncher.getTaskDefinition(ECSLauncher.java:210)
	at com.cloudbees.jenkins.plugins.amazonecs.ECSLauncher.launch(ECSLauncher.java:107)
	at hudson.slaves.SlaveComputer.lambda$_connect$0(SlaveComputer.java:296)
	at jenkins.util.ContextResettingExecutorService$2.call(ContextResettingExecutorService.java:46)
	at jenkins.security.ImpersonatingExecutorService$2.call(ImpersonatingExecutorService.java:71)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)

May 07, 2020 8:07:23 AM INFO hudson.slaves.NodeProvisioner lambda$update$6
ecs-cloud-image-builder-88s7f provisioning successfully completed. We have now 5 computer(s)
May 07, 2020 8:07:33 AM INFO com.cloudbees.jenkins.plugins.amazonecs.ECSCloud provision
Asked to provision 1 agent(s) for: image-builder
May 07, 2020 8:07:33 AM INFO com.cloudbees.jenkins.plugins.amazonecs.ECSCloud provision
Will provision ecs-cloud-image-builder-4zmpm, for label: image-builder
May 07, 2020 8:07:43 AM WARNING com.cloudbees.jenkins.plugins.amazonecs.ECSLauncher launch
[ecs-cloud-image-builder-4zmpm]: Error in provisioning; agent=com.cloudbees.jenkins.plugins.amazonecs.ECSSlave[ecs-cloud-image-builder-4zmpm]
java.lang.NullPointerException
	at com.cloudbees.jenkins.plugins.amazonecs.ECSService.findTaskDefinition(ECSService.java:306)
	at com.cloudbees.jenkins.plugins.amazonecs.ECSLauncher.getTaskDefinition(ECSLauncher.java:210)
	at com.cloudbees.jenkins.plugins.amazonecs.ECSLauncher.launch(ECSLauncher.java:107)
	at hudson.slaves.SlaveComputer.lambda$_connect$0(SlaveComputer.java:296)
	at jenkins.util.ContextResettingExecutorService$2.call(ContextResettingExecutorService.java:46)
	at jenkins.security.ImpersonatingExecutorService$2.call(ImpersonatingExecutorService.java:71)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)

Jenkins is trying to launch the agent again and again, but it keeps failing.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
CpuIDcommented, May 14, 2020

@amiryeshooroon thx, yea we ended up deleting all of our cloud templates and just regenerated them (programmatically). We didn’t have to kick off a job in between luckily.

For maintainers: I still think this deserves to be reopened.

0reactions
amiryeshuruncommented, May 14, 2020

We just hit this issue also 😦 @amiryeshooroon can you advise on exactly what you removed, and readded? Did you have to do this for every single job?

We use a task definition override for every single job we run, as we have lang/version targeted task definitions (for smaller agent images) in place. Would this imply we have to remove the override from every task template defined, then execute every single job once, then re-add?

For each cloud agent (label) you have, try to:

  • remove the task definition override
  • build a job that uses this label
  • put back the task definition (same one)
  • build again

That fixed the problem for me.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Windows agents fail to start on version 2.235.5
I am trying to connect a windows slave (windows 10 pro) to a windows master (windows server 2019) on jenkins and I always...
Read more >
LTS Changelog - Jenkins
If a job definition, Pipeline definition, or tool installer reference must ... some plugin updates can be unavailable even on the latest version...
Read more >
[JENKINS-63240] Configuration is gone after latest upgrade
After finishing starting up, I had no jobs any more, the configuration seemed to be completely gone. Previously installed plugins were no longer...
Read more >
Upgrading to Jenkins LTS 2.303.x
To work around this bug and load both bundled and custom rules, run the following script in the script console after submitting rules...
Read more >
"Run as Specific User" does not work with Pipeline Jobs
When using a Jenkins Pipeline job and "Configure Build Authorization" is enabled to "Run as Specific Use" and a valid user is filled...
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