Technical Overview of Remote Agent Connectivity Mechanism
The traffic between agent and server is bi-directional, however initial connections are only sent from agent to server. Responses are sent from server to agent.
The server has 2 urls / ports to connect with a remote agent.
- bamboo base url, usually http(s)://<host>:8085/<bamboo-app-context>
- bamboo broker url, usually tcp://<host>:54663 if not defined otherwise
Both ports need to be open in the firewall. The direction of the initial connection is from agent to server.
To establish connections to the server the remote agent selects 2 available local ports, one for each connection.
Diagnosing Remote Agent Connectivity
This tool will attempt to simulate remote agent connectivity and ensure that your network is configured correctly, such that the remote agent is able to contact the server. To run the tool:
- Download the NetworkAnalyser class file, to the remote agent machine.
- Execute the following command:
Troubleshooting remote agent connectivity problems
This section will give you tips on troubleshooting the most common connectivity problems with remote agents
Remote Agent Registration
A good way to start troubleshooting is to enable debug logging for the agent - server communication:
- Stop bamboo
- copy the attached log4j.properties file into <bamboo-install>/webapp/WEB-INF/classes
- restart bamboo and restart the remote agent
After restart useful debug traces are produced that show the agent-server communication in detail. Please use these logs to support your inquiries with Atlassian Support.
Network Timeouts
If your agent is dropping out due to errors similar to:
Firewall/Router
Ensure that you don't have a firewall/router which might be closing network connections due to inactivity.
Low Network Throughput
The error can also occur, whilst sending large messages over slow network link:
This problem arises because the ActiveMQ message broker continuously checks for activity on a socket, and whilst building a large message in the TCP socket buffer, the inactivity monitor will time out
As the document suggests, edit your <Bamboo-Home>/bamboo.cfg.xml file to figure out and edit the following section:
setting the maxInactivityDuration=300000 value to a greater number or 0 to disable it all together.