Hi Everyone, Does anyone here have any advice for...
# prefect-server
l
Hi Everyone, Does anyone here have any advice for running the prefect server behind a HTTP proxy? I am having all sorts of trouble running the server. All the containers startup, but the UI cant connect to the backend, and also, any agents I run cant connect.. Everything is running in the same docker-network, I have the 'NO_PROXY=localhost,127.0.0.1' env set.. If I remove the HTTP_PROXY env variables the server works fine, but my agent can't get to the outside world to download pip packages etc.. If I leave the HTTP_PROXY env variable in.. the server UI/agents can't seem to talk to the backed. Any help would be much-appreciated 😄. (Also, full disclosure, I had raised an issue on git hub for basically this, but closed it because I thought I had fixed the problem (https://github.com/PrefectHQ/prefect/issues/4859) turns outs that while I got the server running I lost internet access in the process, but I have since found this community so though I would ask here instead of raising issues on github :D)
k
Hey @Luke Kentwell, not sure I can help but how did you configure the UI? Did you do something like this to point it to the proxy? Either setting it in the UI or through the
config.toml
. And then for agents, they should point using:
Copy code
[server]
endpoint = "YOUR_IP:4200/graphql"
Assuming it can connect
Seems like you are hitting localhost in your Github issue, but want to be hitting the proxy address instead?
l
Hi @Kevin Kho, thanks for assisting 😄 Should I set the server.ui value to the proxy address on my network?
k
it would be whatever address the agent needs to talk to and then the port 4200/graphql
Fast forward to “Starting Prefect Server” here. Maybe it will give a good idea.
l
ta, I think ive got it.. I set the apollo_url to my servers url and the endpoint to the gateway address for the prefect_server docker network. I also had to set the no_proxy for that prefect_server networks subnet on my agent containers
👍 1