Geting "Could not perform discovery. No routing servers available" while connecting from GRANDStack

Greetings folks.

Recently I created a new GRAND Stack project and a new database in Neo4j Desktop 4.1.1. After all download and setup are done and the .env file updated to reflect user & password, I executed npm start to up the api. And got these logs entries:

renatospaka@dell-w10home:~/dev/Cursos/neo4j/my-grand-stack$ npm start
> @ start /home/renatospaka/dev/Cursos/neo4j/my-grand-stack
> node scripts/start-dev.js

22:41:12 api | 
22:41:12 api | > grand-stack-starter-api@0.0.1 start:dev /home/renatospaka/dev/Cursos/neo4j/my-grand-stack/api
22:41:12 api | > cross-env DEBUG=neo4j-graphql-js ./node_modules/.bin/nodemon --watch src --ext js,graphql --exec babel-node  src/index.js
22:41:12 api | 
22:41:12 React | 
22:41:12 React | > grand-stack-starter-web-react@0.0.1 start /home/renatospaka/dev/Cursos/neo4j/my-grand-stack/web-react
22:41:12 React | > react-scripts start
22:41:12 React | 
22:41:13 api | [nodemon] 1.19.4
22:41:13 api | [nodemon] to restart at any time, enter `rs`
22:41:13 api | [nodemon] watching dir(s): src/**/*
22:41:13 api | [nodemon] watching extensions: js,graphql
22:41:13 api | [nodemon] starting `babel-node src/index.js`
22:41:15 React | [HPM] Proxy created: /  -> http://localhost:4001/graphql
22:41:15 React | ℹ 「wds」: Project is running at
22:41:15 React | ℹ 「wds」: webpack output is served from 
22:41:15 React | ℹ 「wds」: Content not from webpack is served from /home/renatospaka/dev/Cursos/neo4j/my-grand-stack/web-react/public
22:41:15 React | ℹ 「wds」: 404s will fallback to /
22:41:15 React | Starting the development server...
22:41:15 React | 
22:41:16 api | GraphQL server ready at
22:41:48 api | Database initialization failed to complete
22:41:48 api |  Could not perform discovery. No routing servers available. Known routing table: RoutingTable[database=default database, expirationTime=0, currentTime=1599356508672, routers=[], readers=[], writers=[]]
22:41:54 React | Compiled successfully!
22:41:54 React | 
22:41:54 React | You can now view grand-stack-starter-web-react in the browser.
22:41:54 React | 
22:41:54 React |   Local:            http://localhost:3000
22:41:54 React |   On Your Network:
22:41:54 React | 
22:41:54 React | Note that the development build is not optimized.
22:41:54 React | To create a production build, use npm run build.
22:41:54 React | 
22:41:58 api | 2020-09-06T01:41:58.313Z neo4j-graphql-js WITH apoc.cypher.runFirstColumn("MATCH (r:Review) WITH r.stars AS stars, COUNT(*) AS count ORDER BY stars RETURN {stars: stars, count: count}", {offset:$offset, first:$first}, True) AS x UNWIND x AS `ratingCount` RETURN `ratingCount` { .stars , .count } AS `ratingCount`
22:41:58 api | 2020-09-06T01:41:58.313Z neo4j-graphql-js {
22:41:58 api |   "offset": 0,
22:41:58 api |   "first": -1
22:41:58 api | }
22:41:58 api | 2020-09-06T01:41:58.332Z neo4j-graphql-js MATCH (`review`:`Review`) WITH `review` ORDER BY DESC RETURN `review` {user: head([(`review`)<-[:`WROTE`]-(`review_user`:`User`) | `review_user` { .name }]) ,business: head([(`review`)-[:`REVIEWS`]->(`review_business`:`Business`) | `review_business` { .name }]) ,date: { formatted: toString(`review`.date) }, .text , .stars } AS `review` LIMIT toInteger($first)
22:41:58 api | 2020-09-06T01:41:58.333Z neo4j-graphql-js {
22:41:58 api |   "offset": 0,
22:41:58 api |   "first": 10
22:41:58 api | }
22:41:58 api | 2020-09-06T01:41:58.337Z neo4j-graphql-js WITH apoc.cypher.runFirstColumn("MATCH (u:User) RETURN COUNT(u)", {offset:$offset, first:$first}, True) AS x UNWIND x AS `int` RETURN `int` 
22:41:58 api | 2020-09-06T01:41:58.337Z neo4j-graphql-js {
22:41:58 api |   "offset": 0,
22:41:58 api |   "first": -1
22:41:58 api | }

This entry is the one I'm worried about:
22:41:48 api | Could not perform discovery. No routing servers available. Known routing table: RoutingTable[database=default database, expirationTime=0, currentTime=1599356508672, routers=[], readers=[], writers=[]]

I have three other projects, all of them have the same issue when connecting to the database in Neo4j Desktop and I don't know why. I don't have a clue. I am new to Neo4j. Documentation refers a lot to Linux env, but I am working in a Windows 10 Home + wsl2 env and (in my opinion) this is the problem, although I cannot be sure.

When I installed Neo4j Desktop, I followed all instructions and suggestions during the process. The Desktop itself works fine, I am able to create projects, databases, to import data to them, to execute queries, open in web browsers through http://localhost:7474. Everything just fine but not to connect to an api. At first I thought I was miscoding something but then the same occurred with three projects I'm studying from Neo4 Community Youtube page (I forked the code), including this GRANDStack one which I just executed npx create-grandstack-app <myproject>.

Neo4j is showing to be tougher than I thought. For now, I'm really thinking of fully remove Neo4j Desktop, it is stressing me instead of helping me...

Well, what should I do?

Any suggestions on this? I will reinstall Neo4j Desktop today but I'm doing it in "blind mode", which means I don't know what else to do...


As far as I know - you can't connect to localhost on your Windows instance (which is where Desktop is running) from within WSL/2 - I'm not sure how you get around this, from this: aem - Access a localhost running in Windows from inside WSL2? - Stack Overflow it looks like you might be able to try IP addresses instead?

All the best


1 Like

Hey @charlotte.skardon

It never crossed my mind. I had installed Mongo & MariaDB in my notebook, both working fine via WSL2. RecentIy I moved them to Atlas and RDS free tiers. Regarding the Neo4j development installation, I think I will use a container and access it from Desktop. This could do just fine.

Anyway, if this is the case, it is a big issue. Lots of developers are moving towards WSL2.


I think I got Neo4j running in WSL a while ago - I've not tried in WSL2 - but in theory - you should be able to run inside there.

WSL2 is different from WSL in the way it works - this github bug pretty much goes over it, and none of the solutions look nice :(

Tough weeks!!! Had zero time to focus on this, but I intend to resume this testing today. My opinion is it is really odd Neo4j not working along wsl2

Nevertheless, I will check this.

Neo4j works inside WSL2 just fine, the problem you have is networking between WSL2 and Windows, which is nothing to do with Neo4j, and entirely to do with WSL2 and the underlying way it runs.

The bug I put a link to above shows this, I mean - you'll get the same problem if you started a simple web server on IIS/Express etc and try to connect to it from WSL2.

As soon as you can get access to your Windows ips from WSL2, it will work fine.