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.

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 SystemLocation
    Linux/etc/hosts
    WindowsC:\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.


Last modified on Sep 21, 2022

Was this helpful?

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