New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UI cannot connect to Prefect Server hosted on Ubuntu VM #212
Comments
Ubuntu server 20.04 Problem appears at
|
Server startup log
|
agent log (can connect to localhost)
|
cc @znicholasbrown -- Server appears to be starting correctly and the API is contactable by @JustinGuese - The API must be accessible from the browser that is using the UI since the client makes requests directly to the API. This means if you browse the UI (hosted on machine A) from machine B then you must be able to hit the graphql endpoint from machine B or the UI will not work. This means that both the UI and API must be publicly exposed. From that UI dashboard you'll want to set the API endpoint to be the public route to the API. You can set the default value for this for users of your UI with the config key |
Perfect, thanks very much! Wasn't clear to me, but that helps a lot for clarity |
Sweet :) |
Opened from the Prefect Public Slack Community
info973: Hey guys, one question... I experienced this on multiple systems, usually all ubuntu server lts 20.04, installing with pip.
On every instance it will just not work out of the box. It will fail to connect to the graphql endpoint on localhost:4200. Sometimes it worked to set the docker internal ip of the container, sometimes it only worked to set the public ip (very insecure!), but it just never works out of the box - which is very annoying.
Am I missing something?
Steps I usually do
• new ubuntu server
• install docker (official repo) & docker-compose
• apt install python3 python3-dev python3-pip
• pip install prefect
• prefect backend server
• prefect server start
• prefect agent local start
And then I won't get a connection but it will redirect me to the "Welcome to your prefect ui" screen, where I try out one of the abovementioned IPs and - if I'm lucky - it will work, if not it will not work at all on that machine, even when pruning docker & reinstalling everything
curl localhost:4200, 127.0.0.1:4200, dockerinternalip:4200 all work fine
michael054: Hey <@U01QR9QMS4E>, this is concerning. I'll open an issue to track this in our Github repo as I'll need to spin up new machines to test this. One thing I've had success with in the past is using
pip install docker-compose
michael054: <@ULVA73B9P> open "Server consistently fails to start on Ubuntu" in server
Original thread can be found here.
The text was updated successfully, but these errors were encountered: