How to configure Bamboo Agents to connect directly to the Bamboo JMS port in a Cluster without using a TCP/RAW Load Balancer

プラットフォームについて: Data Center - この記事は、Data Center プラットフォームのアトラシアン製品に適用されます。

このナレッジベース記事は製品の Data Center バージョン用に作成されています。Data Center 固有ではない機能の Data Center ナレッジベースは、製品のサーバー バージョンでも動作する可能性はありますが、テストは行われていません。サーバー*製品のサポートは 2024 年 2 月 15 日に終了しました。サーバー製品を利用している場合は、アトラシアンのサーバー製品のサポート終了のお知らせページにて移行オプションをご確認ください。

*Fisheye および Crucible は除く

要約

Bamboo uses two main protocols for communication between the Data Center and Agents. 

  • HTTP is used for initial registration and bootstrapping of Agent,
  • TCP operates over separate unicast connections for JMS, which handles other communications such as job dispatching and heartbeat messages.

When Bamboo is configured as a multi-node cluster, the load balancer is expected to route the traffic for both HTTP and TCP protocols to ensure seamless communication between the Data Center and Agents. However, some load balancers do not support the TCP protocol and may not be replaceable due to factors like organisational restrictions or dependencies on a specific load balancer. In such cases, this knowledge base article provides guidance on configuring the Broker Client URL to automatically route traffic to the active node by bypassing the load balancer.

環境

  • Tested in Bamboo 10.2 and it might work in other Bamboo versions that support clustering

ソリューション

This can be achieved by updating the Broker Client URL to include multiple nodes instead of the load balancer URL.

  1. If Bamboo was installed by following the instructions in the Start the first cluster node installation, the Broker Client URL would have been configured as follows::
    Default Broker Client URL
    failover:(ssl://<tcp-load-balancer-url>:54663?socket.verifyHostName=false&wireFormat.maxInactivityDuration=90000)?initialReconnectDelay=15000&maxReconnectAttempts=10
  2. Update the Broker Client URL according to the number of nodes in your cluster. For example, if there are 3 nodes in the cluster, modify the bamboo.jms.broker.client.uri property in the <bamboo-home>/bamboo.cfg.xml file on all nodes within the cluster as shown below. If changes are made via Administration → Overview → General Configuration, they will only be effective for the active node. 

    New Broker Client URL
    failover:(ssl://<node1-ip-or-hostname>:54663,ssl://<node2-ip-or-hostname>:54663,ssl://<node3-ip-or-hostname>:54663)?initialReconnectDelay=15000&maxReconnectAttempts=10&nested.socket.verifyHostName=false&nested.wireFormat.maxInactivityDuration=300000&randomize=false

    For Bamboo Agents to communicate properly with Bamboo Data Center nodes, they must be able to connect over the specified TCP ports directly. If access is restricted, adjustments to firewall or network settings may be necessary to enable this connection.


  3. After updating the Broker Client URL in all the nodes, stop and start all the nodes in the Bamboo Cluster. 
  4. Once the above changes are successful, the agent logs should include log entries, as shown below, indicating the node it has connected
    Remote Agent Logs
    2025-03-13 17:49:32,440 INFO [AgentRunnerThread] [BambooActiveMQConnectionFactory] Setting broker URL to 'failover:(ssl://<node1-ip-or-hostname>:54663,ssl://<node2-ip-or-hostname>:54663,ssl://<node3-ip-or-hostname>:54663) initialReconnectDelay=15000&maxReconnectAttempts=10&nested.socket.verifyHostName=false&nested.wireFormat.maxInactivityDuration=300000&randomize=false'
    2025-03-13 17:49:32,871 WARN [AgentRunnerThread] [BambooActiveMQConnectionFactory] Broker URI: ssl://<node1-ip-or-hostname>:54663 is invalid: java.net.SocketException: Network is unreachable
    2025-03-13 17:49:33,189 INFO [AgentRunnerThread] [BambooActiveMQConnectionFactory] Broker URI: ssl://<node2-ip-or-hostname>:54663 is valid.
    2025-03-13 17:49:34,472 WARN [AgentRunnerThread] [BambooActiveMQConnectionFactory] Broker URI: ssl://<node3-ip-or-hostname>:54663 is invalid: java.net.SocketException: Network is unreachable



Last modified on Mar 19, 2025

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.