https://prefect.io logo
e

E Li

01/10/2022, 4:49 PM
Hi, I couldn't create a tenant, and got this error when running 'prefect server create-tenant -n default'. raise ClientError(result["errors"]) prefect.exceptions.ClientError: [{'message': "[{'extensions': {'path': '$', 'code': 'validation-failed'}, 'message': 'no mutations exist'}]", 'locations': [{'line': 2, 'column': 5}], 'path': ['create_tenant'], 'extensions': {'code': 'INTERNAL_SERVER_ERROR', 'exception': {'message': "[{'extensions': {'path': '$', 'code': 'validation-failed'}, 'message': 'no mutations exist'}]"}}}]
k

Kevin Kho

01/10/2022, 5:01 PM
What is the output when you do
prefect diagnostics
?
e

E Li

01/10/2022, 5:07 PM
{  "config_overrides": {    "server": {      "host": true,      "ui": {        "apollo_url": true      }    }  },  "env_vars": [],  "system_information": {    "platform": "Linux-3.10.0-1160.45.1.el7.x86_64-x86_64-with-glibc2.10",    "prefect_backend": "server",    "prefect_version": "0.15.9",    "python_version": "3.8.5"{  "config_overrides": {    "server": {      "host": true,      "ui": {        "apollo_url": true      }    }  },  "env_vars": [],  "system_information": {    "platform": "Linux-3.10.0-1160.45.1.el7.x86_64-x86_64-with-glibc2.10",    "prefect_backend": "server",    "prefect_version": "0.15.9",    "python_version": "3.8.5"
k

Kevin Kho

01/10/2022, 5:12 PM
How did you start your server?
prefect server start
?
e

E Li

01/10/2022, 5:16 PM
i use docker stack deploy to start all the services, but got this error when do server start: raise CalledProcessError(retcode, process.args, subprocess.CalledProcessError: Command '['docker-compose', 'down']' returned non-zero exit status 1.
k

Kevin Kho

01/10/2022, 5:18 PM
I see, I think your API might still be down, which is why the tenant creation fails?
e

E Li

01/10/2022, 5:19 PM
you mean graphql?
k

Kevin Kho

01/10/2022, 5:22 PM
Yes. I think a good way to test is spinning up an agent?
e

E Li

01/10/2022, 5:25 PM
wouldn't that require a tenant? i got this when do prefect agent start local: The following error messages were provided by the GraphQL server:      GRAPHQL_VALIDATION_FAILED: Cannot query field "tenant" on type "Query".   The GraphQL query was:      query {            tenant {                id        }    }   The passed variables were:      nullThe following error messages were provided by the GraphQL server:      GRAPHQL_VALIDATION_FAILED: Cannot query field "tenant" on type "Query".   The GraphQL query was:      query {            tenant {                id        }    }   The passed variables were:      null
k

Kevin Kho

01/10/2022, 5:27 PM
Ah I see. Will task the team about this
e

E Li

01/10/2022, 5:29 PM
ok, thank you, do you need my server config?
k

Kevin Kho

01/10/2022, 5:30 PM
I dont think so for now
e

E Li

01/10/2022, 5:30 PM
ok, please keep posted, appreciate it
keep me posted*
k

Kevin Kho

01/10/2022, 5:46 PM
Can you try upgrading your database like this?
e

E Li

01/10/2022, 6:40 PM
so you suggest stopping all my services now and follow the steps here?
k

Kevin Kho

01/10/2022, 6:43 PM
Yes because we need to run the database migrations and apply the Hasura metadata
e

E Li

01/10/2022, 6:44 PM
ok, i have multiple versions for these images, do i need to specify versions when do prefect-server dev services -i apollo,graphql?
k

Kevin Kho

01/10/2022, 6:46 PM
I don’t think so. You need to run this on the GraphQL container that you are using
e

E Li

01/10/2022, 7:54 PM
so prefect-server dev infrastructure ran into the same error: raise CalledProcessError(retcode, process.args, subprocess.CalledProcessError: Command '['docker-compose', 'down']' returned non-zero exit status 1.
k

Kevin Kho

01/10/2022, 7:55 PM
Ok I’ll need to find someone who can help better than me
e

E Li

01/10/2022, 7:56 PM
thank you
z

Zanie

01/10/2022, 9:13 PM
Hi, the error on docker-compose down isn’t relevant. That just means there were no containers to tear down on exit.
How are you starting your server?
prefect-server dev infrastructure
is just for development.
e

E Li

01/10/2022, 9:25 PM
hi, i use docker swarm to start service, and when they are all up and running, i tried to do prefect server start
z

Zanie

01/10/2022, 9:38 PM
prefect server start
generates docker-compose yaml then starts all the services with
docker-compose
You’d be attempting to run all the services twice if you do as described.
Running the server in docker swarm is not supported.
You can generate the
docker-compose
yaml by using
prefect server config
but this is an advanced use-case.
e

E Li

01/10/2022, 9:41 PM
ok so i don't need to do prefect server start. i already created docker-compose.yml, so i really need to do is docker-compose -f <path-to-yml>/docker-compose.yml up -d?
z

Zanie

01/10/2022, 9:43 PM
Yes, but from the errors you described above it seems likely that your docker-compose is missing some steps. Notably, the graphql container runs database migrations e.g.
Copy code
graphql:
    command: bash -c "prefect-server database upgrade -y && python src/prefect_server/services/graphql/server.py"
and
prefect server start
creates the default tenant for you which you’d need to do with
prefect server create-tenant --name default --slug default
e

E Li

01/10/2022, 9:46 PM
i don't have prefect-server database upgrade -y in my yml file, that could have caused problem
another associated question, i was working on different versions of prefect (e.g., 0.15.10, 0.15.5) and hasura (e.g., 2.0.10, 1.3.3). my intention was to use the most recent ones, but with 0.15.10 + 2.0.10, i am able to see my registered flows on UI dashboard even i can find them by searching in search box
k

Kevin Kho

01/10/2022, 9:54 PM
I think we only support 1.3.3
z

Zanie

01/10/2022, 9:55 PM
Yes, Hasura 2.0 has breaking changes and we do not support it.
e

E Li

01/10/2022, 9:55 PM
i meant to say "i am not able to", but ok i think you answered my question
32 Views