Skip to content

Causal Cluster Unable To Parse TTL Entry From Router #424

Closed
@creatzor

Description

@creatzor

Hi,

I'm using the js driver version 1.7 and haven't been able to connect to my causal cluster (same issue with previous versions). I dont understand why it can't parse it because it appears the TTL (300) is right there . Any insight on what i'm doing wrong?

I use bolt+routing:// neo-core-1.al-dev.ecs.local.

const driver = neo4j.driver(NEO4J_URI, neo4j.auth.basic(NEO4J_USER, NEO4J_PASSWORD), {
	disableLosslessIntegers: true,
	encrypted: 'ENCRYPTION_OFF'
});

runCypherQuery(driver.session(), 'MATCH (n) RETURN COUNT(n)')
	.then(r => {
		console.log('--> NODE COUNT: ', r);
	})
	.catch(console.log);

{ Neo4jError: Unable to parse TTL entry from router neo-core-1.al-dev.ecs.local:7687 from record:
{"keys":["ttl","servers"],"length":2,"_fields":[300,[{"addresses":["neo-core-1.al-dev.ecs.local:7687"],"role":"WRITE"},{"addresses":["neo-core-3.al-dev.ecs.local:7687","neo-core-2.al-dev.ecs.local:7687"],"role":"READ"},{"addresses":["neo-core-2.al-dev.ecs.local:7687","neo-core-1.al-dev.ecs.local:7687","neo-core-3.al-dev.ecs.local:7687"],"role":"ROUTE"}]],"_fieldLookup":{"ttl":0,"servers":1}}

bolt without routing works, but i need to be able to take advantage of the cluster

Doing some debugging -- I see the rror returned from routing-util.js is

 TypeError: record.get(...).multiply is not a function
    at RoutingUtil.parseTtl (/Users/albertfrimpong/Documents/Development/sourcify-api/node_modules/neo4j-driver/lib/v1/internal/routing-util.js:112:38)
    at /Users/albertfrimpong/Documents/Development/sourcify-api/node_modules/neo4j-driver/lib/v1/internal/rediscovery.js:83:49
    at process._tickCallback (internal/process/next_tick.js:68:7)

The ttl returned from record.get is of type number but its seems thats not what we expect?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions