I must be missing something simple… I have two pro...
# ask-community
j
I must be missing something simple… I have two production servers … we will call them Primary and Prefect … as you can guess the Prefect server houses my agent and accepts 10% of the web traffic. The Primary server accepts 90% of the web traffic and has at least one
run_deployment
specified in one of it’s routes. When posting to that URL I get an error and it seems like it is looking for the deployment on a local copy of Prefect Server (previously Orion) instead of Prefect Cloud which is what I’m using… Here’s the error without the stack trace…
Copy code
prefect.exceptions.PrefectHTTPStatusError: Client error '404 Not Found' for url '<http://ephemeral-prefect/api/deployments/name/alert-early-intervention/alert_early_intervention>'
… I have confirmed that the deployment exists in my Prefect Cloud under the name
alert-early-intervention/alert_early_intervention
.
1
I did initially have trouble because it wasn’t using the correct version of SQLite … I fixed that. I also created the
PREFECT_PROFILE
that my project looks for. It uses
ENV
variables to fill the
PREFECT_API_KEY
and
PREFECT_API_URL
. I’m not sure what I’ve missed in setting up the Primary server to communicate with Prefect Cloud. However, I must have missed some difference because the Prefect server has no issue connecting with Prefect Cloud…
I have just tried doing the
prefect cloud login
and pasted my API Key. It authenticated me. It is using the proper workspace from the CLI which means my Primary server is communicating with the Prefect Cloud via the CLI. However, when running the Django code it doesn’t seem to know about Prefect Cloud and instead is looking locally for an instance of Prefect Orion…
Well maybe I forgot to restart the webserver after logging in. It seems to be working well now.
🙌 1
Thanks for reading!
z
😄
128 Views