Try ERPNext Buy Support Partners Foundation

Sudo Setup Bench Production

Hi Guys,

I have followed the easy install instructions

After which, I followed this to setup.

https://frappe.io/docs/user/en/bench/guides/setup-production.html

I am getting the below thrown out to me. Can anyone shed any light?
New user here.

coffee-user@ip:/home/ubuntu$ sudo bench setup production coffee-user
WARN: Command not being executed in bench directory
Traceback (most recent call last):
File “/usr/local/bin/bench”, line 11, in
load_entry_point(‘bench’, ‘console_scripts’, ‘bench’)()
File “/home/coffee-user/.bench/bench/cli.py”, line 41, in cli
bench_command()
File “/usr/local/lib/python3.6/dist-packages/click/core.py”, line 764, in call
return self.main(*args, **kwargs)
File “/usr/local/lib/python3.6/dist-packages/click/core.py”, line 717, in main
rv = self.invoke(ctx)
File “/usr/local/lib/python3.6/dist-packages/click/core.py”, line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/local/lib/python3.6/dist-packages/click/core.py”, line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/local/lib/python3.6/dist-packages/click/core.py”, line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/usr/local/lib/python3.6/dist-packages/click/core.py”, line 555, in invoke
return callback(*args, **kwargs)
File “/home/coffee-user/.bench/bench/commands/setup.py”, line 73, in setup_production
setup_production(user=user, yes=yes)
File “/home/coffee-user/.bench/bench/config/production_setup.py”, line 15, in setup_production
generate_supervisor_config(bench_path=bench_path, user=user, yes=yes)
File “/home/coffee-user/.bench/bench/config/supervisor.py”, line 41, in generate_supervisor_config
with open(conf_path, ‘w’) as f:
FileNotFoundError: [Errno 2] No such file or directory: ‘./config/supervisor.conf’
coffee-user@ip:/home/ubuntu$ sudo bench setup production
WARN: Command not being executed in bench directory
Usage: bench setup production [OPTIONS] USER
Try “bench setup production --help” for help.

The first line tells you:

WARN: Command not being executed in bench directory

The last line tells you:

FileNotFoundError: [Errno 2] No such file or directory: ‘./config/supervisor.conf’

It’s looking for /home/ubuntu/config/supervisor.conf but can’t find it because you arn’t in a bench directory.

3 Likes

Run the command from the frappe-bench directory and check.

1 Like

Thanks Martin! it worked.

Thanks Kenneth! yes, that did it