How to configure Bamboo Agents to connect directly to the Bamboo JMS port in a Cluster without using a TCP/RAW Load Balancer
Platform Notice: Data Center - This article applies to Atlassian products on the Data Center platform.
Note that this knowledge base article was created for the Data Center version of the product. Data Center knowledge base articles 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
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.
Environment
- Tested in Bamboo 10.2 and it might work in other Bamboo versions that support clustering
Solution
This can be achieved by updating the Broker Client URL to include multiple nodes instead of the load balancer URL.
- 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
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 URLfailover:(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.
- After updating the Broker Client URL in all the nodes, stop and start all the nodes in the Bamboo Cluster.
- Once the above changes are successful, the agent logs should include log entries, as shown below, indicating the node it has connectedRemote 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