Elastic Agent Stuck in Pending

My elastic bamboo instance is stuck in the pending state and never seems to proceed until it is eventually just shut down.  I'm using the image "Ubuntu: EBS x86_64 (linux) (stock image)" AMI id is ami-5be8f232.  I can start the instance without issues if I don't use a startup script but when I add the following as my startup script it just hangs on the agent startup step.

 

Startup Script:

apt-get install rubygems
gem install compass

 

If started normally I'm able to ssh to the instance and run these commands using sudo without any issues so there should be no issues with the ability to execute these.  I've also tried changing the startup script to include sudo as part of the commands, but that doesn't work either.

 

I've tried connecting to the running instance to check for logs and can't seem to find anything to help me debug the issue.  Where should I be looking for logs?  Also any ideas as to what I might be doing wrong here?

 

1 answer

1 accepted

This widget could not be displayed.

Redirect the output from these to files and see what they're trying to tell you. Also run apt-get with the '-y' switch

 

 

Thanks the -y option solved it for me. To debug it I changed my script to be: apt-get -y install rubygems > /tmp/log.txt gem install compass >> /tmp/log.txt I then ssh'd to the machine to look at the log file as the agent was starting up. Without the -y option it was stuck waiting for a response to a question.

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Tuesday in Jira

What modern development practices are at the heart of how your team delivers software?

Hey Community mates! Claire here from the Software Product Marketing team. We all know software development changes rapidly, and it's often tough to keep up. But from our research, we've found the h...

275 views 1 3
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you