Debian 8 [init bench] failing

Hey guys,

I’m trying to setup ERPNext on a fresh Debian 8 and get a reproducible error. Trying to manually execute the production playbook afterwards (according to the failing command in the error log), seems to work. Any idea, what is going wrong?

Besides that, it’s pretty impressive how easy and quickly such a complex infrastructure is set up by your script. Keep up the good work :slight_smile:


sudo python --production --user frappe --verbose


INFO:bench.utils:setting up backups
Traceback (most recent call last):
File "/usr/local/bin/bench", line 11, in
load_entry_point(‘bench’, ‘console_scripts’, ‘bench’)()
File "/home/frappe/.bench/bench/", line 40, in cli
File "/usr/local/lib/python2.7/dist-packages/click/", line 716, in call
return self.main(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/click/", line 696, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python2.7/dist-packages/click/", line 1060, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python2.7/dist-packages/click/", line 889, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python2.7/dist-packages/click/", line 534, in invoke
return callback(*args, **kwargs)
File "/home/frappe/.bench/bench/commands/", line 19, in init
verbose=verbose, clone_from=clone_from)
File "/home/frappe/.bench/bench/", line 73, in init
File "/home/frappe/.bench/bench/", line 202, in setup_backups
logfile=os.path.join(get_bench_dir(bench_path=bench_path), ‘logs’, ‘backup.log’)))
File "/home/frappe/.bench/bench/", line 205, in add_to_crontab
current_crontab = read_crontab()
File "/home/frappe/.bench/bench/", line 216, in read_crontab
s = subprocess.Popen(["crontab", "-l"], stdin=subprocess.PIPE, stdout=subprocess.PIPE)
File "/usr/lib/python2.7/", line 710, in init
errread, errwrite)
File "/usr/lib/python2.7/", line 1335, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory"

Full task log

[2nd Attempt]
//according to command in subprocess traceback
ansible-playbook -c local /home/frappe/.bench/playbooks/production/install.yml -e @/tmp/extra_vars.json -vvvv --become --become-user=frappe

Another suspicious line in the log:
“stdout”: "Already using interpreter /usr/bin/python
/home/frappe/frappe-bench …

Any idea, what is going on here?

I guess the crontab setup is failing

@vjFaLk do you have a clue?

Going to see if I can reproduce this on DO.

@john88 Can you run crontab -l as root and check the output?


Could not reproduce on Digital Ocean with a Debian 8.6 Image, installation worked perfectly.

Can you tell which which Debian image is it that you’re using and is it a fresh system?

Shame on me… I could have figured this out by myself :see_no_evil:

@vjFaLk your guess was right :slight_smile: cron was not installed, I am running Debian 8.6 in Docker 1.11.2 on CoreOS 1185.5.0.

I just verified with a fresh container, the script works like a charm :ok_hand:

Thanks a lot!

1 Like