Broker Startup Failure: Cannot Resolve Local Host

Symptom

Broker fails to start with "Cannot resolve local host".

Cause

If networking is not correctly configured while Java is running on Linux, the NuoDB broker will fail to start. NuoDB generates an error message like the following if the NuoDB broker fails to start:

SEVERE: Failed to start up
java.lang.IllegalStateException: Cannot resolve local host, cause: c117.test.nuodb.com: Name or service not known.

Solution

To resolve this situation, add a mapping from localhost to the hostname in the hosts file:

  1. Open the agent.log file and and look for the SEVERE: Failed to start up section to confirm that the startup failure is due to network configuration.
  2. Manually edit your /etc/hosts file to add an entry for the name of your host. For example, the first line often looks something like this:

    127.0.0.1 localhost

    If the name of your host is my-host then change the line to this:

    127.0.0.1 localhost my-host

Example

See Deploying NuoDB with Amazon Web Services for an example of this error on AWS.