Thank you for your answer, I ran CALL dbms.cluster.overview()
on the cluster leader via the http api and got this result
[
{
"columns": [
"id",
"addresses",
"role",
"groups",
"database"
],
"data": [
{
"row": [
"ff9e14fb-acf9-4cda-933e-1be02ba097d6",
[
"bolt://localhost:6687",
"http://localhost:6474",
"https://localhost:7473"
],
"READ_REPLICA",
[],
"default"
],
"meta": [
null,
null,
null,
null,
null,
null
]
},
{
"row": [
"d8f8c3c9-e20b-4985-b3c8-6b85919de018",
[
"bolt://localhost:7687",
"http://localhost:7474",
"https://localhost:7473"
],
"LEADER",
[],
"default"
],
"meta": [
null,
null,
null,
null,
null,
null
]
},
{
"row": [
"3b903e3d-63c1-4679-9993-794a7a5b2c3a",
[
"bolt://localhost:8687",
"http://localhost:8474",
"https://localhost:7473"
],
"FOLLOWER",
[],
"default"
],
"meta": [
null,
null,
null,
null,
null,
null
]
},
{
"row": [
"812afbb2-ee26-4829-8a94-0efa33a4f5a5",
[
"bolt://localhost:9687",
"http://localhost:9474",
"https://localhost:7473"
],
"FOLLOWER",
[],
"default"
],
"meta": [
null,
null,
null,
null,
null,
null
]
}
]
}
]
To me that looks good. I also logged the js driver output and there definitely seems to be something wrong with the routing, I get the following error messages:
Connection [2][] created towards localhost:6687
Connection [2][] experienced a fatal error {"code":"SessionExpired","name":"Neo4jError"}
Connection [2][] closing
Routing driver 0 will forget localhost:6687 for database '' because of an error SessionExpired 'Failed to connect to server. Please ensure that your database is listening on the correct host and port and that you have compatible encryption settings both on Neo4j server and driver. Note that the default encryption setting has changed in Neo4j 4.0. Caused by: connect ECONNREFUSED 127.0.0.1:6687'
Connection [2][] closed
Connection [3][] created towards localhost:9687
Connection [3][] experienced a fatal error {"code":"SessionExpired","name":"Neo4jError"}
Connection [3][] closing
Routing driver 0 will forget localhost:9687 for database '' because of an error SessionExpired 'Failed to connect to server. Please ensure that your database is listening on the correct host and port and that you have compatible encryption settings both on Neo4j server and driver. Note that the default encryption setting has changed in Neo4j 4.0. Caused by: connect ECONNREFUSED 127.0.0.1:9687'
Connection [3][] closed
Connection [4][] created towards localhost:8687
Connection [4][] experienced a fatal error {"code":"SessionExpired","name":"Neo4jError"}
Connection [4][] closing
Routing driver 0 will forget localhost:8687 for database '' because of an error SessionExpired 'Failed to connect to server. Please ensure that your database is listening on the correct host and port and that you have compatible encryption settings both on Neo4j server and driver. Note that the default encryption setting has changed in Neo4j 4.0. Caused by: connect ECONNREFUSED 127.0.0.1:8687'
Connection [4][] closed
Routing table is stale for database: "" and access mode: "READ": RoutingTable[database=default database, expirationTime=1588944079435, currentTime=1588943795982, routers=[localhost:9687,localhost:8687,localhost:7687], readers=[], writers=[localhost:7687]]
Connection [5][] created towards localhost:9687
Connection [5][] experienced a fatal error {"code":"SessionExpired","name":"Neo4jError"}
Connection [5][] closing
Connection [6][] created towards localhost:8687
Connection [5][] closed
Connection [6][] experienced a fatal error {"code":"SessionExpired","name":"Neo4jError"}
Connection [6][] closing
Connection [1][bolt-0] acquired from the pool localhost:7687
Connection [1][bolt-0] C: RUN CALL dbms.cluster.routing.getRoutingTable($context) {"context":{}} {}
Connection [1][bolt-0] C: PULL_ALL
Connection [6][] closed
Connection [1][bolt-0] S: SUCCESS {"signature":112,"fields":[{"t_first":{"low":2,"high":0},"fields":["ttl","servers"]}]}
Connection [1][bolt-0] S: RECORD {"signature":113,"fields":[[{"low":300,"high":0},[{"addresses":["localhost:7687"],"role":"WRITE"},{"addresses":["localhost:8687","localhost:6687","localhost:9687"],"role":"READ"},{"addresses":["localhost:9687","localhost:7687","localhost:8687"],"role":"ROUTE"}]]]}
Connection [1][bolt-0] S: SUCCESS {"signature":112,"fields":[{"bookmark":"neo4j:bookmark:v1:tx67","type":"r","t_last":{"low":0,"high":0}}]}
Connection [1][bolt-0] C: RESET
Connection [1][bolt-0] S: SUCCESS {"signature":112,"fields":[{}]}
Connection [1][bolt-0] released to the pool localhost:7687
Updated routing table RoutingTable[database=default database, expirationTime=1588944095999, currentTime=1588943795999, routers=[localhost:9687,localhost:7687,localhost:8687], readers=[localhost:8687,localhost:6687,localhost:9687], writers=[localhost:7687]]
on repeat a few times as the readTransaction does its retries. In the very same CI process a write request succeeds:
Connection [1][bolt-0] acquired from the pool localhost:7687
Connection [1][bolt-0] C: BEGIN {}
Connection [1][bolt-0] C: RUN MERGE (u: User { email: $emailAddress })
ON CREATE
SET u += {
firstName: $firstName,
lastName: $lastName,
password: $password
} {"firstName":"testFirstName","lastName":"testLastName","password":"$2a$08$WwxvdxXON3LFL79aWZ0/gev2wxypir2yH3dTrVrtNunN81H9ntLsi","emailAddress":"test@email.test"} {}
Connection [1][bolt-0] C: PULL_ALL
Connection [1][bolt-0] S: SUCCESS {"signature":112,"fields":[{}]}
Connection [1][bolt-0] S: SUCCESS {"signature":112,"fields":[{"t_first":{"low":72,"high":0},"fields":[]}]}
Connection [1][bolt-0] S: SUCCESS {"signature":112,"fields":[{"stats":{"labels-added":{"low":1,"high":0},"nodes-created":{"low":1,"high":0},"properties-set":{"low":4,"high":0}},"type":"w","t_last":{"low":0,"high":0}}]}
Connection [1][bolt-0] C: COMMIT
Connection [1][bolt-0] S: SUCCESS {"signature":112,"fields":[{"bookmark":"neo4j:bookmark:v1:tx77"}]}
Connection [1][bolt-0] C: RESET
Connection [1][bolt-0] S: SUCCESS {"signature":112,"fields":[{}]}
Connection [1][bolt-0] released to the pool localhost:7687