https://prefect.io logo
Title
k

Kevin Weiler

06/29/2020, 6:43 PM
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:
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

Kyle Moon-Wright

06/29/2020, 6:55 PM
Hey @Kevin Weiler, I believe other users have encountered this error before, let me get more information for you.
k

Kevin Weiler

06/29/2020, 6:55 PM
cool, thanks!
stepping away for a few FYI
k

Kyle Moon-Wright

06/29/2020, 7:10 PM
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

Kevin Weiler

06/29/2020, 7:24 PM
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

Kyle Moon-Wright

06/29/2020, 7:28 PM
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

Kevin Weiler

06/29/2020, 7:30 PM
thanks - yeah, I’m just going with config.toml for now
j

josh

06/29/2020, 7:38 PM
As a follow up the correct env var for setting that would be
PREFECT__SERVER__ENDPOINT
without the
__CONFIG
:upvote: 1
k

Kevin Weiler

06/29/2020, 9:38 PM
ah thanks sir!