UnknownHostException for AWS private host results in startup failure

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

Problem

Bamboo will not start due to UnknownHostException for the AWS private hostname. An error like below can be found in the <bamboo-home>/logs/atlassian-bamboo.log:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 2016-02-05 16:34:50,686 FATAL [finishsetupBackgroundThread] [BambooContainer] Cannot start bamboo java.lang.RuntimeException: java.net.UnknownHostException: ip-10-1-0-112: ip-10-1-0-112: unknown error at com.atlassian.security.auth.trustedapps.UIDGenerator.generateUID(UIDGenerator.java:71) at com.atlassian.security.auth.trustedapps.BaseEncryptionProvider.generateUID(BaseEncryptionProvider.java:18) at com.atlassian.bamboo.container.startup.InitialiseTrustedAppsOnStartup.run(InitialiseTrustedAppsOnStartup.java:41) at com.atlassian.bamboo.container.BambooContainer.start(BambooContainer.java:252) at com.atlassian.bamboo.upgrade.UpgradeLauncher.upgradeAndStartBamboo(UpgradeLauncher.java:153) at com.atlassian.bamboo.ww2.actions.setup.FinishSetupAction.execute(FinishSetupAction.java:44) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:450) at com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:289) at org.apache.struts2.interceptor.BackgroundProcess$1.run(BackgroundProcess.java:57) at java.lang.Thread.run(Thread.java:745) Caused by: java.net.UnknownHostException: ip-10-1-0-112: ip-10-1-0-112: unknown error at java.net.InetAddress.getLocalHost(InetAddress.java:1505) at com.atlassian.security.auth.trustedapps.UIDGenerator.generateUID(UIDGenerator.java:25) ... 13 more Caused by: java.net.UnknownHostException: ip-10-1-0-112: unknown error at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method) at java.net.InetAddress$2.lookupAllHostAddr(InetAddress.java:928) at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1323) at java.net.InetAddress.getLocalHost(InetAddress.java:1500) ... 14 more

Cause

/etc/hosts file is misconfigured missing the private IP for localhost:

1 127.0.0.1 localhost localhost.localdomain

Resolution

  1. Stop Bamboo

  2. Add private hostname to localhost domain in /etc/hosts file for the host shown in the error log (e.g. ip-10-1-0-112):

    1 127.0.0.1 localhost localhost.localdomain ip-10-1-0-112
  3. Start Bamboo

Updated on April 8, 2025

Still need help?

The Atlassian Community is here for you.