Bamboo server or remote agent fails to startup due to misconfigured hosts file
Platform Notice: Data Center Only - This article only applies to Atlassian apps 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
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
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 resolutionDiagnosis
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
Stop Bamboo
Make sure that your
hostsfile is configured correctly:127.0.0.1 localhost 255.255.255.255 broadcasthost ::1 localhostMake sure there is no firewall blocking Bamboo.
Try to ping the myhostname (whatever Bamboo complains about in the above error). Bamboo should be able to resolve that hostname.
Once the server hosting Bamboo can resolve the name, you can start Bamboo.
Was this helpful?