Hey prefect, I am trying to run `prefect server st...
# prefect-community
Hey prefect, I am trying to run
prefect server start
for the first time and running into some errors with the postgres step. Can you help troubleshoot?
Sure thing, @Adam Roderick! What's up?
I'm looking for the first error
The first hard error looks like alembic
Copy code
apollo_1     | 2020-04-13T14:09:46.782Z Error fetching GraphQL health: FetchError: request to <http://graphql:4201/health> failed, reason: connect ECONNREFUSED
There is an earlier warning with hasura_1
Copy code
hasura_1     | {"internal":"could not connect to server: Connection refused\n\tIs the server running on host \"postgres\" ( and accepting\n\tTCP/IP connections on port 5432?\n","path":"$","error":"connection error","code":"postgres-error"}
Okay, interesting. So far, definitely looking like the chain of failures I'd expect to see from an error with Postgres.
The first time I attempted, there was a port conflict with a locally installed instance of postgres
So I shut down the local instance and retried
any way to do a "wipe" and clean slate retry?
Sure is! With your Prefect Server inf still up, I'd recommend running
prefect-server database reset
with the optional
step to skip the confirmation step.
That'll rerun the alembic migrations and reapply the Hasura metadata. If there was a fluke getting that up and started the first time, should do the trick for you.
I'm getting
is not a command
I have 10.1 installed
Oh, duh. Sorry-- I'm used to typing
for local dev. 😅
Sorry if I'm dense here--what should the command be?
Not dense at all-- wanted to make sure I gave you the proper command this time! Sorry it's a little more complex, here's what I'd recommend: • cd into the
directory •
pip install -e .
• then run
prefect-server database reset -y
There's probably room for us to improve the CLI experience there, thanks for bringing it to our attention!
No problem, and thanks for the help. What do you mean by server directory?
I looked in the directory where I installed prefect, and I looked in the virtual env's prefect directory. I installed prefect from pyPI
Yep, I apologize again Adam-- this was a remnant from my local development on
. If you `pip install`ed prefect, you won't have that directory.
Your best bet might be to cancel your original spin-up of infrastructure and then run
prefect server start
If you're still running into errors there, happy to walk you through them. But if it was a transient issue with a port conflict, that should do the trick.
@Adam Roderick you mentioned an alembic error - do you mind sharing that?
I don't mind. Give me a moment and I'll update and share the errors
👍 2
On my first run, I had errors due to a port conflict between the postgres container and a local install of postgres. After deleting all the containers, shutting off my local postgres, and trying again, the above is pretty consistent output
At current state, I can run the UI in the browser, and I can register a flow. It shows up in the UI. But when I try to run, it just hangs and eventually shows up in the Late Runs list
Ok! This log looks good and that makes sense that Postgres was unable to start before. The current issue just sounds like there isn’t a local agent running.
Your Cloud agents won’t work with the open-source server. Try
prefect backend server
and `prefect agent start`to spin up a local one
That must be what I am missing. I'll give that a try
That was it
The errors in the docker output are still there and confused me. But I was able to register a flow locally with the UI and execute it from the UI
Thanks for your help!
LMK if you want any other info from my machine
ok! I think we’re good then - those docker errors are most likely a consequence of our services being somewhat order dependent and docker not being a great place to have order dependent services 🙂 (For example, hasura depends on postgres being available; graphql depends on hasura being available; apollo depends on graphql being available…) Therefore there can be some noise as they jockey for position, however we are going to look into it because we don’t want it to be alarming.
⬆️ 1
All good from my end. Thanks again