Remote agent fails to connect to Bamboo with javax.naming.CommunicationException: Failed to connect to server

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.

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


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


All Bamboo versions.


The remote agent is unable to resolve Bamboo's Base URL. In the example above the hostname is Try pinging Bamboo's hostname from the server where the agent is installed. For example:



This is likely a DNS problem. If the remote agent cannot reach Bamboo the connection between the agent and Bamboo cannot be established.


Solution 1

  1. Update the appropriate DNS records to include the Bamboo Base URL/ address that the remote agent needs to use to connect to Bamboo.
  2. Restart the remote agent.

Solution 2

  1. Update the hosts file on the server where the remote agent is running:

    Operating SystemLocation
  2. 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>	my-bamboo-net
  3. Restart the remote agent.

Last modified on Sep 21, 2022

Was this helpful?

Provide feedback about this article
Powered by Confluence and Scroll Viewport.