hi there - I’m having trouble telling my flow wher...
# prefect-community
k
hi there - I’m having trouble telling my flow where to look for prefect server (the api). I’ve tried many different ways to set
prefect.config.api.url
(env variable
PREFECT__CONFIG__API__URL
and setting it in
config.toml
but when I call
.register()
I get the following error:
Copy code
requests.exceptions.ConnectionError: HTTPConnectionPool(host='localhost', port=4200): Max retries exceeded with url: /graphql (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7fbcbd594e10>: Failed to establish a new connection: [Errno 111] Connection refused'))
indicating that it’s still trying
localhost
instead of what I’ve given it (which does not resolve to
localohost
) - any ideas?
k
Hey @Kevin Weiler, I believe other users have encountered this error before, let me get more information for you.
k
cool, thanks!
stepping away for a few FYI
k
Hmm, I'm wondering where in the process this error is occurring. How do you have your config.toml setup? Here's the Prefect config.toml for reference.
k
referencing your
config.toml
it looks like
PREFECT__CONFIG__API__URL
is the wrong env variable. I think the one I want to set is
PREFECT__CONFIG__SERVER__ENDPOINT
I set it in the
config.toml
though instead
k
The endpoint may be what you're looking for, but we'll have to test it out. I'd also recommend configuring either the env variables or config.toml, but not both to avoid crossing those wires.
k
thanks - yeah, I’m just going with config.toml for now
j
As a follow up the correct env var for setting that would be
Copy code
PREFECT__SERVER__ENDPOINT
without the
__CONFIG
upvote 1
k
ah thanks sir!