Open es50678 opened 4 years ago
I have the same issue. When using the latest version of the driver I cannot connect to my Aura instance at all. I get the same error.
@es50678 You need to configured the advertised address to be something like 0.0.0.0
.
Your log already tells you. In the failed case, log contains
2020-04-27 22:04:09.132+0000 INFO Bolt enabled on localhost:7687.
While when using docker, log says
2020-04-27 22:01:39.771+0000 INFO Bolt enabled on 0.0.0.0:7687.
@MuddyBootsCode Try if you have the same, otherwise, be free to start your own issue.
@zhenlineo Will do. It's worth noting that this does not occur with version 1.7 of the driver. It's only when I upgraded that I began experiencing issues.
@es50678 You need to configured the advertised address to be something like
0.0.0.0
. Your log already tells you. In the failed case, log contains2020-04-27 22:04:09.132+0000 INFO Bolt enabled on localhost:7687.
While when using docker, log says
2020-04-27 22:01:39.771+0000 INFO Bolt enabled on 0.0.0.0:7687.
I changed the following variables in the config file:
dbms.default_advertised_address=0.0.0.0
I tried again and received the same error.
I tried with both const driver = neo4j.driver('neo4j://localhost', neo4j.auth.basic('neo4j', 'root'));
and const driver = neo4j.driver('neo4j://0.0.0.0', neo4j.auth.basic('neo4j', 'root'));
Both result in the same error message:
Neo4jError: Could not perform discovery. No routing servers available. Known routing table: RoutingTable[database=default database, expirationTime=0, currentTime=1589408119298, routers=[], readers=[], writers=[]]
at captureStacktrace (/mnt/c/Users/Eduardo/wsl/projects/freshit-api/node_modules/neo4j-driver/lib/result.js:263:15)
at new Result (/mnt/c/Users/Eduardo/wsl/projects/freshit-api/node_modules/neo4j-driver/lib/result.js:68:19)
at Session._run (/mnt/c/Users/Eduardo/wsl/projects/freshit-api/node_modules/neo4j-driver/lib/session.js:174:14)
at Session.run (/mnt/c/Users/Eduardo/wsl/projects/freshit-api/node_modules/neo4j-driver/lib/session.js:135:19)
at Object.<anonymous> (/mnt/c/Users/Eduardo/wsl/projects/freshit-api/index.js:5:18)
at Module._compile (internal/modules/cjs/loader.js:1156:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1176:10)
at Module.load (internal/modules/cjs/loader.js:1000:32)
at Function.Module._load (internal/modules/cjs/loader.js:899:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:74:12) {
code: 'ServiceUnavailable',
name: 'Neo4jError'
}
In addition, I also tried changing the following config variables in addition to the default advertised address:
dbms.connector.bolt.listen_address=:7687
dbms.connector.http.listen_address=:7474
@MuddyBootsCode did it work for you after changing the advertised address? Am I changing the wrong config variable?
The dbms.default_advertised_address
should never be 0.0.0.0
, it should be something that's reachable.
I think the driver using neo4j://
scheme can't handle that when building it's routing table.
If you try bolt://
instead of neo4j://
I suspect it works.
But the real fix is to advertise something else, that's reachable.
The dbms.default_listen_address
could be 0.0.0.0
, if you want the dbms to accept connections from anywhere.
I'm having the same issue using Neo4j desktop and bolt:://localhost:7687. This is happening with both JS and C#.NET. Everything worked fine until I upgraded to 1.1.21. I uninstalled and tried again on 1.2.8 and I have the same issue. I have confirmed that 7687 is not blocked and that the DB is running. I was able to connect using the REST interface in JS. I even disabled TLS in case that was a problem.
Was there a change in 1.1.21 that might account for this? It seems that the BOLT protocol just isn't working.
dbms.connector.bolt.enabled=true dbms.connector.bolt.tls_level=DISABLED
`# Bolt SSL configuration
@oskarhane
I changed:
dbms.default_advertised_address
to dbms.default_advertised_address=localhost
dbms.default_listen_address
to dbms.default_listen_address=localhost
I tried with the driver using neo4j://localhost
and bolt://localhost
.
Unfortunately, neither worked, I'm still receiving:
Neo4jError: Could not perform discovery. No routing servers available. Known routing table: RoutingTable[database=default database, expirationTime=0, currentTime=1589408119298, routers=[], readers=[], writers=[]]
at captureStacktrace (/mnt/c/Users/Eduardo/wsl/projects/freshit-api/node_modules/neo4j-driver/lib/result.js:263:15)
at new Result (/mnt/c/Users/Eduardo/wsl/projects/freshit-api/node_modules/neo4j-driver/lib/result.js:68:19)
at Session._run (/mnt/c/Users/Eduardo/wsl/projects/freshit-api/node_modules/neo4j-driver/lib/session.js:174:14)
at Session.run (/mnt/c/Users/Eduardo/wsl/projects/freshit-api/node_modules/neo4j-driver/lib/session.js:135:19)
at Object.<anonymous> (/mnt/c/Users/Eduardo/wsl/projects/freshit-api/index.js:5:18)
at Module._compile (internal/modules/cjs/loader.js:1156:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1176:10)
at Module.load (internal/modules/cjs/loader.js:1000:32)
at Function.Module._load (internal/modules/cjs/loader.js:899:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:74:12) {
code: 'ServiceUnavailable',
name: 'Neo4jError'
}
I'm sorry that it took me so long to reply. Thank you all again for helping me out with this ❤️
experiencing the same.
running neo4j v4 with latest official docker image. On windows 10 host. using neo4j://
uri scheme, also tried with bolt://
with no success. both
my docker-compose.yml looks like this:
neo4j:
image: neo4j:4.0.4
environment:
- NEO4J_AUTH=neo4j/Password
- NEO4J_dbms_connector_http_advertised__address=localhost:7474
- NEO4J_dbms_connector_bolt_advertised__address=localhost:7687
expose:
- 7474
- 7687
ports:
- 7474:7474
- 7687:7687
index.js
I'm starting my Neo4j instance from Neo4j Desktop. The following is the log output when the instance starts:
Expected behavior
Running
node index.js
should result in:Actual behavior
Running
node index.js
should results in:Workaround
Currently, I'm getting around this by running neo4j in a docker container.
I use the following to start up the docker container:
docker run -p 7474:7474 -p 7687:7687 --env NEO4J_AUTH=neo4j/root neo4j:4.0.1
This is the same version and username/password used in the Neo4j Desktop instance.
The only difference I can see is that it's running in docker.
The following is the log from starting up the docker instance:
Has anyone else ran into this? Can you help point me in the right direction?
I intend to continue using the docker instance instead of Neo4j Desktop, I'm just curious as to what the difference is that's causing my issue.