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

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs 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

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

  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 System

Location

Linux

/etc/hosts

Windows

C:\Windows\System32\drivers\etc\hosts

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> 192.168.1.123 my-bamboo-net

3. Restart the remote agent.

Updated on June 30, 2025

Still need help?

The Atlassian Community is here for you.