[JIRA] (JENKINS-60258) NullPointerException using EC2-plugin version 1.46.1

7 views
Skip to first unread message

ovidiuc@gmail.com (JIRA)

unread,
Nov 24, 2019, 8:16:03 AM11/24/19
to jenkinsc...@googlegroups.com
ovi craciun created an issue
 
Jenkins / Bug JENKINS-60258
NullPointerException using EC2-plugin version 1.46.1
Issue Type: Bug Bug
Assignee: FABRIZIO MANFREDI
Components: ec2-plugin
Created: 2019-11-24 13:14
Environment: Jenkins ver. 2.190.3 installed on windows server 2016
ec2 plugin version 1.46.1
Priority: Critical Critical
Reporter: ovi craciun

Jenkins log shows this error when it is trying to provision a windows jenkins slave:

SlaveTemplate{ami='ami-0782a9361d328f5fb', labels='windows'}. Attempting to provision slave needed by excess workload of 1 units
Nov 24, 2019 1:10:00 PM SEVERE hudson.triggers.SafeTimerTask runTimer task hudson.slaves.NodeProvisioner$NodeProvisionerInvoker@462f29b7 failed
java.lang.NullPointerException
	at hudson.plugins.ec2.EC2SpotSlave.getSpotRequest(EC2SpotSlave.java:123)
	at hudson.plugins.ec2.EC2Cloud.countCurrentEC2Slaves(EC2Cloud.java:482)
	at hudson.plugins.ec2.EC2Cloud.getPossibleNewSlavesCount(EC2Cloud.java:552)
	at hudson.plugins.ec2.EC2Cloud.getNewOrExistingAvailableSlave(EC2Cloud.java:570)
	at hudson.plugins.ec2.EC2Cloud.provision(EC2Cloud.java:615)
	at hudson.plugins.ec2.NoDelayProvisionerStrategy.apply(NoDelayProvisionerStrategy.java:47)
	at hudson.slaves.NodeProvisioner.update(NodeProvisioner.java:332)
	at hudson.slaves.NodeProvisioner.access$900(NodeProvisioner.java:63)
	at hudson.slaves.NodeProvisioner$NodeProvisionerInvoker.doRun(NodeProvisioner.java:821)
	at hudson.triggers.SafeTimerTask.run(SafeTimerTask.java:72)
	at jenkins.security.ImpersonatingScheduledExecutorService$1.run(ImpersonatingScheduledExecutorService.java:58)
	at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
	at java.util.concurrent.FutureTask.runAndReset(Unknown Source)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(Unknown Source)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)

I tried changing various configuration settings but did not manage to get around this error.

Any clues what can I do?

thank you

 

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo

ovidiuc@gmail.com (JIRA)

unread,
Nov 25, 2019, 3:13:03 PM11/25/19
to jenkinsc...@googlegroups.com
ovi craciun updated an issue
Change By: ovi craciun
Jenkins log shows this error when it is trying to provision a windows jenkins slave:
{code:java}

SlaveTemplate{ami='ami-0782a9361d328f5fb', labels='windows'}. Attempting to provision slave needed by excess workload of 1 units
Nov 24, 2019 1:10:00 PM SEVERE hudson.triggers.SafeTimerTask runTimer task hudson.slaves.NodeProvisioner$NodeProvisionerInvoker@462f29b7 failed
java.lang.NullPointerException
at hudson.plugins.ec2.EC2SpotSlave.getSpotRequest(EC2SpotSlave.java:123)
at hudson.plugins.ec2.EC2Cloud.countCurrentEC2Slaves(EC2Cloud.java:482)
at hudson.plugins.ec2.EC2Cloud.getPossibleNewSlavesCount(EC2Cloud.java:552)
at hudson.plugins.ec2.EC2Cloud.getNewOrExistingAvailableSlave(EC2Cloud.java:570)
at hudson.plugins.ec2.EC2Cloud.provision(EC2Cloud.java:615)
at hudson.plugins.ec2.NoDelayProvisionerStrategy.apply(NoDelayProvisionerStrategy.java:47)
at hudson.slaves.NodeProvisioner.update(NodeProvisioner.java:332)
at hudson.slaves.NodeProvisioner.access$900(NodeProvisioner.java:63)
at hudson.slaves.NodeProvisioner$NodeProvisionerInvoker.doRun(NodeProvisioner.java:821)
at hudson.triggers.SafeTimerTask.run(SafeTimerTask.java:72)
at jenkins.security.ImpersonatingScheduledExecutorService$1.run(ImpersonatingScheduledExecutorService.java:58)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask.runAndReset(Unknown Source)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(Unknown Source)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source){code}

I tried changing various configuration settings but did not manage to get around this error.

Any clues what can I do?

thank you

 

*Later edit:*

After restarting jenkins now, in the logs I can see this error which seems very much related:

{code:java}
Started EC2 alive slaves monitor
Nov 25, 2019 7:55:16 PM SEVERE hudson.init.impl.InstallUncaughtExceptionHandler$DefaultUncaughtExceptionHandler uncaughtException
A thread (EC2 alive slaves monitor thread/202) died unexpectedly due to an uncaught exception, this may leave your Jenkins in a bad way and is usually indicative of a bug in the code. java.lang.NullPointerException at hudson.plugins.ec2.EC2SpotSlave.getSpotRequest(EC2SpotSlave.java:123) at hudson.plugins.ec2.EC2SpotSlave.isSpotRequestDead(EC2SpotSlave.java:144) at hudson.plugins.ec2.EC2SpotSlave.isAlive(EC2SpotSlave.java:60) at hudson.plugins.ec2.EC2SlaveMonitor.removeDeadNodes(EC2SlaveMonitor.java:49) at hudson.plugins.ec2.EC2SlaveMonitor.execute(EC2SlaveMonitor.java:40) at hudson.model.AsyncPeriodicWork$1.run(AsyncPeriodicWork.java:101) at java.lang.Thread.run(Unknown Source)
{code}

ovidiuc@gmail.com (JIRA)

unread,
Nov 25, 2019, 9:22:04 PM11/25/19
to jenkinsc...@googlegroups.com
ovi craciun commented on Bug JENKINS-60258
 
Re: NullPointerException using EC2-plugin version 1.46.1

I had a bunch of other plugins not up to date, I have updated them and now the error is gone. Those other plugins did not seem to be related at all with the EC2 plugin. Anyhow , I am glad I am passed this, but I am facing no a different issue, this one here: https://issues.jenkins-ci.org/browse/JENKINS-34610

ovidiuc@gmail.com (JIRA)

unread,
Nov 25, 2019, 9:33:02 PM11/25/19
to jenkinsc...@googlegroups.com
ovi craciun resolved as Cannot Reproduce
 
Change By: ovi craciun
Status: Open Resolved
Assignee: FABRIZIO MANFREDI ovi craciun
Resolution: Cannot Reproduce
Reply all
Reply to author
Forward
0 new messages