Bamboo server or remote agent fails to startup due to misconfigured hosts file

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

The Bamboo fails to start and shows the following error in the $BAMBOO_HOME/logs/atlassian-bamboo.log

1 2 3 4 5 6 7 8 9 10 2017-11-07 11:59:24,393 WARN [localhost-startStop-1] [InetAddressBean] Cannot determine local host name; using "localhost". java.net.UnknownHostException: myhostname: myhostname: Name or service not known at java.net.InetAddress.getLocalHost(InetAddress.java:1505) at com.atlassian.bamboo.configuration.InetAddressBean.getLocalCanonicalHostName(InetAddressBean.java:40) at com.atlassian.bamboo.setup.DefaultBootstrapManager.<clinit>(DefaultBootstrapManager.java:54) ... Caused by: java.net.UnknownHostException: myhostname: Name or service not known at java.net.Inet4AddressImpl.lookupAllHostAddr(Native Method) at java.net.InetAddress$2.lookupAllHostAddr(InetAddress.java:928) ...

Or the Bamboo Remote Agent may fail to start and shows the following error in the $BAMBOO_AGENT_HOME/atlassian-bamboo-agent.log

1 2 INFO | jvm 3 | 2023/01/11 20:13:16 | 2023-01-11 20:13:16,144 WARN [AgentRunnerThread] [InetAddressBean] Cannot determine local host name; using "null". INFO | jvm 3 | 2023/01/11 20:13:16 | java.net.UnknownHostException: ip-XX-XX-X-XX: ip-XX-XX-X-XX: Temporary failure in name resolution

Diagnosis

Check the $BAMBOO_HOME/logs/atlassian-bamboo.log (Bamboo Server) or $BAMBOO_AGENT_HOME/atlassian-bamboo-agent.log (Bamboo Remote Agent) for name resolution errors described above coming from the threads localhost-startStop-1 or AgentRunnerThread during startup.

Cause

Misconfiguration in the hosts file means that Java is unable to resolve the address of the hostname of the server.

Solution

  1. Stop Bamboo

  2. Make sure that your hosts file is configured correctly:

    1 2 3 127.0.0.1 localhost 255.255.255.255 broadcasthost ::1 localhost
  3. Make sure there is no firewall blocking Bamboo.

  4. Try to ping the myhostname (whatever Bamboo complains about in the above error). Bamboo should be able to resolve that hostname.

  5. Once the server hosting Bamboo can resolve the name, you can start Bamboo.

Updated on March 21, 2025

Still need help?

The Atlassian Community is here for you.