Remote agent fails to connect to Bamboo with javax.naming.CommunicationException: Failed to connect to server
Platform notice: Server and Data Center only. This article only applies to Atlassian products on the server and data center platforms.
Summary
Remote agent is unable to reach the server where Bamboo is running. The <bamboo-agent-home>/atlassian-bamboo-agent.log file shows an error similar to the following pointing to a DNS problem:
javax.naming.CommunicationException: Failed to connect to server my-bamboo.net
Environment
All Bamboo versions.
Diagnosis
The remote agent is unable to resolve Bamboo's Base URL. In the example above the hostname is my-bamboo.net. Try pinging Bamboo's hostname from the server where the agent is installed. For example:
ping my-bamboo.net
Cause
This is likely a DNS problem. If the remote agent cannot reach Bamboo the connection between the agent and Bamboo cannot be established.
Solution
Solution 1
- Update the appropriate DNS records to include the Bamboo Base URL/ address that the remote agent needs to use to connect to Bamboo.
- Restart the remote agent.
Solution 2
Update the hosts file on the server where the remote agent is running:
Operating System Location Linux /etc/hosts Windows C:\Windows\System32\drivers\etc\hosts Ensure the correct IP address and hostname the agent needs to use to connect to Bamboo are added to the file. For example:
<IP address> <hostname> 192.168.1.123 my-bamboo-net
Restart the remote agent.