t

    Talha

    1 year ago
    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.
    nicholas

    nicholas

    1 year ago
    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

    1 year ago
    I am working on my local system. But my work network works on proxy server. for Htttp and https.
    Tyler Wanner

    Tyler Wanner

    1 year ago
    also, is this proxy running on some remote environment? can you normally reach other localhost endpoints through the proxy?
    t

    Talha

    1 year ago
    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
    Tyler Wanner

    Tyler Wanner

    1 year ago
    when you say you can register flow and use the client, is that ONLY when bypassing the proxy?
    t

    Talha

    1 year ago
    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
    Tyler Wanner

    Tyler Wanner

    1 year ago
    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

    1 year ago
    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