https://prefect.io logo
Title
d

dev

12/24/2021, 10:48 AM
Hello everyone. I am using prefect server and local agent to setup. The prefect agent keeps throwing 
ERROR - agent | Failed to query for ready flow runs
, even though I am able to run the flows.
Traceback of the error
Traceback (most recent call last):
  File "/.venv/lib/python3.9/site-packages/prefect/agent/agent.py", line 323, in _submit_deploy_flow_run_jobs
    flow_run_ids = self._get_ready_flow_runs()
  File "/.venv/lib/python3.9/site-packages/prefect/agent/agent.py", line 574, in _get_ready_flow_runs
    result = self.client.graphql(
  File "/.venv/lib/python3.9/site-packages/prefect/client/client.py", line 569, in graphql
    raise ClientError(result["errors"])
prefect.exceptions.ClientError: [{'message': 'An unknown error occurred.', 'locations': [{'line': 2, 'column': 5}], 'path': ['get_runs_in_queue'], 'extensions': {'code': 'INTERNAL_SERVER_ERROR', 'exception': {'message': 'An unknown error occurred.'}}}]
a

Anna Geller

12/24/2021, 10:56 AM
It looks like a version mismatch issue. Make sure that your Server has a Prefect version which is >= the Prefect version used in the registration environment and on your agent.
d

dev

12/24/2021, 11:07 AM
Hi @Anna Geller I am running
0.15.10
in both the places ie server and registration/agent env.
a

Anna Geller

12/24/2021, 1:24 PM
Can you reregister and see if this fixed the issue? How did you register this flow - did you use the prefect register CLI? I would recommend registering with the CLI. Also, did you explicitly define storage and run config?
d

dev

12/29/2021, 11:42 AM
I tried with reregister, but the issue didn't go away. I am not using the CLI as I am trying to register through code using flow.register(). No, as I am using local run, didn't explicitly define storage and run config. I will do that and see if anything changes.
👍 1