java.net.BindException: Address already in use
val db = new Neo4jGraph(dataDirectory)
db.configuration after the database connection had already been opened was definitely futile.
stephen mallette's answer was on the right track, but this particular configuration doesn't appear to pass through in the way his linked example does. There is a naming mismatch between the configuration keys expected in
neo4j.conf and those expected in
org.neo4j.backup.OnlineBackupKernelExtension. Instead of
dbms.backup.enabled, that class looks for config keys
I was not able to get these keys passed down to the underlying
Neo4jGraphAPI instance correctly. What I had to do, instead, was the following:
import org.neo4j.tinkerpop.api.impl.Neo4jFactoryImpl import scala.collection.JavaConverters._ val factory = new Neo4jFactoryImpl() val config = Map( "online_backup_enabled" -> "true", "online_backup_server" -> "0.0.0.0:6350-6359" ).asJava val db = Neo4jGraph.open(factory.newGraphDatabase(dataDirectory,config))
With this initialization, the instance correctly listened for backups on port 6350; changing
"false" disabled backup listening.