https://prefect.io logo
Title
s

sark

09/10/2020, 8:10 AM
hi guys i have everything set up fine from
prefect server start
and registered some flows but when i run them they never start (always “late”) i have also started agents with
prefect agent start
and
prefect agent start docker
but the agents just keep polling and fail to find any flows how can i check that the server sees the agent or the agents see the servers?
not sure if this is related but when i do
prefect get flow-runs
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: <http://localhost:4200/graphql>
the graphql API says there are no agents
curl '<http://dev.prefect.i.ghpr.asia:4200/graphql>' -H 'Accept-Encoding: gzip, deflate, br' -H 'Content-Type: application/json' -H 'Accept: application/json' -H 'Connection: keep-alive' -H 'DNT: 1' -H 'Origin: <http://dev.prefect.i.ghpr.asia:4200>' --data-binary '{"query":"# Write your query or mutati\n{\n  agent {created}\n}\n"}' --compressed
{
  "data": {
    "agent": []
  }
}
fixed by setting
[server]
endpoint = "url"
in
config.toml
d

Dylan

09/10/2020, 1:53 PM
Glad you got it fixed!
s

sark

09/11/2020, 3:35 AM
it’s happening again 😞
the agent seems to be connected to the server because it starts complaining when i shut down the server
but when it is connected it says there are no flow runs
ah no this time it was the lack of matching labels, all good now
ah no it is still not working again
this is really frustrating, i don’t know why it sometimes works and sometimes doesn’t
d

Dylan

09/11/2020, 4:46 AM
Hey Sark, I haven’t forgotten about this thread, it’s just very late on the east coast. I’ll follow up with you tomorrow!
s

sark

09/11/2020, 4:51 AM
thanks dylan, no worries, we do indeed have a big timezone difference 🙂
things have improved somewhat when i do
prefect agent start -a <http://localhost:4200>
now the jobs are always submitted, but somehow always still get stuck in that submitted state forever
ah one more thing: all the labels for the job have to be present in the labels corresponding to the agent