So in troubleshooting an error having to do with d...
# ask-community
s
So in troubleshooting an error having to do with differences in python versions, I somehow broke what little I had working earlier today. Can anyone shed light on the following error:
Copy code
ERROR - <name> | Failed to query for flow run metadata

Traceback (most recent call last):
  File "/home/ubuntu/.local/lib/python3.8/site-packages/prefect/agent/agent.py", line 324, in _submit_deploy_flow_run_jobs
    flow_runs = self._get_flow_run_metadata(flow_run_ids)
  File "/home/ubuntu/.local/lib/python3.8/site-packages/prefect/agent/agent.py", line 684, in _get_flow_run_metadata
    result = self.client.graphql(query)
  File "/home/ubuntu/.local/lib/python3.8/site-packages/prefect/client/client.py", line 319, in graphql
    raise ClientError(result["errors"])
prefect.utilities.exceptions.ClientError: [{'path': ['flow_run', 0, 'id'], 'message': 'Cannot return null for non-nullable field flow_run.id.', 'extensions': {'code': 'INTERNAL_SERVER_ERROR'}}]
I rebuilt my agent (was planning to anyway) but same error right away upon launching. I deleted and reinitialized my project. It doesn’t seem like I’m doing anything differently than before when the agent appeared happy but my issue was further down the line. Really mystified right now, but I’m a bit frazzled from working it so many hours…maybe I’m missing something obvious? (I’m also not the least bit experienced with Prefect - nor very much with AirFlow.)
m
Hello Scott! What version of Prefect are you using?
s
Hi Mariia, running fresh installs of 0.14.21 on the agent side - in both Ubuntu and Amazon Linux. Same type of output shown in both cases.
Couldn’t help but notice the API Release was just yesterday morning - possibly related? Everything seemed to be working fine as far as the agent registering but then yesterday all of the sudden I started seeing the errors scrolling by every ~10 seconds.
m
And one more question: what's the version of Prefect of the registered flow which errors? You can find it in UI flow dashboard.
s
Hi Mariia, just as a quick clarification, these errors kick off just as soon as I initiate the prefect agent - regardless of flows. If I push a flow from Python (currently 3.8.10 but also tried 3.9), it will just show up as late in the dashboard. So I’ll attach a screen shot of the flow I’ve been trying to get working, but I just deleted that and kicked of the agent again and the errors begin to “flow” right away 🙂
z
Hey @Scott Vermillion -- we're continuing to investigate this. Could you also share the output of
prefect diagnostics
?
Are you continuing to encounter this error?
s
Hey Michael! So it looks as though at the moment the errors have quieted down. Nevertheless, here’s the requested info from both of my agents: ubuntu@ip-172-31-33-202:~$ prefect diagnostics { “config_overrides”: {}, “env_vars”: [], “system_information”: { “platform”: “Linux-5.8.0-1035-aws-x86_64-with-glibc2.29”, “prefect_backend”: “cloud”, “prefect_version”: “0.14.21”, “python_version”: “3.8.5” } } [ec2-user@ip-172-31-32-115 ~]$ prefect diagnostics { “config_overrides”: {}, “env_vars”: [], “system_information”: { “platform”: “Linux-4.14.232-176.381.amzn2.x86_64-x86_64-with-glibc2.2.5", “prefect_backend”: “cloud”, “prefect_version”: “0.14.21", “python_version”: “3.7.9" } }
Sorry, @Zanie I should have tagged you in that response
Hi again all. So it kinda right now looks like things are back where I started yesterday - there’s something wrong somewhere in my environment that I need to fix (and may well need help fixing), but whatever this other strange thing was is currently dormant. I have a crew at the house today putting up a couple of new decks, and I’m pretty involved in the process - just checking in here with this Slack channel as often as I get the chance. I’ll continue to do so until class kicks off tonight @ 18:00 MST and then probably again a few hours thereafter…
z
I will look into this today if I can. If you could turn in debug level logs for the agent and give the logs up to the error that'd be helpful!
e.g.
PREFECT__LOGGING__LEVEL=DEBUG prefect agent local start
s
Hi again Michael! Glad to do this - if the errors reoccur. When I last snuck away from the work crew for ~20 mins, everything looked stable on the agent side. Have class in half an hour, will check again tonight and again in the morning before the work crew shows back up, will send you anything if there’s anything interesting to send… THANK YOU ALL!!!