Hi everyone, I have an issue launching prefect ser...
# prefect-server
j
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
Does the API connection indicator in the top right show that you are successfully connected?
Have you created the default tenant?
j
Hi Michael, checked the API connection, it isn’t “Couldn’t connect to Prefect Server at http://localhost:4200/graphql
z
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
you mean this one?
z
Yep!
j
Ok, so what is there to change, I have not made any changes to the default
config.toml
z
The box where it says “Prefect Server GraphQL endpoint”
j
ok ok, got it, let me try that out
z
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
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
Do you also update the
apollo_url
in the config?
Copy code
[server.ui]
    host = "<http://localhost>"
    port = "8080"
    host_port = "8080"
    endpoint = "${server.ui.host}:${server.ui.port}"
    apollo_url = "<http://localhost:4200/graphql>"
j
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
Wonderful!
j
Thanks for the super fast help!!
c
@Marvin archive “UI is blank after deploying Prefect Server from an EC2 instance”