Thread
#prefect-community
    E Li

    E Li

    8 months ago
    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'}]"}}}]
    Kevin Kho

    Kevin Kho

    8 months ago
    What is the output when you do
    prefect diagnostics
    ?
    E Li

    E Li

    8 months ago
    {  "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"
    Kevin Kho

    Kevin Kho

    8 months ago
    How did you start your server?
    prefect server start
    ?
    E Li

    E Li

    8 months ago
    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.
    Kevin Kho

    Kevin Kho

    8 months ago
    I see, I think your API might still be down, which is why the tenant creation fails?
    E Li

    E Li

    8 months ago
    you mean graphql?
    Kevin Kho

    Kevin Kho

    8 months ago
    Yes. I think a good way to test is spinning up an agent?
    E Li

    E Li

    8 months ago
    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
    Kevin Kho

    Kevin Kho

    8 months ago
    Ah I see. Will task the team about this
    E Li

    E Li

    8 months ago
    ok, thank you, do you need my server config?
    Kevin Kho

    Kevin Kho

    8 months ago
    I dont think so for now
    E Li

    E Li

    8 months ago
    ok, please keep posted, appreciate it
    keep me posted*
    Kevin Kho

    Kevin Kho

    8 months ago
    Can you try upgrading your database like this?
    E Li

    E Li

    8 months ago
    so you suggest stopping all my services now and follow the steps here?
    Kevin Kho

    Kevin Kho

    8 months ago
    Yes because we need to run the database migrations and apply the Hasura metadata
    E Li

    E Li

    8 months ago
    ok, i have multiple versions for these images, do i need to specify versions when do prefect-server dev services -i apollo,graphql?
    Kevin Kho

    Kevin Kho

    8 months ago
    I don’t think so. You need to run this on the GraphQL container that you are using
    E Li

    E Li

    8 months ago
    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.
    Kevin Kho

    Kevin Kho

    8 months ago
    Ok I’ll need to find someone who can help better than me
    E Li

    E Li

    8 months ago
    thank you
    Michael Adkins

    Michael Adkins

    8 months ago
    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 Li

    E Li

    8 months ago
    hi, i use docker swarm to start service, and when they are all up and running, i tried to do prefect server start
    Michael Adkins

    Michael Adkins

    8 months ago
    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 Li

    E Li

    8 months ago
    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?
    Michael Adkins

    Michael Adkins

    8 months ago
    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.
    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 Li

    E Li

    8 months ago
    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
    Kevin Kho

    Kevin Kho

    8 months ago
    I think we only support 1.3.3
    Michael Adkins

    Michael Adkins

    8 months ago
    Yes, Hasura 2.0 has breaking changes and we do not support it.
    E Li

    E Li

    8 months ago
    i meant to say "i am not able to", but ok i think you answered my question