error installing erpnext worked last week but today raise error
Traceback (most recent call last):
File “install.py”, line 388, in
File “install.py”, line 114, in install_bench
run_playbook(‘production/install.yml’, sudo=True, extra_vars=extra_vars)
File “install.py”, line 326, in run_playbook
success = subprocess.check_call(args, cwd=os.path.join(cwd, ‘playbooks’))
File “/usr/lib/python2.7/subprocess.py”, line 540, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command ‘[‘ansible-playbook’, ‘-c’, ‘local’, ‘production/install.yml’, ‘-e’, ‘@/tmp/extra_vars.json’, ‘–become’, ‘–become-user=frappe’]’ returned non-zero exit status 2
Any hepl its a serious problem
first if you bothered to search your error in the forum first you will find multiple topics for the same problem, even simple search term like
returned non-zero exit status 2
anyway you seem trying to run the script with previous run already done, you should run this script in vanilla OS
@ganas I ALREADY DONE AND TRIED ALL EVEN STACKOVERFLOW WHICH LEAD ME TO SOME PERMISSION ISSUES ON ANSIBLE PLAYBOOKS;
That may be part of your problem?
root is for experts - that is why best to run as sudo
Here’s a similar report
ERPNext 9.1.2 installation error - ansible-playbook install error - #4 by clarkej
already tried all solutions same error
this is where the error raise in install.py file:
def run_playbook(playbook_name, sudo=False, extra_vars=None):
args = [‘ansible-playbook’, ‘-c’, ‘local’, playbook_name]
user = extra_vars.get('user') or getpass.getuser()
cwd = tmp_bench_repo
cwd = os.path.join(os.path.expanduser('~'), 'bench')
success = subprocess.check_call(args, cwd=os.path.join(cwd, 'playbooks'))
can any one tell me where the playbook files exist after run install.py
You mean these?
frappe@erpnext:~/frappe-bench$ find …/bench-repo/ -name install.yml
Hmm, could you try this locally. Like @clarkej mentioned out, maybe change the permissions of your ansible scripts?
i ssh the server as root the same installation method i do many times this time failed.
@rmehta i checked an old installation i found setup_mariadb.yml and other yml files are missing !!!
someone please confirm
This is ill advised and may the the source of your problem, for example permissions?
@clarkej i think coz of lots of missing files yml files to setup mariadb missing you can check ur self here
and compare it with what u already have.
I don’t follow you and am done here with your problem.