Hi I am experiencing issue with `UI` as it not sho...
# prefect-community
b
Hi I am experiencing issue with
UI
as it not showing any
flows
and
runs
. I register flow with success and see in agent logs and server logs that flow runs when is scheduled but I have no information about flows and runs in
UI
.
a
Hi. I had the same situation when accessing the UI from another machine, then noticed in the browser's network activity requests to
localhost:4200
. Worked around it by SSH-forwarding the 4200 port. I noticed an environment setting that might help in the compose file: https://github.com/PrefectHQ/prefect/blob/master/server/docker/docker-compose.yml#L90, will try to see if it does the trick.
n
Hi again @Bartek ! There's no need to port forward if you're on another machine; you'll just need to let Prefect Server know where the GraphQL API is deployed by setting the server graphql_url in
~/.prefect/config.toml
like such:
Copy code
[server]
    [server.ui]
    graphql_url = "your_graphql_endpoint:4200/graphql"
Note, that's the
config.toml
present on the machine you're deploying Prefect Server, and you'll need to restart the Server for changes to apply.
a
Hi @nicholas, thanks for the hint, that helped me as well. Browser requests now go to the Prefect server machine, however they're getting
405
response codes.
n
Hm that's interesting, are the correct ports open (you'll need 4200 and 8080 unless you set up an external webserver)?
And you'll want to make sure your config endpoint ends with
/graphql
, since that's the route GraphQL serves requests from
a
Yes, all the mapped ports are per the defaults.
n
@Andrei Duhnea are you able to post the full response you get in the UI from the server?
a
Hmm, I think I see what's wrong, it's using that config as a route to the UI endpoint:
Copy code
"POST /10.0.10.72:4200/graphql/ HTTP/1.1" 405 157 "<http://10.0.10.72:8080/>"
The request goes to
<http://10.0.10.72:8080/10.0.10.72:4200/graphql/>
And my config has
Copy code
[server.ui]
graphql_url = "10.0.10.72:4200/graphql"
The full response is
Copy code
<html>
<head><title>405 Not Allowed</title></head>
<body>
<center><h1>405 Not Allowed</h1></center>
<hr><center>nginx/1.18.0</center>
</body>
</html>
n
Oh interesting, ok I think you need to add "http://" to the front of your
graphql_url
a
yep, that was it
the missing scheme made it look like a relative path I guess
all good now
thank you
n
Great! Happy to help, this is good for me to know too, didn't realize that would be interpreted as a relative path without the protocol
b
thanks @nicholas @Andrei Duhnea
😄 1
unfortunately I still cannot see any flows and runs in my UI. I have check path to
graphql
and it works but in UI still no info about flows and runs
the url was correctly changed according to logs
n
@Bartek are you able to successfully call
flow.register()
?
b
Yes
n
Hm interesting. If you're able to successfully register flows, that tells me the
graphql_url
variable set in
~/.prefect/config.toml
is incorrect for some reason. Can you share what you've got there?
b
Sorry @nicholas it works now. Probably I did something wrong previously. Thanks again 🙂
n
No worries at all, glad you got it figured out @Bartek!