Skip to content
This repository has been archived by the owner on May 26, 2022. It is now read-only.

seeddb command not working with neo4j sandbox #134

Open
jreuben11 opened this issue Feb 2, 2021 · 4 comments
Open

seeddb command not working with neo4j sandbox #134

jreuben11 opened this issue Feb 2, 2021 · 4 comments

Comments

@jreuben11
Copy link

jreuben11 commented Feb 2, 2021

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 ?

@johnymontana
Copy link
Member

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.

@jreuben11
Copy link
Author

@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.

@flq
Copy link

flq commented Apr 17, 2021

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?

@sabinmarcu
Copy link

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants