https://prefect.io logo
Title
a

Anish Chhaparwal

09/10/2020, 7:14 PM
Hello, I've set up prefect version 0.13.5 on a ec2 instance and trying to connect to graphql api via the ui. I fire up the server using --ui-port 8888 to change the default port from 8080 to 8888 and have set up the config file as shown in the image. When i browse to the UI i am unable to connect to graphql endpoint. it shows unable to connect to Http://Http😕/<IP_address>:4200. I am unable to get rid of the extra Http:// even when setting endpoint using the dashboard on prefect UI. Been adviced to check if apollo is exposed correctly on the machine im running on. I cannot find the default port for apollo. Do the --server-port tags in prefect server start refer to apollo? How I could set up apollo endpoint using the cli... something on the lines of prefect server start --ui-port- 8888.
@nicholas can you suggest how i can config my apollo?
n

nicholas

09/10/2020, 8:31 PM
Hi @Anish Chhaparwal - thanks for starting the thread here. There are just 2 ports you'll need to expose on your machine: 4200 (for Apollo) and 8888 (for the UI since you've changed that). You shouldn't need to change anything by default for this, you'll just need to expose that port in your machine's config.
a

Anish Chhaparwal

09/10/2020, 9:08 PM
I am running on a VM and do not have access to open ports. By any chance can we redirect apollo to another port say 8887? if so what changes do i need to make?
n

nicholas

09/10/2020, 9:11 PM
You can use
--server-port 8887
OR you can set
host_port
in
~/.prefect/config.toml
like this:
[server]
host_port=8887
a

Anish Chhaparwal

09/11/2020, 12:30 AM
Hey I finally managed to connect to graphql. Unfortunately, everything isnt fine. I am unable to go to the dashboard page. Even though i click on it nothing happens. i remain on the same page. same with interactive api. now i am able to open the graphql on the browser so i know that it isnt the problem. additionally when i try and register my flow i get the error attached in the picture.
if i append the url at the end with /api or /dashboard i get redirected to the /home page
n

nicholas

09/11/2020, 3:18 AM
@Anish Chhaparwal how did you start your server? With
prefect server start
? The circumstances in which you'll be forced to the home page are when you have no tenant; the tenant should be created automatically with the above command
a

Anish Chhaparwal

09/11/2020, 4:13 AM
I used prefect backend server followed by prefect server start. How can i resolve this issue?
n

nicholas

09/11/2020, 4:17 AM
Try running the command that's on the home page under the
TENANT
tab - it looks to be visible in the screenshot you sent.
then refresh your UI
a

Anish Chhaparwal

09/12/2020, 5:55 AM
Hello nicholas the method you suggested works but how do i get it to create tenant from default?