https://prefect.io logo
Title
b

Bruno Nunes

03/17/2022, 3:22 PM
My prefect agent stopped working and is showing: `prefect.exceptions.ClientError: Your Prefect Server instance has no tenants. Create a tenant with `prefect server create-tenant`` When I try to run
prefect server create-tenant --name default --slug default
I'm getting the following error:
prefect.exceptions.ClientError: [{'message': 'Uniqueness violation.', 'locations': [{'line': 2, 'column': 5}], 'path': ['create_tenant'], 'extensions': {'code': 'INTERNAL_SERVER_ERROR', 'exception': {'message': 'Uniqueness violation.'}}}]
It seems that the tenant already exists. Do you know what might be the problem?
k

Kevin Kho

03/17/2022, 3:24 PM
Hi @Bruno Nunes, that’s pretty weird. Can you go to the GraphQL API in the UI?
b

Bruno Nunes

03/17/2022, 3:27 PM
Yes, my UI is working well but the agent is not up.
k

Kevin Kho

03/17/2022, 3:31 PM
Can you query for your tenant?
query {
  tenant{
    id
    name
  }
}
b

Bruno Nunes

03/17/2022, 3:36 PM
The problem was with my config.toml. I was doing some tests with the prefect client installations and it created a new configuration not pointing to the correct graphQL server.
k

Kevin Kho

03/17/2022, 3:41 PM
Ah ok sounds good! Glad you sorted it out