https://prefect.io logo
Title
n

Nazeer Hussain

06/12/2020, 9:11 AM
am i missing something
j

josh

06/12/2020, 12:57 PM
Hey @Nazeer Hussain someone opened an issue, which I think is related, here https://github.com/PrefectHQ/prefect/issues/2759 They ended up pruning their docker system and it appears to have worked. This seems to be due to docker’s default caching semantics
n

Nazeer Hussain

06/12/2020, 12:58 PM
Thanks @josh let me check
Unfortunately this did not work !!
n

nicholas

06/12/2020, 3:01 PM
Hi @Nazeer Hussain - what does your
config.toml
file contain?
n

Nazeer Hussain

06/12/2020, 3:01 PM
let me get that, one moment plz
backend = "server" [server] host = "http://prefect.naazit.com" port = "4200" host_port = "4200" endpoint = "${server.host}:${server.port}" [server.graphql] host = "prefect.naazit.com" [server.ui] host = "http://prefect.naazit.com" port = "8081" host_port = "8081" endpoint = "${server.ui.host}:${server.ui.port}" graphql_url = "http://prefect.naazit.com:4200/graphql"
oh i think i made a mistake
just give me a moment please
@nicholas
[ec2-user@ip-172-31-1-219 ~]$ cat .prefect/config.toml backend = "server" [server] host = "http://prefect.naazit.com" port = "4200" host_port = "4200" endpoint = "${server.host}:${server.port}" [server.graphql] host = "prefect.naazit.com" [server.ui] host = "http://prefect.naazit.com" port = "8080" host_port = "8080" endpoint = "${server.ui.host}:${server.ui.port}" graphql_url = "http://prefect.naazit.com:4200/graphql"
i changed the port to 8080
but still i am unable to access the Prefect UI at : http://prefect.naazit.com:8080/
in the prefect start server it shows this log : scheduler_1 | [2020-06-12 15:00:47,662] INFO - prefect-server.Scheduler | Scheduled 0 flow runs. scheduler_1 | [2020-06-12 15:00:47,763] DEBUG - prefect-server.Scheduler | Sleeping for 300.0 seconds... ui_1     | /var/www/js/welcome.df9a970c.js ui_1     | 👾👾👾 UI running at localhost:8080 👾👾👾
UI running at localhost:8080
n

nicholas

06/12/2020, 3:13 PM
@Nazeer Hussain - the
prefect server start
only runs a local version of the Prefect application. You'll need to configure your own webserver to route external traffic to the application. In this case you could use something like `nginx`'s proxypass to serve traffic to localhost:4200 and localhost:8080.
n

Nazeer Hussain

06/12/2020, 3:14 PM
ok let me try that @nicholas thank you, i will get back to you shortly
so I need to remove the config.toml?
and just handle it with nginx
n

nicholas

06/12/2020, 3:17 PM
I misspoke there, my apologies - since you're trying to access the ports directly on the machine you shouldn't need to use a webserver; you will need to configure your DNS records to route to that (which I'm assuming you've already done), and you'll need to open up those ports on your machine to external traffic
n

Nazeer Hussain

06/12/2020, 3:17 PM
I am doing this on AWS EC2 instance on Amazon Linux
So i assume i will run the prefect locally and handle the reverse proxy via nginx
is that a fair understanding
n

nicholas

06/12/2020, 3:19 PM
Hm I'm not sure. When I say locally, I mean local to the machine where you're deploying the application
You're running
prefect server start
on your ec2, correct?
n

Nazeer Hussain

06/12/2020, 3:19 PM
yes
thats right
so should i remove the config.toml altogether? and go with the default ports and config of prefect?
n

nicholas

06/12/2020, 3:20 PM
Ok great. Then you need to open ports 4200 and 8080 on the machine ( you can do this through the AWS Console )
n

Nazeer Hussain

06/12/2020, 3:20 PM
Yes, i did that in the Security groups
n

nicholas

06/12/2020, 3:20 PM
Can you access the UI at your machine's public IP address at port 8080?
n

Nazeer Hussain

06/12/2020, 3:21 PM
yes public IP it works, except the API status issue with graphql
let me get that URL
i will erase the config file and spin up in a min
n

nicholas

06/12/2020, 3:21 PM
We'll need to add the config again but it'll be good to start with a fresh one
n

Nazeer Hussain

06/12/2020, 3:21 PM
you can see that the API status is still down 😞
let me erase the config.toml from .prefect/config.toml and configure the nginx?
n

nicholas

06/12/2020, 3:22 PM
Hold on
n

Nazeer Hussain

06/12/2020, 3:22 PM
ok..
i am listening
n

nicholas

06/12/2020, 3:23 PM
I don't think this has anything to do with the API or the prefect installation
n

Nazeer Hussain

06/12/2020, 3:23 PM
ok..
n

nicholas

06/12/2020, 3:23 PM
Your domain doesn't seem to be configured to route traffic to that IP address
n

Nazeer Hussain

06/12/2020, 3:24 PM
ok probably I will do the nginx and test
it might be the issue
n

nicholas

06/12/2020, 3:25 PM
Ok sure, it's possible the machine isn't configured to receive that traffic on localhost
n

Nazeer Hussain

06/12/2020, 3:25 PM
ok got it, i am fixing 🙂
s

Soham

06/13/2020, 12:27 PM
just curious..were you able to fix this Nazeer.. i'm having literally the sample problem.. trying to deploy this on an ec2.. would love to know if you were able to solve
i'm also seeing the same API status error
update: everything seemed to start working fine once i registered a flow!
i'm trying on a separate server today and the problem seems to be back.. so @Nazeer Hussain do lmk if you found some solution. thanks
n

Nazeer Hussain

06/15/2020, 11:52 AM
Nope @Soham, same issue persists, i tried everything, will keep you posted