Romain Vincent
06/27/2023, 8:52 AMcommand = ["prefect", "server", "start", "--host", "0.0.0.0"]
environment = [
{
name = "PREFECT_UI_API_URL",
value = "http://${aws_lb.prefect_ecs_alb[0].dns_name}:4200/api"
#value = "<http://0.0.0.0:4200/api>"
},
{
name = "PREFECT_API_URL",
value = "http://${aws_lb.prefect_ecs_alb[0].dns_name}:4200/api"
#value = "<http://0.0.0.0:4200/api>"
},
{
name = "PREFECT_SERVER_API_HOST",
value = "${aws_lb.prefect_ecs_alb[0].dns_name}",
#value = "0.0.0.0"
},
{
name = "PREFECT_UI_URL",
value = "http://${aws_lb.prefect_ecs_alb[0].dns_name}:4200"
#value = "<http://0.0.0.0:4200>"
}
],
I keep getting Can't connect to server api
errors or a black screen. It seems I can reach the server from my local development machine though. Is there any ressource available for this kind of issue?PREFECT_UI_API_URL
as the LB dns, we had a few small JS errors popping in the background of the UI while the API was still reachable. After some research, I seemed that these were related to SSL encryption. So we set up an actual domain name for our server and associated an SSL certificate to our LB. Then we set PREFECT_UI_API_URL
as the https url pointing to that domain and it worked. So either prefect could not resolve the LB dns name or Prefect required HTTPS to work properly, but in the end it worked!