Anish Chhaparwal

    Anish Chhaparwal

    2 years ago
    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?
    nicholas

    nicholas

    2 years ago
    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.
    Anish Chhaparwal

    Anish Chhaparwal

    2 years ago
    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?
    nicholas

    nicholas

    2 years ago
    You can use
    --server-port 8887
    OR you can set
    host_port
    in
    ~/.prefect/config.toml
    like this:
    [server]
    host_port=8887
    Anish Chhaparwal

    Anish Chhaparwal

    2 years ago
    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
    nicholas

    nicholas

    2 years ago
    @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
    Anish Chhaparwal

    Anish Chhaparwal

    2 years ago
    I used prefect backend server followed by prefect server start. How can i resolve this issue?
    nicholas

    nicholas

    2 years ago
    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
    Anish Chhaparwal

    Anish Chhaparwal

    2 years ago
    Hello nicholas the method you suggested works but how do i get it to create tenant from default?