0

I am creating neo4j graph database enterprise edition by the following method. It doesn't return any exception etc. and shows that program is running(forever).

HashMap<String, String> settings = new HashMap<String, String>();
    settings.put("org.neo4j.server.database.mode", "HA");

    settings.put("ha.server_id", "1");
    settings.put("ha.initial_hosts",
            "neo4j-01.local:5001,neo4j-02.local:5001,neo4j-03.local:5001");

    GraphDatabaseService db = new HighlyAvailableGraphDatabaseFactory()
            .newHighlyAvailableDatabaseBuilder("db.local")
            .setConfig(settings).newGraphDatabase();

What would be the reason here?

P.S I got the configurations from official web-site of Neo4j.

Display Name
  • 139
  • 1
  • 11

1 Answers1

1

It waits for the other instances to join the cluster. Be sure to run the same code with appropriate ha.server_id on the other hosts mentioned in ha.initial_hosts.

Stefan Armbruster
  • 39,465
  • 6
  • 87
  • 97