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

Camilo Fernandez

03/29/2022, 12:18 PM
Hello everyone, I have a local agent which is not executing my flow run. The flow has been registered in the prefect server. The local hello world task can be executed locally but it would not update the state in the UI. If I run
prefect run -i "efc4568a-1fbd-4a14-8ef1-f137bdb45fcf" --watch
I receive the following warning:
Copy code
WARNING | It has been 270 seconds and your flow run has not been submitted by an agent. Agent 122a102c-f083-48a8-b6f4-efd38e1b14f6 (agent) has matching labels and last queried a few seconds ago. It should deploy your flow run.
a

Anna Geller

03/29/2022, 12:21 PM
Looks like an issue with your agent. Can you restart the agent process?
also checking agent logs could be helpful to see if for some reason the agent can pick up the flow but cannot deploy it
you can also add debug logs to get more info:
Copy code
prefect agent local start --log-level DEBUG
c

Camilo Fernandez

03/29/2022, 12:42 PM
@Anna Geller the logs only show:
Copy code
[2022-03-29 12:28:59,862] DEBUG - agent | Sleeping flow run poller for 10.0 seconds...
[2022-03-29 12:29:09,862] DEBUG - agent | Querying for ready flow runs...
should the agent be set up with a specific tenant? I'm using prefect server and not the cloud version btw
a

Anna Geller

03/29/2022, 1:18 PM
1. What commands did you use to start the agent? 2. What commands did you use to start Server? 3. Can you share the flow code that can't get deployed, or at least its run_config and storage definition? 4. How did you register the flow?
c

Camilo Fernandez

03/29/2022, 1:23 PM
Thanks for your help 🎉, we could find out the agent needs to be given the tenant id. Passing it in this way worked like a charm:
prefect agent local start --tenant-id 0446d311-00bc-452d-bc9c-f341385285345
a

Anna Geller

03/29/2022, 1:39 PM
Thanks for the update, glad you figured it out!