How can I open the 4200 port to all interfaces? It...
# ask-community
k
How can I open the 4200 port to all interfaces? It runs on a server an not on my laptop
k
It sounds like you would need to open that on the machine the server is running on. That would vary depending what you use to host.
k
PREFECT_ORION_API_HOST=0.0.0.0 probably
I should be open on the machine. But the server does not listen on the interface:
My env variable did not help, same as before:
root@f14dddcd9a5f:/app# PREFECT_ORION_API_HOST=0.0.0.0 && prefect orion start
Starting Orion API server...
INFO:     Started server process [153]
INFO:     Waiting for application startup.
23:52:06.228 | Scheduled 0 runs.
23:52:06.230 | Finished monitoring for late runs.
Starting agent connected to <http://127.0.0.1:4200/api/>...
Agent started! Checking for flow runs...
INFO:     127.0.0.1:42832 - "POST /api/flow_runs/filter HTTP/1.1" 200 OK
23:52:11.173 | Finished monitoring for late runs.
INFO:     127.0.0.1:42834 - "POST /api/flow_runs/filter HTTP/1.1" 200 OK
k
Oh I see what you mean. I think Orion doesn’t support agents connecting remotely to the API yet but will double check.
k
I found a workaround
I patched prefect/utilities/settings.py in my pip folder
I replaced 127.0.0.1 with 0.0.0.0 in the following code and it now listens on all interfaces:
host: str = Field(
"0.0.0.0",
`description="""The API's host address (defaults to
127.0.0.1
).""",
Copy code
)`
This was necessary because I am running it in a docker container
k
Ah I see
This might be hard to use because we only have local storage right now