Uploaded image for project: 'Bamboo'
  1. Bamboo
  2. BAM-16109

Bamboo Failed to start elastic instances: Error when starting a new instance

    XMLWordPrintable

Details

    Description

      When starting a new instance Bamboo displays the message:
      Failed to start elastic instances: Error when starting a new instance

      Cause:
      Bamboo no longer automatically creates key pair.

      The following error appears in the log:

      2015-07-02 10:28:49.679017500 2015-07-02 10:28:49,678 INFO [scheduler_Worker-2] [ElasticRunningInstancesOptimizerImpl] AWS account has 0 elastic instances started by Bamboo server(s) and has 0 spot requests pending, 0 in total. Of these, Bamboo controls 0.
      2015-07-02 10:28:50.102443500 2015-07-02 10:28:50,102 ERROR [scheduler_Worker-2] [ElasticInstancesMonitorJob] Failed to adjust the number of elastic agents.
      2015-07-02 10:28:50.102445500 com.atlassian.aws.AWSException: Error when starting a new instance
      2015-07-02 10:28:50.102445500 	at com.atlassian.bamboo.agent.elastic.server.ElasticFunctionalityFacadeImpl.startupAgents(ElasticFunctionalityFacadeImpl.java:218)
      2015-07-02 10:28:50.102446500 	at com.atlassian.bamboo.agent.elastic.schedule.ElasticInstancesMonitorJob.execute(ElasticInstancesMonitorJob.java:50)
      2015-07-02 10:28:50.102452500 	at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
      2015-07-02 10:28:50.102452500 	at com.atlassian.bamboo.utils.BambooRunnables$1.run(BambooRunnables.java:49)
      2015-07-02 10:28:50.102453500 	at com.atlassian.bamboo.security.ImpersonationHelper.runWith(ImpersonationHelper.java:31)
      2015-07-02 10:28:50.102453500 	at com.atlassian.bamboo.security.ImpersonationHelper.runWithSystemAuthority(ImpersonationHelper.java:20)
      2015-07-02 10:28:50.102454500 	at com.atlassian.bamboo.security.ImpersonationHelper$1.run(ImpersonationHelper.java:52)
      2015-07-02 10:28:50.102455500 	at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:525)
      2015-07-02 10:28:50.102455500 Caused by: com.amazonaws.AmazonServiceException: The key pair 'elasticbamboo' does not exist (Service: AmazonEC2; Status Code: 400; Error Code: InvalidKeyPair.NotFound; Request ID: 662XXXX-1a90-XXXX-b2fe-565XXXXXXba)
      2015-07-02 10:28:50.102458500 	at com.amazonaws.http.AmazonHttpClient.handleErrorResponse(AmazonHttpClient.java:1077)
      2015-07-02 10:28:50.102459500 	at com.amazonaws.http.AmazonHttpClient.executeOneRequest(AmazonHttpClient.java:725)
      2015-07-02 10:28:50.102459500 	at com.amazonaws.http.AmazonHttpClient.executeHelper(AmazonHttpClient.java:460)
      2015-07-02 10:28:50.102461500 	at com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:295)
      

      Workaround:
      Manually create the keypair with name "elasticbamboo" in the AWS console for the region that your elastic instances are configured to start up in. Keep the private key file as Bamboo won't have it on server side.
      Obtaining AWS Key Pair to access Amazon Elastic Instances
      More info on Amazon EC2 Key Pairs

      Update:
      A fix is in testing stage and should be released soon to Bamboo Cloud.

      Attachments

        Issue Links

          Activity

            People

              pbruski Przemek Bruski
              mfahd Fahd
              Votes:
              4 Vote for this issue
              Watchers:
              19 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: