Hello all. I have been trying to configure Prefect...
# prefect-server
Hello all. I have been trying to configure Prefect Server on a Debian/GNU Linux 10 VM and I encounter a problem. I have a conda env with prefect installed, docker and docker-compose installed as well. I can launch the server with prefect server start --expose (cannot seem to access the UI from my computer without the "--expose" part), but I got a "Couldn't connect to Prefect Server at http://localhost:4200/graphql" issue. It seems to be the same problem that the one Krishna had here: https://prefect-community.slack.com/archives/CL09KU1K7/p1636636632389000. I have attached the return of a prefect diagnostics command, and it seems that my docker containers have enough memory (16GB per container). My company is against the fact that I use Prefect Cloud. Finally, I can run Flows manually with 'prefect run -n "flow_to_test" --execute'. Anyone has any idea about my issue? Thank you very much!
@Alexis Lucido I think your problem is a bit different than Krishna’s because you’re not running it locally on a macbook but rather on a remote VM. 1. Did you configure the firewall rules on your VM? you need to open ports 8080 and 4200. 2. Where is the VM running - on AWS/GCP, or some on-prem server?
this blog post can be useful since it discussed how to deploy Server with docker-compose on a VM on GKE https://medium.com/the-prefect-blog/prefect-server-101-deploying-to-google-cloud-platform-47354b16afe2 Specifically this part:
You’ve got to configure the UI to connect to your remote host as well. Here, it’s attempting to connect to your local machine.
upvote 1
@Alexis Lucido from the same blog post, you can use this section
Thank you for these answer. The VM is on-prem. My ports were opened, and I want both the UI and the server to run on the same VM. However, I want to be able to access the UI from my computer. In Airflow's layman's terms (coming from Airflow), I want to run both "airflow scheduler" and "airflow webserver" on my VM, and access the webserver from my computer (or anywhere on the company's private network)
As both the UI and the Server are launched from the same machine and from a single "prefect server start" command, is there any specific url reconfiguration to use? Sorry if this is a newbie question
The client’s browser connects directly to the Apollo API when they go to the UI. By default, the UI attempts to use
. Each client can change this connection url in the UI itself, you can set it to
. Additionally, you can change the default connection url by doing the configuration shared by Anna.
Ok, it is clearer now. Gonna try it tomorrow and come back to this thread afterwards. Thank you very much!
It works! Thank you so much. I am now gonna set-up a custom backend db and work on Great Expectations integration into Prefect UI. Already love your product!
🙌 1