https://prefect.io logo
Title
m

Marco Petrazzoli

01/27/2021, 7:53 PM
Something about prefect server start?
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

Exception caught; killing services (press ctrl-C to force)
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

Traceback (most recent call last):
  File "/home/ubuntu/prefect/lib/python3.8/site-packages/prefect/cli/server.py", line 346, in start
    subprocess.check_call(
  File "/usr/lib/python3.8/subprocess.py", line 364, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['docker-compose', 'pull']' returned non-zero exit status 1.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/ubuntu/prefect/bin/prefect", line 8, in <module>
    sys.exit(cli())
  File "/home/ubuntu/prefect/lib/python3.8/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/home/ubuntu/prefect/lib/python3.8/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/home/ubuntu/prefect/lib/python3.8/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/ubuntu/prefect/lib/python3.8/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/ubuntu/prefect/lib/python3.8/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/ubuntu/prefect/lib/python3.8/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/home/ubuntu/prefect/lib/python3.8/site-packages/prefect/cli/server.py", line 384, in start
    subprocess.check_output(
  File "/usr/lib/python3.8/subprocess.py", line 411, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File "/usr/lib/python3.8/subprocess.py", line 512, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['docker-compose', 'down']' returned non-zero exit status 1.
Seems like docker-compose.yml is missing
1
j

josh

01/27/2021, 7:57 PM
Hmm that’s interesting that it didn’t install w/ the compose file. If you take the file here and place it in
/home/ubuntu/prefect/lib/python3.8/site-packages/prefect/cli/
does it start working? Would need to look more into why it wasn’t installed with the library
m

Marco Petrazzoli

01/27/2021, 8:00 PM
looking the folder you pointed, i see correctly the file "docker-compose.yml" and running it trought docker-compose up works
but launching prefect server start dosn't get recognized
m

Mariia Kerimova

01/27/2021, 8:06 PM
I've never seen this error before, but found a similar error message posted here. Not sure if it's related, but maybe worth to take a look
m

Marco Petrazzoli

01/27/2021, 8:11 PM
Seems snap made the error in that case. I used the "built-in" installer while installing ubuntu. I can try to remove and reinstall all
👍 1
WAIT i found something
👀 1
I'm messing with server.py printing folders and printing "compose_dir_path" shows that point to "/tmp"
subprocess.check_call( ["docker-compose", "pull"], cwd=compose_dir_path, env=env ) This is wrong in my case
m

Mariia Kerimova

01/27/2021, 8:16 PM
I'm glad you figured it out pretty quickly!
m

Marco Petrazzoli

01/27/2021, 8:17 PM
seems it moves the docker-compose.yml to tmp before launching
Ok, prefect can copy file on my "/tmp" but can't see them with subprocess
Yes, the problem is about snap installation cause has a limit(that i was unable to remove) about running docker-compose inside some folders ( like /tmp)
👍 2
e

Edward Chen

02/09/2021, 6:54 PM
Sorry for reviving this, but it would be great if this was documented somewhere or archived in the github repo. This was exactly what I needed so I could change the compose_dir_path as a temp workaround and do local development with prefect server. Otherwise the only way to know this info would be to check Slack (I’m still new to open source tools so I didn’t know about joining Slack channels until my team told me)
j

josh

02/09/2021, 6:57 PM
@Marvin archive “Snap installation of Docker compose cannot find docker-compose.yml on prefect server start”
👍 1