Unable to Set Localhost

Problem

A Java.net.UnknownHostException with the error message "Unable to set localhost" causes further problems with the Titan connector. This Manta Flow Server source doesn't start (Tomcat does), and requests to `http://localhost:8080/manta-dataflow-server' return a 404 error code.

The problem occurred when performing a clean installation of OpenSuse.

manta-dataflow.log

2019-07-17 17:51:07.853 [main] ERROR net.sf.ehcache.Cache - Unable to set localhost. This prevents creation of a GUID. Cause was: linux-7qc8: linux-7qc8: Name or service not known
java.net.UnknownHostException: linux-7qc8: linux-7qc8: Name or service not known
...
2019-07-17 17:51:16.476 [main] ERROR eu.profinit.manta.dataflow.repository.connector.titan.connection.DatabaseProvider - Error during creating database with configuration org.apache.commons.configuration.BaseConfiguration@4fe76e48.
com.thinkaurelius.titan.core.TitanConfigurationException: Unknown host specified
...
2019-07-17 17:51:16.479 [main] ERROR eu.profinit.manta.dataflow.repository.connector.titan.connection.SimpleDatabaseHolder - Error during creating transaction.
java.lang.RuntimeException: Cannot open database.
...
2019-07-17 17:51:16.491 [main] ERROR eu.profinit.manta.dataflow.repository.connector.titan.connection.SimpleDatabaseHolder - The metadata repository initialization failed.
java.lang.RuntimeException: Cannot open database.
...
2019-07-17 17:51:16.962 [main] ERROR eu.profinit.manta.dataflow.repository.connector.titan.connection.SimpleDatabaseHolder - Error during creating transaction.
java.lang.IllegalArgumentException: Could not instantiate implementation: com.thinkaurelius.titan.diskstorage.persistit.PersistitStoreManager
...
2019-07-17 17:51:16.966 [main] ERROR org.springframework.web.context.ContextLoader - Context initialization failed
java.lang.IllegalArgumentException: Could not instantiate implementation: com.thinkaurelius.titan.diskstorage.persistit.PersistitStoreManager

Solution

Add the record 127.0.0.1 #VALUEto /etc/hosts. You can find the value in the log. In this example, the value is linux-7qc8.