<@ULVA73B9P> When i run prefect server start on my...
# marvin-ai
a
@Marvin When i run prefect server start on my local mac and go to http://127.0.0.1:4200/dashboard, it shows the prefect page, but with an error. “Oops. Something went wrong. You can use Prefect Cloud for free, anytime” followed by “Can’t connect to Server API at http://localhost:4201/api. Check that it’s accessible from your machine.”
m
thought for 272.4 seconds
Thanks for the details — this usually means the UI is pointing at the wrong API port. In Prefect 3.x,
prefect server start
runs a single server that serves both the UI and API on the same port (by default 127.0.0.1:4200). The UI should talk to the API at http://127.0.0.1:4200/api. Your UI is trying http://localhost:4201/api, which suggests an env/config override. Quick fix - Start the server with an explicit UI API URL:
Copy code
export PREFECT_SERVER_UI_API_URL=<http://127.0.0.1:4200/api>
  prefect server start
Then refresh http://127.0.0.1:4200/dashboard. Or, if you actually want to use port 4201, run the server on 4201 and open that port in the browser:
Copy code
prefect server start --port 4201
Then visit http://127.0.0.1:4201/dashboard. Diagnose what set 4201 - See where settings are coming from:
Copy code
prefect config view --show-sources
Look for: - PREFECT_SERVER_UI_API_URL - PREFECT_SERVER_API_PORT - PREFECT_API_URL (client setting; won’t affect the UI, but good to keep consistent) - Test API health directly:
Copy code
curl -s <http://127.0.0.1:4200/api>
  curl -i <http://127.0.0.1:4200/api/ready>
- Check for port conflicts on macOS:
Copy code
lsof -nP -iTCP:4200 -sTCP:LISTEN
Common causes - An existing env var or profile set
PREFECT_SERVER_UI_API_URL=<http://localhost:4201/api>
- A prior run with
--port 4201
but you’re visiting 4200 - Port 4200 is in use, so the server failed to bind there Docs for reference - Server CLI: prefect server start - Settings reference: Settings - Health endpoints: /api health and /api/ready If this doesn’t resolve it, could you share: - Your
prefect version
- The relevant lines from
prefect config view --show-sources
that include any PREFECT_SERVER_* or PREFECT_API_* entries - The output of
curl <http://127.0.0.1:4200/api>
?