Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-60715

Fleet plugin throws java.util.concurrent.CancellationException and overprovisions

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Blocker Blocker
    • ec2-fleet-plugin
    • None
    • jenkins 2.204.1
      ec2-fleet 1.17.1

      Using ec2-fleet plugin with autoscaling group.

      Too often, with no slaves running, a job will get scheduled and invoke the ec2-fleet.  However, the Jenkins logs show the following traceback, and another instance startup will be started.  With this, I'm left with 2 slaves - the one started when the exception was thrown, plus another.  Is wasting money.  How to avoid triggering this exception?  Why is it happening?

      2020-01-09 19:21:14.368+0000 [id=34] SEVERE hudson.slaves.NodeProvisioner#lambda$update$6: Unexpected uncaught exception encountered while processing agent FleetNode-0
      java.util.concurrent.CancellationException: Task was cancelled.
      at com.google.common.util.concurrent.AbstractFuture$Sync.getValue(AbstractFuture.java:295)
      at com.google.common.util.concurrent.AbstractFuture$Sync.get(AbstractFuture.java:276)
      at com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:111)
      at hudson.slaves.NodeProvisioner.lambda$update$6(NodeProvisioner.java:236)
      at hudson.model.Queue._withLock(Queue.java:1392)
      at hudson.model.Queue.withLock(Queue.java:1269)
      at hudson.slaves.NodeProvisioner.update(NodeProvisioner.java:223)
      at hudson.slaves.NodeProvisioner.access$900(NodeProvisioner.java:63)
      at hudson.slaves.NodeProvisioner$NodeProvisionerInvoker.doRun(NodeProvisioner.java:817)
      at hudson.triggers.SafeTimerTask.run(SafeTimerTask.java:70)

      at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
      at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
      at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
      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)
      2020-01-09 19:21:14.369+0000 [id=34] INFO c.a.j.e.NoDelayProvisionStrategy#apply: currentDemand 2 availableCapacity 0 (availableExecutors 0 connectingExecutors 0 plannedCapacitySnapshot 0 additionalPlannedCapacity 0)

            schmutze Chad Schmutzer
            webminster Alan Sparks
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: