https://prefect.io logo
b

Benoît Linsey-Fazi

01/04/2023, 2:01 PM
Hello, I am currently trying to set a prefect orion server in a docker on an EC2, however this error appears on the UI
Copy code
Can't connect to Orion API at <http://0.0.0.0:80/api>. Check that it's accessible from your machine.
Can't find any help on internet besides doing
Copy code
prefect config set PREFECT_API_URL=<http://0.0.0.0:80/api>
Any ideas ?
1
r

Ryan Peden

01/04/2023, 2:17 PM
It should work if you set PREFECT_API_URL to the externally-visible address of your server (with
/api
still added to the end). The UI will pick that up when it starts, and then when you load the UI it will use the correct address to contact the API.
b

Benoît Linsey-Fazi

01/04/2023, 2:25 PM
@Aymeric Alixe
Thank you @Ryan Peden it worked
r

Ryan Peden

01/04/2023, 2:32 PM
You're welcome! Glad to hear it worked.
b

Benoît Linsey-Fazi

01/04/2023, 2:52 PM
Actually it did not worked completely, now when trying to create a work queue from the UI, we have this message :
Copy code
Error occured when trying to create new work queue
Which is fairly obscure ^^
r

Ryan Peden

01/04/2023, 3:09 PM
I haven't seen that one before. Do any errors show up in the browser dev tools console?
a

Aymeric Alixe

01/04/2023, 5:09 PM
@Ryan Peden Yes, we found that there is a 405 response for a request to
<http://xx.xx.xx.xx:4200/xx.xx.xx.xx:4200/api/work_queues/>
. We use this dockerfile to run the server :
Copy code
FROM python:3.9.16

RUN pip install prefect prefect[aws]
RUN prefect config set PREFECT_API_URL=http:/xx.xx.xx.xx:4200/api
CMD ["prefect", "orion", "start", "--host", "0.0.0.0"]
b

Benoît Linsey-Fazi

01/05/2023, 1:06 PM
Hi @Ryan Peden, do you have any ideas on that matter ? Thank you very much
r

Ryan Peden

01/05/2023, 1:17 PM
I will take a look today - that looks like it might be a bug. If so I'll open an issue and see if there's an easy workaround.
b

Benoît Linsey-Fazi

01/05/2023, 2:56 PM
Thank you Ryan, I hope you'll find the issue 😄
Hello Ryan, I've found the issue, it was the typo in PREFECT_API_URL. We wasted a lot of time for this missing slash 😂
r

Ryan Peden

01/06/2023, 2:41 PM
Thanks for the follow-up! It's easy to miss that typo; I didn't notice it either. When I set up my local test environment, I just typed in the address for my own machine, so I didn't catch the missing slash in your URL.
2 Views