Elastic agent not starting on boot on official Ubuntu image

I've created a new Elastic Instance in Bamboo, and I've tied it to the official Ubuntu Raring image, but elastic agents are not starting automatically on boot. I have to ssh into the instance and start them manually.

Not sure waht could be the reason for this. I've checked /etc/rc.local, it's executable and contains the bambo startup script:

# Bamboo agent startup

. /opt/bamboo-elastic-agent/etc/rc.local

But it doesn't seem to execute. (Troubleshooted by adding a simple command to /etc/rc.local which prints output to disk, didn't execute at all).

Any help would be more than welcome.


2 answers

1 accepted

This was the issue: /etc/rc.local has -e set in its' shebang (#!/bin/sh -e) meaning that the script exits on first error.

The error happened on this line, since the destination file didn't exist:

sed -i -e s/.*ssh-rsa/ssh-rsa/ -e s/.*ssh-dss/ssh-dss/ /home/ec2-user/.ssh/authorized_keys

Solution was to update this line with an asterisk after /home/ubuntu/.ssh

cp -a /home/ubuntu/.ssh/* /home/ec2-user/.ssh

0 vote

Try using ami-bd9cb5d4 . We'll get it shipped in one of the Bamboo 5.3.x updates.

Suggest an answer

Log in or Join to answer
Community showcase
Renan Battaglin
Published May 18, 2017 in Bamboo

FAQ: How to Upgrade Bamboo Server

Bamboo 5.9 will no longer be supported after June 12, 2017. What does this mean? As part of our End of Life policy, Atlassian supports major versions for two years after the first major iteratio...

1,096 views 0 5
Read article

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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot