https://prefect.io logo
Title
j

Julio Venegas

12/10/2020, 3:35 PM
Hi everyone, I have an issue launching prefect server from an EC2 instance, when I access the dashboard, it won’t load anything. Anyone had this issue before?
z

Zanie

12/10/2020, 3:50 PM
Does the API connection indicator in the top right show that you are successfully connected?
Have you created the default tenant?
j

Julio Venegas

12/10/2020, 3:58 PM
Hi Michael, checked the API connection, it isn’t “Couldn’t connect to Prefect Server at http://localhost:4200/graphql
z

Zanie

12/10/2020, 3:58 PM
Yep! So you’ll need to update the UI to point to the apollo deployment on your EC2 instance
If you go to the home page there be a tab that lets you set the api url
j

Julio Venegas

12/10/2020, 4:01 PM
you mean this one?
z

Zanie

12/10/2020, 4:01 PM
Yep!
j

Julio Venegas

12/10/2020, 4:02 PM
Ok, so what is there to change, I have not made any changes to the default
config.toml
z

Zanie

12/10/2020, 4:02 PM
The box where it says “Prefect Server GraphQL endpoint”
j

Julio Venegas

12/10/2020, 4:03 PM
ok ok, got it, let me try that out
z

Zanie

12/10/2020, 4:03 PM
When you’re using the UI, your browser is sending requests directly to the API (pretty standard modern javascript) so your browser is trying to hit the api at
localhost:4200/graphql
but the api is running on an EC2 instance not locally
j

Julio Venegas

12/10/2020, 4:07 PM
Thanks! It’s odd, because as part of my initial user-data script for the instance, I changed the toml so that the actual EC2 instance host is set for graphql
will destroy the instance and recreate it, I probably have an issue changing the config.toml at launch
z

Zanie

12/10/2020, 4:09 PM
Do you also update the
apollo_url
in the config?
[server.ui]
    host = "<http://localhost>"
    port = "8080"
    host_port = "8080"
    endpoint = "${server.ui.host}:${server.ui.port}"
    apollo_url = "<http://localhost:4200/graphql>"
j

Julio Venegas

12/10/2020, 4:09 PM
yep, exactly that line. Actually, I’m only changing that line.
@Zanie all good, I had a typo in user data script, it works now 😄
z

Zanie

12/10/2020, 4:16 PM
Wonderful!
j

Julio Venegas

12/10/2020, 4:16 PM
Thanks for the super fast help!!
c

Chris White

12/10/2020, 4:21 PM
@Marvin archive “UI is blank after deploying Prefect Server from an EC2 instance”