am i missing something
# prefect-community
n
am i missing something
j
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
Thanks @josh let me check
Unfortunately this did not work !!
n
Hi @Nazeer Hussain - what does your
config.toml
file contain?
n
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 150047,662] INFO - prefect-server.Scheduler | Scheduled 0 flow runs. scheduler_1 | [2020-06-12 150047,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
@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
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
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
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
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
yes
thats right
so should i remove the config.toml altogether? and go with the default ports and config of prefect?
n
Ok great. Then you need to open ports 4200 and 8080 on the machine ( you can do this through the AWS Console )
n
Yes, i did that in the Security groups
n
Can you access the UI at your machine's public IP address at port 8080?
n
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
We'll need to add the config again but it'll be good to start with a fresh one
n
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
Hold on
n
ok..
i am listening
n
I don't think this has anything to do with the API or the prefect installation
n
ok..
n
Your domain doesn't seem to be configured to route traffic to that IP address
n
ok probably I will do the nginx and test
it might be the issue
n
Ok sure, it's possible the machine isn't configured to receive that traffic on localhost
n
ok got it, i am fixing 🙂
s
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
Nope @Soham, same issue persists, i tried everything, will keep you posted