Closed
Description
Request Type
Bug
Work Environment
TheHive with cassandra
Problem Description
If cassandra service is not ready, TheHive fails to start with the error:
java.lang.reflect.InvocationTargetException: null
com.datastax.driver.core.exceptions.NoHostAvailableException: All host(s) tried for query failed (tried: /x.x.x.x:9042 (com.datastax.driver.core.exceptions.TransportException: [/x.x.x.x:9042] Cannot connect))
The solution is to retry the connection to cassandra after a while. The following configuration is added to define the timings and the number of retries:
db.janusgraph.connect {
maxAttempts = 10
minBackoff = 1 second
maxBackoff = 5 seconds
randomFactor = 0.2
}