ISSUE: I have a docker image running for neo4j and one for express.js. I cant get the docker images to communicate between eachother.
I can run neo4j desktop, start a nodemon server and they will communicate.
SETUP: NEO4J official docker image
- NEO4J_AUTH none
- PORTS localhost:7474 localhost:7687
- Version neo4j-community-4.3.3-unix.tar.gz
NODEJS Image
- PORTS 0.0.0.0:3000 :::3000
- Version 14.17.5
Express conf
DEV_DB_USER_NAME="neo4j" DEV_DB_PASSWORD="test" DEV_DB_URI="neo4j://localhost" //for image purpose for local its bolt://localhost:7687 DEV_DB_SECRET_KEY=""
let driver = neo4j.driver(
envConf.dbUri,
neo4j.auth.basic(envConf.dbUserName, envConf.dbUserName)
);
package.json "@babel/node": "^7.13.10", "neo4j-driver": "^4.2.3",
I can remote into the neo4j image through http://localhost:7474/browser/ so its running.
I cannot use the server image to call a local neo4j instance.
when i call the apis in the server image i get these errors
If i use neo4j protocal:
Neo4jError: Could not perform discovery. No routing servers available. Known routing table: RoutingTable[database=default database, expirationTime=0, currentTime=1629484043610, routers=[], readers=[], writers=[]]
If i use bolt protocal:
Neo4jError: Failed to connect to server. Please ensure that your database is listening on the correct host and port and that you have compatible encryption settings both on Neo4j server and driver. Note that the default encryption setting has changed in Neo4j 4.0. Caused by: connect ECONNREFUSED 127.0.0.1:7687
Ive been scouring the documentation for a while any ideas would be most welcome!