grand-stack-starter icon indicating copy to clipboard operation
grand-stack-starter copied to clipboard

seeddb command not working with neo4j sandbox

Open jreuben11 opened this issue 4 years ago • 4 comments

I setup a neo4j sandbox DB, and ran npx create-grandstack-app. When I run npm run seedDb from /api subfolder, I get the following error message:

Error: Error: request to http://0.0.0.0:4001/graphql failed, reason: connect ECONNREFUSED 0.0.0.0:4001

my api/.env file generated by npx :

NEO4J_URI=<copied from sandbox.neo4j.com bolt URL>
NEO4J_USER=<copied from sandbox.neo4j.com username>
NEO4J_PASSWORD=<copied from sandbox.neo4j.com password>

GRAPHQL_SERVER_HOST=0.0.0.0   
GRAPHQL_SERVER_PORT=4001
GRAPHQL_SERVER_PATH=/graphql

To work with sandbox, what do I need to change here - HOST (I assume) / PORT / PATH ? - and what should the values be ?

jreuben11 avatar Feb 02 '21 16:02 jreuben11

Does this work if you use a local database? The error message seems like the client is not able to connect to the GraphQL API, so an error that occurs before the database connection.

johnymontana avatar Feb 03 '21 20:02 johnymontana

@johnymontana we are not planning on using a local database - as we evaluate this technology stack, we are following the tutorial and using it against Neo4j sandbox. if that works, we will consider Aura managed Neo4j as a cloud service.

jreuben11 avatar Feb 04 '21 05:02 jreuben11

well, basically we're in the dark with regard to the following values, aren't we?

GRAPHQL_SERVER_HOST=0.0.0.0
GRAPHQL_SERVER_PORT=4001
GRAPHQL_SERVER_PATH=/graphql

to be found in the .env file in API - while the other env vars were correctly set by the init routine of setting up the project, what are the values that should be set here?

flq avatar Apr 17 '21 19:04 flq

Random question, might seem silly at first. Are you running the GraphQL server before attempting a to run seed? Sometimes it's better to get the obvious out of the way.

The seed process uses the GraphQL server to seed the DB, so that needs to be on for the seed to work. The error you're having seems to suggest that the seed process can't access the GQL server. If it's already running, then something might be interfering there. For example running it in a docker image without exposing the port, or something of that sort.

sabinmarcu avatar Sep 20 '21 06:09 sabinmarcu