Hey guys, one question... I experienced this on mu...
# ask-community
j
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
z
Hey @Justin, 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
@Marvin open "Server consistently fails to start on Ubuntu" in server
j
Nice, thanks @Zanie, will provide more details over there
z
Logs of the startup would be helpful
Also to clarify, you're trying to access the UI on the same machine as the Server?
j
yes
or wait, the server is running on a remote aws machine, and i am connecting through publicip:8080
z
Ah -- in the middle of a response on GH so I'll finish there. tldr; the API at 4200 must be accessible from the machine of the user of the UI.
j
ah that sounds good! but isn't that like a huge security risk if I expose port 4200? shouldn't it work like a classic setup, e.g. wordpress accessing the db locally and only port 443 is exposed?
z
So much of modern javascript runs client-side. The UI could proxy the requests but isn't designed to do so now (and would be non-trivial to do so).
Server was torn out of Cloud which must have a public API and uses auth to protect it. Ideally, you're hosting Server within a closed VPC so it's not a security risk.
j
alright, perfect! just wasn't clear to me, but thanks for your help