Bamboo server or remote agent fails to startup due to misconfigured hosts file
要約
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 resolution
診断
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.
原因
Misconfiguration in the hosts file means that Java is unable to resolve the address of the hostname
of the server.
ソリューション
Stop Bamboo
Make sure that your
hosts
file is configured correctly:127.0.0.1 localhost 255.255.255.255 broadcasthost ::1 localhost
- Make 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.