Neo4jError: Could not perform discovery

I have the neo4j 4.0 server and the neo4j driver 4.0 in my application. I initialize driver as follows

const driver = neo4j.driver(
  process.env.neo4j://db:7687 || "neo4j://localhost:7687",
  neo4j.auth.basic(
    process.env.NEO4J_USER,
    process.env.NEO4J_PASSWORD
  )
);

my neo4j server and the graphql server both run in the docker container. But when I run graphql query using playground I got the following error in graphql container.

{

code: 'ServiceUnavailable'

}

error : Neo4jError: Could not perform discovery. No routing servers available. Known routing table: RoutingTable[database=lvrg, expirationTime=0, currentTime=1592003266918, routers=[], readers=[], writers=[]]

How can I fix this issue?

1 Like