Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

An elastic agent is loading on instance pending for 21 hrs

Ajay Kumar November 30, 2016

hi,

I am pretty new for Bamboo, I am trying to run ant scripts in the plan, I noticed that an elastic agent is required to run the plan. Later I went and started loading Elastic Agent on Elastic Instance. However the status is just showing Pending for more than 21 hrs. 

How do I resolve this issue?

 

Regards,

Ajay

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
rsperafico
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 30, 2016

Hello Ajay,

Could you please review the Automatic Elastic Instance Management feature as there might be a misconfiguration where the amount of builds to be executed havent been reached and due to that the agent will not be started.

Choose from the following elastic instance management presets. Each of these presets define values for the five criteria described in the 'Custom' user-defined options (below). (Bear in mind that both the 'Aggressive' and 'Passive' presets have trade-offs.)

  • Default — Balances build queue clearance rates with elastic instance usage costs.
  • Aggressive — Favors higher build queue clearance rates but with higher elastic instance usage costs.
  • Passive — Favors lower instance usage costs but with lower build queue clearance rates.
  • Custom — Choose your own settings, as described below.
  • Disabled — Disables Bamboo's automatic elastic instance management feature.
 Idle Agent Shutdown DelaySpecify the number of minutes that an elastic agent must be idle before Bamboo shuts down the elastic instance running that agent.
information Elastic instances running in the Amazon EC2 compute cloud are charged in hourly blocks from the time they are started. To maximize usage of elastic instances in a cost-effective manner, Bamboo only performs these checks just prior to the expiry of each hourly block.
Allowed non-Bamboo instancesThe maximum number of elastic instances allowed on your AWS account that are not controlled by this Bamboo instance. When this limit is exceeded, Bamboo will not start any new instances.
Maximum Number of Instances to Start at OnceThe maximum number of elastic instances that Bamboo can start in one go. Bamboo only starts this maximum number of elastic instances on a 'per minute' basis.
Number of Builds in Queue ThresholdThe total number of builds in a queue. When this and all other thresholds have been reached, new elastic instances will be started.
Number of Elastic Builds in Queue ThresholdThe number of builds in the queue that can be executed on elastic instances. When this and all other thresholds have been reached, new elastic instances will be started.
Average Queue Time ThresholdThe average number of minutes that job builds have been waiting in a queue. When this and all other thresholds have been reached, new elastic instances will be started.

Kind regards,
Rafael P. Sperafico

 

Ajay Kumar November 30, 2016

Hi Rafael,

Thanks for your inputs. I have all the configurations in place as you can see in the screenshot below.

 

issue.png

 

Am I missing anything here?

 

Regards,

Ajay

rsperafico
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 30, 2016

Hello Ajay,

How many builds have you queued?

Please, have a look at:

Number of Builds in Queue ThresholdThe total number of builds in a queue. When this and all other thresholds have been reached, new elastic instances will be started.
Number of Elastic Builds in Queue ThresholdThe number of builds in the queue that can be executed on elastic instances. When this and all other thresholds have been reached, new elastic instances will be started.

Try to set both to 1 and try to trigger a new build against an elastic agent.

Kind regards,
Rafael P. Sperafico

Ajay Kumar November 30, 2016

elastic.png

Same issue, after changing as you suggested:(

rsperafico
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 30, 2016

Hello Ajay,

Based on the latest screenshot, you are attempting on running the following stock image in Bamboo v5.14.1:

image.US_EAST_1.EBS.x86_64.windows.HVM.Windows=ami-9d1dddf0

And this image is still loading as per:

Dec 1, 2016 2:29:52 AM Requested that new elastic instance be created for configuration; Windows stock image / ami-9d1dddf0
Dec 1, 2016 2:29:53 AM Elastic instance [i-0eab95ab959bbb13] transitioned from STARTING to IDENTIFIED.
Dec 1, 2016 2:30:33 AM Elastic instance [i-0eab95ab959bbb13] transitioned from IDENTIFIED to RUNNING.

Please notice from above, less than 1min is not enough to start up the elastic agent, due to I would suggest you to wait a little longer.

Here is my example:

Dec 1, 2016 1:47:56 AM Requested that new elastic instance be created for configuration: Windows stock image / ami-9d1dddf0
Dec 1, 2016 1:47:57 AM Elastic instance [i-265b84be] transitioned from STARTING to IDENTIFIED.
Dec 1, 2016 1:48:38 AM Elastic instance [i-265b84be] transitioned from IDENTIFIED to RUNNING.
Dec 1, 2016 1:56:09 AM An elastic agent is loading on instance: [i-265b84be]
Dec 1, 2016 1:56:59 AM Elastic Agent "Elastic Agent on i-265b84be" started on instance i-265b84be

As you can notice, the Elastic Agent took almost 9min to be up in my example, however this timing can vary.

And this was the configuration for Automatic Elastic Instance Management

image2016-12-1 2:7:50.png

Which gives the following after hitting the Save changes button:

image2016-12-1 2:8:53.png

In case you continue on experiencing issues, I would suggest you on raising a Support Request from Bamboo administration >> System >> Support Tools >> Get Help tab

Kind regards,
Rafael P. Sperafico

Ajay Kumar December 1, 2016

Thanks Rafael,

I am trying to create a support ticket, and it asking me to setup email. However, it is giving me an error after entering all the details.

The mail settings you entered were not valid. Error thrown was: javax.mail.MessagingException: Exception reading response; nested exception is: java.net.SocketTimeoutException: Read timed out

 

Any inputs please?

rsperafico
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 1, 2016

Have you followed the Configuring Bamboo to send SMTP Email making sure:

  1. Make sure that the javax.mail-X.X.X.jar file exists only in <Bamboo-Install>/lib.

  • If the javax.mail-X.X.X.jar file doesn't exist in the <Bamboo-Install>/lib directory, you must move the javaxfile installed at <Bamboo-Install>/atlassian-bamboo/WEB-INF/lib to <Bamboo-Install>/lib.
  • If the javax.mail-X.X.X.jar file already exists in the <Bamboo-Install>/lib directory, simply delete the javax file shipped with Bamboo in <Bamboo-Install>/atlassian-bamboo/WEB-INF/lib.

Alternatively, you can raise a support request from https://support.atlassian.com/customer/servicedesk-portal#Dev%20Tools

rsperafico
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 1, 2016

Hello Ajay,

Since you are running Bamboo on Amazon, do you have the STMP port number used open?

This might also be related to the issue with Remote Agent not becoming available.

Kind regards,
Rafael P. Sperafico

ekuzniewski January 25, 2017

@Ajay Kumar, did you are able to fix your environment? What did you do? Thanks!

TAGS
AUG Leaders

Atlassian Community Events