Elastic agents remaining on pending state when using a custom Windows AMIs
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Summary
Atlassian doesn't provide support for customized images. Bamboo provides flexibility to use customized machine images, but it's impossible for us to support all individual configurations.
Use Bamboo stock images as the base for all image customizations to ensure a minimal level of consistency of your Elastic Bamboo setup.
All elastic agents that are started using a specific custom Windows AMI remain in a pending state.
Environment
Bamboo using Elastic Agents with custom Windows AMIs
Diagnosis
After starting a new elastic agent, you can see on the Settings > Overview > Instances menu that the agent status remains pending even after a long time and if you access the EC2 instance, you don't see the agent service running on task manager.
Not applicable if the%USERPROFILE%/bamboo-elastic-agent.outfile is being created and you see different startup errors there. This indicates that the agent is not being able to communicate with Bamboo through the SSL tunnel. Please try the steps from the following documentation.
Cause
This might indicate that for some reason the Task Scheduler is not being able to start the agent service along with the EC2 instance.
Solution
The solution will depend on what's preventing the C:\opt\bamboo-elastic-agent\bin\bamboo-elastic-agent.bat executable to get executed by the Task Scheduler. You can access the EC2 instance and go to Start >Windows Administrative Tools > Task Scheduler, select the ElasticBambooAgent task then click on the "history" tab to get more details about the error.
Known problem 1 - A Wrong password is being used by the ElasticBambooAgent task
If you change the password for the OS user account created while going through the steps from Creating a custom elastic image guide after adding the task to the Task Scheduler. In this scenario, the scheduled task added while creating the AMI will still be using the old password and you'll see the following message at the Task Scheduler history log:
1
Additional Data: Error Value: 2147943726
If that's the case all you need to do is:
Go to properties of task
Under the General tab, click on "Change User or Group..."
Enter the username in the field "Enter the object name to select" and hit save
This will ask for Authentication, provide your credentials
Create a new AMI
Was this helpful?