Windows elastic instance in Bamboo remain in pending state on startup

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.

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

Randomly, Bamboo elastic image startup status remains in Pending state

Cause

When Bamboo starts up a new elastic agent, in some occasions, AWS Elastic IP is not assigned to the Instance before the elastic agents runner start up the elastic agent.

When Bamboo elastic agent runner startup it must first download the elastic agent binaries from Atlassian S3 bucket, and without Elastic IP assigned to the instance, the process will timeout and cause the startup state to remain in Pending.

The error is found in bamboo-elastic-agent.out log file;

JAVA_HOME: C:\opt\javahome 
PATH: C:\opt\jdk-11\bin;C:\opt\git\bin;C:\Windows\system32; ...
HOME: \Users\Bamboo 
openjdk version "11.0.11" 2021-04-20
OpenJDK Runtime Environment AdoptOpenJDK-11.0.11+9 (build 11.0.11+9)
OpenJDK 64-Bit Server VM AdoptOpenJDK-11.0.11+9 (build 11.0.11+9, mixed mode)
Exception in thread "main" java.net.ConnectException: Connection timed out: connect
	at java.base/java.net.PlainSocketImpl.connect0(Native Method)
	at java.base/java.net.Socket.connect(Socket.java:558)


Solution

Force the elastic bamboo startup to sleep for some seconds, to allow AWS assign an elastic IP to the instance

  • Image Configurations → Edit the affected Image, by adding the duration to delay startup using sleep command, eg. sleep 60.

Last modified on Feb 28, 2022

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.