Bamboo Data center elastic Instance is unable to start the elastic agent and remains in pending state
プラットフォームについて: Data Center - この記事は、Data Center プラットフォームのアトラシアン製品に適用されます。
このナレッジベース記事は製品の Data Center バージョン用に作成されています。Data Center 固有ではない機能の Data Center ナレッジベースは、製品のサーバー バージョンでも動作する可能性はありますが、テストは行われていません。サーバー*製品のサポートは 2024 年 2 月 15 日に終了しました。サーバー製品を利用している場合は、アトラシアンのサーバー製品のサポート終了のお知らせページにて移行オプションをご確認ください。
*Fisheye および Crucible は除く
要約
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.
環境
The issue was seen on Bamboo 9.6.2 but the solution will be applicable for other Bamboo versions as well.
診断
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)
原因
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.
-Dbamboo.ec2.agent.endpoint=http://10.100.1.230:8085/agentServer
ソリューション
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.