anyone ever get the 'Can't connect to Server API a...
# prefect-community
a
anyone ever get the 'Can't connect to Server API at http://127.0.0.1:4200/api. Check that it's accessible from your machine.'? After developing locally, I'm setting up a remote host for actual deployments and unable to get the server configured correctly it seems. I'm starting the server with:
Copy code
prefect server start --host=0.0.0.0
I get a UI, but parts of it are inaccessible
n
hmm when I've seen this its usually an issue with the networking setup, can you share more about where you're trying to host your API in relation to where you're trying to access it? also just in case it's relevant, seeing this
After developing locally, I'm setting up a remote host for actual deployments
I'm curious if you just want remote execution of your deployments or if you actually need to host your API yourself because of compliance reasons / other preferences? since you can remotely configure / execute your deployments when letting Prefect Cloud host the API (apologies if you already know this, i just mention since its a common point of confusion 😄 )
a
need to host for compliance reasons networking ... just some vm somewhere on a corporate network. It's kinda transparent to me. It has its IP address which I can ping and access via browser
there is also a dns entry on the ip that I use to access via browser
oh interesting, I had to set the api url on the server too, prefect config set PREFECT_API_URL=
and now it's working
🦜 1
I see my deployment and a bunch of block options!
thanks Nate for pointing me in the right direction
n
glad you figured it out - let us know if you generate any questions as you build out some deployments!
k
Hey @Albert Wong I'm facing the same issue. For the PREFECT_API_URL, did you just set it to
0.0.0.0
too?
a
no I set it to the actual hostname:port/api on the server
k
thanks, I was able to get it to work. do you still see the following:
Copy code
etl-server-1  | httpx.ConnectError: All connection attempts failed
when the server starts though?
a
I haven't seen that
k
Ah I managed to fix it by setting it from profiles.toml