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:

Thanks
John

[~]
wget https://raw.githubusercontent.com/frappe/bench/master/playbooks/install.py
sudo python install.py --production --user frappe --verbose

[Error]

[…]
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/cli.py”, line 40, in cli
bench_command()
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 716, in call
return self.main(*args, **kwargs)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 696, in main
rv = self.invoke(ctx)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 1060, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 889, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 534, in invoke
return callback(*args, **kwargs)
File “/home/frappe/.bench/bench/commands/make.py”, line 19, in init
verbose=verbose, clone_from=clone_from)
File “/home/frappe/.bench/bench/utils.py”, line 73, in init
setup_backups(bench_path=path)
File “/home/frappe/.bench/bench/utils.py”, line 202, in setup_backups
logfile=os.path.join(get_bench_dir(bench_path=bench_path), ‘logs’, ‘backup.log’)))
File “/home/frappe/.bench/bench/utils.py”, line 205, in add_to_crontab
current_crontab = read_crontab()
File “/home/frappe/.bench/bench/utils.py”, line 216, in read_crontab
s = subprocess.Popen([“crontab”, “-l”], stdin=subprocess.PIPE, stdout=subprocess.PIPE)
File “/usr/lib/python2.7/subprocess.py”, line 710, in init
errread, errwrite)
File “/usr/lib/python2.7/subprocess.py”, 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?

@john88

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