https://prefect.io logo
Title
b

Bartek

05/13/2020, 1:11 PM
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

Andrei Duhnea

05/13/2020, 1:33 PM
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

nicholas

05/13/2020, 1:46 PM
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:
[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

Andrei Duhnea

05/13/2020, 1:56 PM
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

nicholas

05/13/2020, 1:59 PM
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

Andrei Duhnea

05/13/2020, 2:06 PM
Yes, all the mapped ports are per the defaults.
n

nicholas

05/13/2020, 2:08 PM
@Andrei Duhnea are you able to post the full response you get in the UI from the server?
a

Andrei Duhnea

05/13/2020, 2:08 PM
Hmm, I think I see what's wrong, it's using that config as a route to the UI endpoint:
"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
[server.ui]
graphql_url = "10.0.10.72:4200/graphql"
The full response is
<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

nicholas

05/13/2020, 2:18 PM
Oh interesting, ok I think you need to add "http://" to the front of your
graphql_url
a

Andrei Duhnea

05/13/2020, 2:19 PM
yep, that was it
the missing scheme made it look like a relative path I guess
all good now
thank you
n

nicholas

05/13/2020, 2:20 PM
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

Bartek

05/13/2020, 7:17 PM
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

nicholas

05/13/2020, 8:19 PM
@Bartek are you able to successfully call
flow.register()
?
b

Bartek

05/13/2020, 9:14 PM
Yes
n

nicholas

05/13/2020, 9:17 PM
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

Bartek

05/14/2020, 5:49 AM
Sorry @nicholas it works now. Probably I did something wrong previously. Thanks again 🙂
n

nicholas

05/14/2020, 1:23 PM
No worries at all, glad you got it figured out @Bartek!