3

Neo4j Document says we can use the bolt + routing when we are using the Cluster Mode/setup. I am able to use single node with bolt connection without any issue but if I use the cluster mode/setup it gives me the following error.

Caused by: org.neo4j.driver.v1.exceptions.ClientException: 'bolt+routing' is not a supported transport (in 'bolt+routing://username:password@server.com:7687', available transports are: [bolt].

In cluster mode if I just use
bolt+routing://username:password@server.com:7687
I am getting NotALeader Error as below

config.Neo4jConfiguration: Intercepted exception Exception in thread "main" org.neo4j.ogm.exception.CypherException: Error executing Cypher: Neo.ClientError.Cluster.NotALeader at org.neo4j.ogm.drivers.bolt.transaction.BoltTransaction.commit(BoltTransaction.java:75)

Note: I am using Spring Data Neo4j for my application

Anver Sadhat
  • 3,074
  • 1
  • 25
  • 26

2 Answers2

3

The document says, that "The address in the URI must be that of a core server." You can set your cluster member to be a core with this configuration in neo4j.conf:

dbms.mode=CORE

And in browser you can check the member roles:

CALL dbms.cluster.role()
szenyo
  • 522
  • 2
  • 9
1

The OGM bolt driver version (neo4j-ogm-bolt-driver) should be 2.1.0

Reference to Spring SDN Doc helps to resolve the issue.

Anver Sadhat
  • 3,074
  • 1
  • 25
  • 26