https://prefect.io logo
#prefect-community
Title
# prefect-community
b

Bennett Lambert

03/29/2022, 7:21 AM
Hi all, I am having a problem with creating an agent using prefect server as a backend. When I try to kubectl apply the agent manifest I get the following error:
Copy code
prefect.exceptions.ClientError: Malformed response received from API.
discourse 1
My config.toml looks as follows:
Copy code
[server]
host = "<http://10.2.36.47>"
endpoint = "<http://10.2.36.47:4200/graphql>"
backend = "server"
a

Anna Geller

03/29/2022, 10:00 AM
There are several ways how you can configure that. CLI
Copy code
prefect backend server
This will update the
~/.prefect/backend.toml
file to “server” as well. Using an environment variable
Copy code
export PREFECT__BACKEND="server"
In a Kubernetes YAML manifest When deploying to Kubernetes, you can do: You need to add the following environment variables:
Copy code
env:
        - name: PREFECT__BACKEND
          value: server
        - name: PREFECT__CLOUD__AGENT__AUTH_TOKEN
          value: ''
        - name: PREFECT__CLOUD__API
          value: "<http://some_ip:4200/graphql>" # paste your GraphQL Server endpoint here
b

Bennett Lambert

03/29/2022, 10:11 AM
Thanks for your response! I updated the yaml and now I get HTTP Connection read timed out. Is there a way to increase the timeout duration using environment variables?
Copy code
export PREFECT__CLOUD__REQUEST_TIMEOUT=60
b

Bennett Lambert

03/29/2022, 10:29 AM
thanks very much for the support!
👍 1
In this case I was able to get it running and the issue was that I did not have a tenant in Prefect Server. However now when I try to register a flow I get a HTTPConnectionPool Error. I tried increasing the timeout, but no luck. I believe it is an issue with our company proxy. Is there a way to provide prefect with proxy authentication information?
I figured it out! Adding the server to the NO_PROXY environment variable fixed this issue
upvote 1
a

Anna Geller

03/29/2022, 11:21 AM
@Bennett Lambert thanks a lot, this will be helpful to other users 👏
22 Views