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.
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}
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