Bamboo Data center elastic Instance is unable to start the elastic agent and remains in pending state

Still need help?

The Atlassian Community is here for you.

Ask the community

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

This article covers a scenario where Bamboo elastic agent is unable to start the Elastic agent process and remains in pending state. The problem is related to incorrect -Dbamboo.ec2.agent.endpoint used in system properties. 

Environment

The issue was seen on Bamboo 9.6.2 but the solution will be applicable for other Bamboo versions as well. 

Diagnosis

Looking at atlassian-bamboo.log file on the Bamboo server we can the below info message and there are no errors. 

INFO [http-nio-8085-exec-20 url: /agentServer/agentServer/GetFingerprint.action] [RemoteAgentManagerImpl] An elastic agent is loading on 10.10.1.511 (10.10.2.690).
INFO [http-nio-8085-exec-20 url: /agentServer/agentServer/GetFingerprint.action] [ElasticFunctionalityFacadeImpl] An elastic agent is loading on instance: [i-0cff5f655952f7106188a4]

Looking at bamboo-elastic-agent.out file we can see the error > Response: [HTTP/1.1 404 ] received after manifest retrieval request.

Just before the manifest retrieval on the Elastic agent we can see the below message, please make note of tunnel URL, it contains /agentServer/agentServer twice which is incorrect. 

INFO [WrapperSimpleAppMain] [ClasspathBuilder] Syncing C:\Users\Bamboo\bamboo-agent-home with httpt://127.0.0.1:46593/agentServer/agentServer/bootstrap/classpath/manifest
INFO   | jvm 3    | 2024/05/28 13:58:10 | 2024-05-28 13:58:10,867 ERROR [WrapperSimpleAppMain] [ClasspathBuilder] An error has occurred when retrieving classpath data: HTTP/1.1 404 
INFO   | jvm 3    | 2024/05/28 13:58:10 | Exiting due to fatal exception.
INFO   | jvm 3    | 2024/05/28 13:58:10 | com.atlassian.bamboo.agent.bootstrap.RemoteAgentHttpException: Response: [HTTP/1.1 404 ] received after manifest retrieval request.
INFO   | jvm 3    | 2024/05/28 13:58:10 | 	at com.atlassian.bamboo.agent.bootstrap.ClasspathBuilder.terminateWithError(ClasspathBuilder.java:228)


Cause

If we look at setenv.sh file for Linux below ( refer attached for Windows ) we can see -Dbamboo.ec2.agent.endpoint used which is incorrect, there is no requirement to add agentServer to the endpoint, please refer Elastic agents remain in Pending and do not connect to understand what should be the correct endpoint.  

Incorrect endpoint
-Dbamboo.ec2.agent.endpoint=http://10.100.1.230:8085/agentServer

Solution

Please correct the -Dbamboo.ec2.agent.endpoint as per the above article attached and restart the Bamboo server and then try to start the Elastic agent. 


Last modified on Aug 21, 2024

Was this helpful?

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