https://prefect.io logo
Title
m

Michael Smith

04/01/2022, 10:06 AM
Morning, I'm looking into Prefect 1 and running into a few startup issues, is there a guide on how to resolve as this must be a common problem?
Error I get on prefect server start (with 1.1.0)
ERROR: 
        Can't find a suitable configuration file in this directory or any
        parent. Are you in the right directory?

        Supported filenames: docker-compose.yml, docker-compose.yaml, compose.yml, compose.yaml
        
Exception caught; killing services (press ctrl-C to force)
Which seemed to work but was setup for 0.15.x, which is incompatible with the 1.1.0 dev installation I'm using
I tried to follow the same approach by using the docker-compose.yml file generated in /tmp and setting up .env with environment properties (based upon debugging the prefect server start code) but that failed
a

Anna Geller

04/01/2022, 10:21 AM
well, you shouldn't have to use docker-compose manually, but if you want to generate it, you can use
prefect server config
can you share the output of your
prefect diagnostics
?
m

Michael Smith

04/01/2022, 10:59 AM
I have
{
  "config_overrides": {},
  "env_vars": [],
  "system_information": {
    "platform": "Linux-5.4.0-107-generic-x86_64-with-debian-bullseye-sid",
    "prefect_backend": "server",
    "prefect_version": "1.1.0",
    "python_version": "3.7.9"
  }
}
A related question...if I need to run prefect commands against a remote PF1 service, is it the same as PF2 - I just need to set the PREFECT_API_URL environment variable?
a

Anna Geller

04/01/2022, 11:16 AM
PREFECT_API_URL is for Prefect 2.0 - would you want to get started with that version instead?
thx for sharing the diagnostics! this looks good. When seeing:
Are you in the right directory?
the only thing that comes to my mind is whether you started your docker service with sudo. Because then it uses a different working directory
m

Michael Smith

04/01/2022, 11:31 AM
https://prefect-community.slack.com/archives/C014Z8DPDSR/p1648811818697579?thread_ts=1648807593.915419&cid=C014Z8DPDSR - our team has been evaluating both PF1 and PF2. I've been focusing up to now on PF2 but need to take a closer look at deployments to PF1. Our infrastructure team have setup a PF1 service in K8s and I 'd now like to start testing that.
I'll take a look at my docker, I had reinstalled it
My docker is installed as a snap running under root atm
a

Anna Geller

04/01/2022, 11:54 AM
That's likely the issue. Btw for Prefect 1.0, do you know that there is Prefect Cloud you can sign up for and use for free with up to 20,000 task runs every month? No credit card required: cloud.prefect.io
Just mentioning in case you don't want to maintain all the Server infrastructure
m

Michael Smith

04/01/2022, 12:10 PM
OK thanks, we are thinking of hosting ourselves and would like to go through that learning early, I tried APOLLO_URL but commands like prefect get flows throw an error, still looking for localhost 4200?
a

Anna Geller

04/01/2022, 12:25 PM
Quite likely. You would need to adjust the host in your `config.toml`:
[server]
endpoint = "<http://YOUR_MACHINES_PUBLIC_IP:4200/graphql>"
m

Michael Smith

04/01/2022, 1:08 PM
👍 that fixed my remote server call
👍 1