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

While setting up EC2 Instance for Elastic agent does not start

William Flow March 17, 2023

Ok so I am setting up an EC2 instance to be a Elastic agent I setup everything as per instructions then reboot the box and the it does not start, I am under the impression that the first time it runs it downloads file etc then you run a prep script and create your AMI 

 

I get this error:

 

[root@ip-10-245-163-211 bamboo]# sudo systemctl status rc.local.service
● rc.local.service - /etc/systemd/system/rc.local Compatablity
Loaded: loaded (/etc/systemd/system/rc.local.service; enabled; vendor preset: disabled)
Active: active (exited) since Fri 2023-03-17 19:15:03 UTC; 7min ago
Tasks: 0 (limit: 99637)
Memory: 0B
CGroup: /system.slice/rc.local.service

Mar 17 19:15:02 ip-10-245-163-211.us-west-2.compute.internal systemd[1]: Starting /etc/systemd/system/rc.local Compatablity...
Mar 17 19:15:02 ip-10-245-163-211.us-west-2.compute.internal rc.local[792]: Fri Mar 17 19:15:02 UTC 2023 - Started execution of Bamboo instance startup scripts, uptime: up 0 minutes
Mar 17 19:15:02 ip-10-245-163-211.us-west-2.compute.internal rc.local[799]: Fri Mar 17 19:15:02 UTC 2023 - Testing if instance has been started from Bamboo...
Mar 17 19:15:03 ip-10-245-163-211.us-west-2.compute.internal rc.local[853]: Fri Mar 17 19:15:03 UTC 2023 - This instance has not been started by Bamboo. The agent will not be started.
Mar 17 19:15:03 ip-10-245-163-211.us-west-2.compute.internal systemd[1]: Started /etc/systemd/system/rc.local Compatablity.
Mar 17 19:21:47 ip-10-245-163-211.us-west-2.compute.internal systemd[1]: /etc/systemd/system/rc.local.service:9: Unknown lvalue 'StanardOutput' in section 'Service'
Mar 17 19:21:47 ip-10-245-163-211.us-west-2.compute.internal systemd[1]: /etc/systemd/system/rc.local.service:11: Support for option SysVStartPriority= has been removed and it is ignored
Mar 17 19:22:44 ip-10-245-163-211.us-west-2.compute.internal systemd[1]: /etc/systemd/system/rc.local.service:9: Unknown lvalue 'StanardOutput' in section 'Service'
Mar 17 19:22:44 ip-10-245-163-211.us-west-2.compute.internal systemd[1]: /etc/systemd/system/rc.local.service:11: Support for option SysVStartPriority= has been removed and it is ignored

1 answer

1 accepted

1 vote
Answer accepted
Eduardo Alvarenga
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 18, 2023

Hello @William Flow

Once your Elastic Instance is started, the Agent will validate the EC2 instance's metadata looking for indicators that it's been initialised by Bamboo. As you are starting the instance outside of that scope, the Agent refuses to start.

Mar 17 19:15:02 ip-10-245-163-211.us-west-2.compute.internal rc.local[799]: Fri Mar 17 19:15:02 UTC 2023 - Testing if instance has been started from Bamboo...
Mar 17 19:15:03 ip-10-245-163-211.us-west-2.compute.internal rc.local[853]: Fri Mar 17 19:15:03 UTC 2023 - This instance has not been started by Bamboo. The agent will not be started.

If it passes, it will then start the Tunnel listener, which will wait for a connection from the Server. Then the server will connect to the Agent and call the bootstrap process by downloading extra files from the Atlassian S3 buckets and the Bamboo Server via the tunnel.

Kind regards,

Eduardo Alvarenga
Atlassian Support APAC

--please don't forget to Accept the answer if the reply is helpful-- 

William Flow March 20, 2023

I understand that I am not sure why it did not start it does a reboot and and I setup systemd so it should just start

Eduardo Alvarenga
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 20, 2023

Hello @William Flow

The Bamboo Elastic Agent will refuse to start if its EC2 instance wasn't started by the Bamboo application. Are you starting the instance through the Bamboo interface by following Administration >> Elastic Bamboo (Instances) >> Start New Elastic Instances?

Thanks,

Eduardo Alvarenga
Atlassian Support APAC

--please don't forget to Accept the answer if the reply is helpful-- 

Like Steffen Opel _Utoolity_ likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events