https://prefect.io logo
Title
t

Talha

05/11/2021, 2:53 PM
Hi I am trying to connect to the prefect server on localhost:8080. But i am working in a firm where we use HTTP and HTTPS proxies. The prefect server doesnot connect if i don't bipass the proxy. And when I bypass the proxy the flow does not run, as one of the task is api data fetching which needs Proxies. What is the way around it? You can see in picture I am trying to set the Http and https env in the run config as well. If i don't put the os.environ to empty. Then I get the following error: "error 503: cannot connect to localhost:4200" which is my apollo docker port.
n

nicholas

05/11/2021, 3:14 PM
Hi @Talha - can you help me understand your setup a little more? Where did you start Prefect Server, is it on your local machine or a remote machine somewhere? When you say that Prefect Server doesn't connect, do you mean your UI can't connect to the API or something else?
t

Talha

05/11/2021, 3:51 PM
I am working on my local system. But my work network works on proxy server. for Htttp and https.
t

Tyler Wanner

05/11/2021, 3:51 PM
also, is this proxy running on some remote environment? can you normally reach other localhost endpoints through the proxy?
t

Talha

05/11/2021, 3:53 PM
If i have http and https as env variables set in my windows User env variables. And yes I can access localhost when I am working with VS code on my angular project.
It is just with the prefect UI. That it does not worked. Flow.run on my python script works fine even if I have env variables in my window system set.
only I can register flow, use client command to create a project. If I run flow from UI. I can get my api fetched as proxy is not set.
See this is the error i get if i don't by pass my proxy
t

Tyler Wanner

05/11/2021, 3:58 PM
when you say you can register flow and use the client, is that ONLY when bypassing the proxy?
t

Talha

05/11/2021, 4:28 PM
To se
to start the server or agent through cmd
I have to bypass the proxy
I have even tried the run.config as well to set the ENV variables but it did not worked
t

Tyler Wanner

05/11/2021, 4:45 PM
would it be too much lift to try running server on a remote instance?
it seems like the proxy is having trouble connecting to localhost in a way that server is listening
t

Talha

05/12/2021, 9:12 AM
What do you mean by remote instances ?
I am just using my local machine. Do you want me to run the
server on the AWS or something