https://prefect.io logo
Title
v

Vitaly Shulgin

09/09/2020, 7:14 PM
What do I need to check?
j

josh

09/09/2020, 7:14 PM
Hi @Vitaly Shulgin how are you starting the server?
v

Vitaly Shulgin

09/09/2020, 7:14 PM
I started in local k8s
got ui, server. apollo, postgres and hasura up and running
prefect-ui              : <http://localhost:30562/>           # works
prefect-server          : <http://localhost:31722/graphql/>   # works
prefect-apollo          : <http://localhost:30524/graphql>    # works
graphql-engine (hasura) : <http://localhost:32078/console>    # works
j

josh

09/09/2020, 7:15 PM
Okay then you probably need to create a default tenant for the server (it is created by default when using the standard docker-compose setup). Try running:
prefect server create-tenant -n default
v

Vitaly Shulgin

09/09/2020, 7:16 PM
{"message":"Cannot query field \"tenant\" on type \"Query\".","locations":[{"line":2,"column":5}],"extensions":{"code":"GRAPHQL_VALIDATION_FAILED"}}2020-09-09T19:15:54.798Z {"message":"Cannot query field \"tenant\" on type \"Query\".","locations":[{"line":2,"column":5}],"extensions":{"code":"GRAPHQL_VALIDATION_FAILED"}}
j

josh

09/09/2020, 7:18 PM
Which version of Prefect / the server are you running?
v

Vitaly Shulgin

09/09/2020, 7:20 PM
0.12.6
j

josh

09/09/2020, 7:21 PM
Ah that makes sense as to why tenant is not found. Try upgrading to a version above
0.13.0
(the most recent version is
0.13.6
). This error suggests that you’re using a version of Prefect newer than when the server project was migrated over into a separate repo 🙂
v

Vitaly Shulgin

09/09/2020, 7:22 PM
ok, thanks, I'll try with updated versions
switched to 0.13.6, created tenant and project
what about
+ prefect-server services scheduler
Usage: prefect-server services [OPTIONS] COMMAND [ARGS]...
Try 'prefect-server services --help' for help.

Error: No such command 'scheduler'.
there was separate scheduler container, now it looks like such configuration is obsolete, and this command not supported
j

josh

09/09/2020, 8:51 PM
Ah the scheduler and some other newer services were bundled into a new service called
towel
😅 here’s some information on the newer architecture pattern https://docs.prefect.io/orchestration/server/architecture.html
v

Vitaly Shulgin

09/09/2020, 9:38 PM
yes, got it started as towel
last piece in puzzle
agent is running
but does not start any job
j

josh

09/09/2020, 9:39 PM
What do you see in the agent logs?
v

Vitaly Shulgin

09/09/2020, 9:39 PM
[2020-09-09 21:33:06,503] INFO - agent | Starting KubernetesAgent with labels []
[2020-09-09 21:33:06,503] INFO - agent | Agent documentation can be found at <https://docs.prefect.io/orchestration/>
[2020-09-09 21:33:06,504] INFO - agent | Agent connecting to the Prefect API at <http://prefect-apollo:4200>
[2020-09-09 21:33:06,512] INFO - agent | Waiting for flow runs...
j

josh

09/09/2020, 9:40 PM
Check to make sure you don’t have any extra labels on your flows when registering them. For more information: https://docs.prefect.io/orchestration/execution/overview.html#labels
v

Vitaly Shulgin

09/09/2020, 10:13 PM
thanks, it works now
unfortunately, the job itself (or task run) failed
Last State Message
[10 Sep 2020 1:07am]: Failed to load and execute Flow's environment: FileNotFoundError(2, 'No such file or directory')
the simplest one
import prefect
from prefect import task, Flow
from prefect.environments import LocalEnvironment

@task
def hello_task():
    logger = prefect.context.get("logger")
    <http://logger.info|logger.info>("Hello, Cloud!")

flow = Flow("hello-flow", tasks=[hello_task])
flow.environment = LocalEnvironment(labels=["any"])
flow.register(project_name="Hello")
container image was
prefecthq/prefect:all_extras-0.13.5
not sure, why, but this is another question
anyway, thanks for support