Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to access 3.5.28 cluster with 4.4.5 driver #963

Open
pwhitfield-cashwerkz opened this issue Jul 6, 2022 · 1 comment
Open

Unable to access 3.5.28 cluster with 4.4.5 driver #963

pwhitfield-cashwerkz opened this issue Jul 6, 2022 · 1 comment

Comments

@pwhitfield-cashwerkz
Copy link

Potential bug report

Code using JS driver 4.4.5 is unable to access a Neo4j Enterprise cluster using version 3.5.28.

Neo4j Version: 3.5.28 Enterprise
Neo4j Mode: Cluster (3 nodes)
Driver version: JS driver 4.4.5
Operating System: AWS instance operated by 3rd party, so unknown

Steps to reproduce

  1. instantiate a driver using the neo4j+s scheme
  2. create a session and a transaction
  3. attempt to run a simple query within that transaction

Expected behavior

The query shall run successfully

Actual behavior

  1. Code instantiates a driver successfully using the neo4j+s url scheme
  2. Code appears to create a session successfully
  3. attempting to run a transaction results in a timeout with subsequent transaction retries

Error returned is:

2022-07-05T02:53:00.803Z	c77c6023-7f49-4f9f-8424-03dd20276ebc	WARN	Failed to performed request. Neo4jError: Could not perform discovery. No routing servers available. Known routing table: RoutingTable[database=default database, expirationTime=0, currentTime=1656989578989, routers=[], readers=[], writers=[]]
: 
    at captureStacktrace (/opt/nodejs/node_modules/neo4j-driver-core/lib/result.js:239:17)
    at new Result (/opt/nodejs/node_modules/neo4j-driver-core/lib/result.js:59:23)
    at newCompletedResult (/opt/nodejs/node_modules/neo4j-driver-core/lib/transaction.js:433:12)
    at Object.run (/opt/nodejs/node_modules/neo4j-driver-core/lib/transaction.js:287:20)
    at Transaction.run (/opt/nodejs/node_modules/neo4j-driver-core/lib/transaction.js:137:34)
    at testDBQuery (/var/task/webpack:/insto-db-conn-test/src/models/test.js:7:1)
    at /var/task/webpack:/insto-db-conn-test/src/models/test.js:23:1
    at TransactionExecutor._safeExecuteTransactionWork (/opt/nodejs/node_modules/neo4j-driver-core/lib/internal/transaction-executor.js:92:26)
    at TransactionExecutor._executeTransactionInsidePromise (/opt/nodejs/node_modules/neo4j-driver-core/lib/internal/transaction-executor.js:83:34)
    at Timeout._onTimeout (/opt/nodejs/node_modules/neo4j-driver-core/lib/internal/transaction-executor.js:63:23) {
  constructor: [Function: Neo4jError],
  code: 'ServiceUnavailable'
}

It appears that the driver isn't retrieving the routing table properly?

For context, we are attempting to update our code to use the latest driver as a precursor to updating our DB cluster to Neo4j 4.4

@bigmontz
Copy link
Contributor

bigmontz commented Sep 6, 2022

Hi @pwhitfield-cashwerkz,

The javascript driver defer the connection creation until the moment it needs to communicate with the server. You could force the communication occur by calling driver.verifyConnectivity().

About the error, could you enable the driver debug logs? It could be enable by:

const driver = neo4j.driver(url, auth, { logging: neo4j.logging.console('debug') })
await driver.verifyConnectivity()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants