I already opened an issue for this on github:
https://github.com/frappe/bench/issues/792
I have tried the following OS:
- Debian 9
- Ubuntu 16.04 lts
- Ubuntu 18.04 lts
Across multiple hosting companies and they all fail with the exact same error:
PLAY RECAP *********************************************************************
localhost : ok=72 changed=16 unreachable=0 failed=1
Traceback (most recent call last):
File "install.py", line 425, in <module>
install_bench(args)
File "install.py", line 122, in install_bench
run_playbook('site.yml', sudo=True, extra_vars=extra_vars)
File "install.py", line 338, in run_playbook
success = subprocess.check_call(args, cwd=os.path.join(cwd, 'playbooks'))
File "/usr/lib/python2.7/subprocess.py", line 190, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['ansible-playbook', '-c', 'local', 'site.yml', '-e', '@/tmp/extra_vars.json', '--become', '--become-user=erp_jmi']' returned non-zero exit status 2
For the full error trace, see here:
TASK [bench : Check if ERPNext App exists] *************************************
ok: [localhost]
TASK [bench : Get the ERPNext app] *********************************************
fatal: [localhost]: FAILED! => {"changed": true, "cmd": ["bench", "get-app", "erpnext", "https://github.com/frappe/erpnext", "--branch", "v10.x.x"], "delta": "0:00:20.747747", "end": "2019-04-14 13:42:12.885323", "msg": "non-zero return code", "rc": 1, "start": "2019-04-14 13:41:52.137576", "stderr": "INFO:bench.app:getting app erpnext\nINFO:bench.utils:git clone https://github.com/frappe/erpnext --branch v10.x.x --depth 1 --origin upstream\nCloning into 'erpnext'...\nChecking out files: 21% (1329/6317) \rChecking out files: 22% (1390/6317) \rChecking out files: 23% (1453/6317) \rChecking out files: 24% (1517/6317) \rChecking out files: 24% (1564/6317) \rChecking out files: 25% (1580/6317) \rChecking out files: 26% (1643/6317) \rChecking out files: 27% (1706/6317) \rChecking out files: 28% (1769/6317) \rChecking out files: 29% (1832/6317) \rChecking out files: 30% (1896/6317) \rChecking out files: 31% (1959/6317) \rChecking out files: 31% (2020/6317) \rChecking out files: 32% (2022/6317) \rChecking out files: 33% (2085/6317) \rChecking out files: 34% (2148/6317) \rChecking out files: 35% (2211/6317) \rChecking out files: 36% (2275/6317) \rChecking out files: 37% (2338/6317) \rChecking out files: 38% (2401/6317) \rChecking out files: 39% (2464/6317) \rChecking out files: 40% (2527/6317) \rChecking out files: 41% (2590/6317) \rChecking out files: 42% (2654/6317) \rChecking out files: 43% (2717/6317) \rChecking out files: 44% (2780/6317) \rChecking out files: 45% (2843/6317) \rChecking out files: 46% (2906/6317) \rChecking out files: 47% (2969/6317) \rChecking out files: 48% (3033/6317) \rChecking out files: 49% (3096/6317) \rChecking out files: 50% (3159/6317) \rChecking out files: 51% (3222/6317) \rChecking out files: 52% (3285/6317) \rChecking out files: 53% (3349/6317) \rChecking out files: 54% (3412/6317) \rChecking out files: 55% (3475/6317) \rChecking out files: 56% (3538/6317) \rChecking out files: 57% (3601/6317) \rChecking out files: 58% (3664/6317) \rChecking out files: 59% (3728/6317) \rChecking out files: 60% (3791/6317) \rChecking out files: 61% (3854/6317) \rChecking out files: 62% (3917/6317) \rChecking out files: 63% (3980/6317) \rChecking out files: 64% (4043/6317) \rChecking out files: 65% (4107/6317) \rChecking out files: 66% (4170/6317) \rChecking out files: 67% (4233/6317) \rChecking out files: 68% (4296/6317) \rChecking out files: 69% (4359/6317) \rChecking out files: 70% (4422/6317) \rChecking out files: 71% (4486/6317) \rChecking out files: 72% (4549/6317) \rChecking out files: 73% (4612/6317) \rChecking out files: 74% (4675/6317) \rChecking out files: 75% (4738/6317) \rChecking out files: 76% (4801/6317) \rChecking out files: 77% (4865/6317) \rChecking out files: 78% (4928/6317) \rChecking out files: 79% (4991/6317) \rChecking out files: 80% (5054/6317) \rChecking out files: 81% (5117/6317) \rChecking out files: 82% (5180/6317) \rChecking out files: 83% (5244/6317) \rChecking out files: 84% (5307/6317) \rChecking out files: 85% (5370/6317) \rChecking out files: 86% (5433/6317) \rChecking out files: 87% (5496/6317) \rChecking out files: 88% (5559/6317) \rChecking out files: 89% (5623/6317) \rChecking out files: 90% (5686/6317) \rChecking out files: 91% (5749/6317) \rChecking out files: 92% (5812/6317) \rChecking out files: 93% (5875/6317) \rChecking out files: 94% (5938/6317) \rChecking out files: 95% (6002/6317) \rChecking out files: 96% (6065/6317) \rChecking out files: 97% (6128/6317) \rChecking out files: 98% (6191/6317) \rChecking out files: 98% (6253/6317) \rChecking out files: 99% (6254/6317) \rChecking out files: 100% (6317/6317) \rChecking out files: 100% (6317/6317), done.\nINFO:bench.app:installing erpnext\nINFO:bench.utils:./env/bin/pip install -q -e ./apps/erpnext \nDEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.\nCommand \"python setup.py egg_info\" failed with error code 1 in /tmp/pip-install-K3IAtE/frappe/\nTraceback (most recent call last):\n File \"/usr/local/bin/bench\", line 11, in <module>\n load_entry_point('bench', 'console_scripts', 'bench')()\n File \"/home/erp_jmi/.bench/bench/cli.py\", line 40, in cli\n bench_command()\n File \"/usr/local/lib/python2.7/dist-packages/click/core.py\", line 764, in __call__\n return self.main(*args, **kwargs)\n File \"/usr/local/lib/python2.7/dist-packages/click/core.py\", line 717, in main\n rv = self.invoke(ctx)\n File \"/usr/local/lib/python2.7/dist-packages/click/core.py\", line 1137, in invoke\n return _process_result(sub_ctx.command.invoke(sub_ctx))\n File \"/usr/local/lib/python2.7/dist-packages/click/core.py\", line 956, in invoke\n return ctx.invoke(self.callback, **ctx.params)\n File \"/usr/local/lib/python2.7/dist-packages/click/core.py\", line 555, in invoke\n return callback(*args, **kwargs)\n File \"/home/erp_jmi/.bench/bench/commands/make.py\", line 40, in get_app\n get_app(git_url, branch=branch)\n File \"/home/erp_jmi/.bench/bench/app.py\", line 135, in get_app\n install_app(app=app_name, bench_path=bench_path, verbose=verbose)\n File \"/home/erp_jmi/.bench/bench/app.py\", line 171, in install_app\n find_links=find_links))\n File \"/home/erp_jmi/.bench/bench/utils.py\", line 159, in exec_cmd\n raise CommandFailedError(cmd)\nbench.utils.CommandFailedError: ./env/bin/pip install -q -e ./apps/erpnext ", "stderr_lines": ["INFO:bench.app:getting app erpnext", "INFO:bench.utils:git clone https://github.com/frappe/erpnext --branch v10.x.x --depth 1 --origin upstream", "Cloning into 'erpnext'...", "Checking out files: 21% (1329/6317) ", "Checking out files: 22% (1390/6317) ", "Checking out files: 23% (1453/6317) ", "Checking out files: 24% (1517/6317) ", "Checking out files: 24% (1564/6317) ", "Checking out files: 25% (1580/6317) ", "Checking out files: 26% (1643/6317) ", "Checking out files: 27% (1706/6317) ", "Checking out files: 28% (1769/6317) ", "Checking out files: 29% (1832/6317) ", "Checking out files: 30% (1896/6317) ", "Checking out files: 31% (1959/6317) ", "Checking out files: 31% (2020/6317) ", "Checking out files: 32% (2022/6317) ", "Checking out files: 33% (2085/6317) ", "Checking out files: 34% (2148/6317) ", "Checking out files: 35% (2211/6317) ", "Checking out files: 36% (2275/6317) ", "Checking out files: 37% (2338/6317) ", "Checking out files: 38% (2401/6317) ", "Checking out files: 39% (2464/6317) ", "Checking out files: 40% (2527/6317) ", "Checking out files: 41% (2590/6317) ", "Checking out files: 42% (2654/6317) ", "Checking out files: 43% (2717/6317) ", "Checking out files: 44% (2780/6317) ", "Checking out files: 45% (2843/6317) ", "Checking out files: 46% (2906/6317) ", "Checking out files: 47% (2969/6317) ", "Checking out files: 48% (3033/6317) ", "Checking out files: 49% (3096/6317) ", "Checking out files: 50% (3159/6317) ", "Checking out files: 51% (3222/6317) ", "Checking out files: 52% (3285/6317) ", "Checking out files: 53% (3349/6317) ", "Checking out files: 54% (3412/6317) ", "Checking out files: 55% (3475/6317) ", "Checking out files: 56% (3538/6317) ", "Checking out files: 57% (3601/6317) ", "Checking out files: 58% (3664/6317) ", "Checking out files: 59% (3728/6317) ", "Checking out files: 60% (3791/6317) ", "Checking out files: 61% (3854/6317) ", "Checking out files: 62% (3917/6317) ", "Checking out files: 63% (3980/6317) ", "Checking out files: 64% (4043/6317) ", "Checking out files: 65% (4107/6317) ", "Checking out files: 66% (4170/6317) ", "Checking out files: 67% (4233/6317) ", "Checking out files: 68% (4296/6317) ", "Checking out files: 69% (4359/6317) ", "Checking out files: 70% (4422/6317) ", "Checking out files: 71% (4486/6317) ", "Checking out files: 72% (4549/6317) ", "Checking out files: 73% (4612/6317) ", "Checking out files: 74% (4675/6317) ", "Checking out files: 75% (4738/6317) ", "Checking out files: 76% (4801/6317) ", "Checking out files: 77% (4865/6317) ", "Checking out files: 78% (4928/6317) ", "Checking out files: 79% (4991/6317) ", "Checking out files: 80% (5054/6317) ", "Checking out files: 81% (5117/6317) ", "Checking out files: 82% (5180/6317) ", "Checking out files: 83% (5244/6317) ", "Checking out files: 84% (5307/6317) ", "Checking out files: 85% (5370/6317) ", "Checking out files: 86% (5433/6317) ", "Checking out files: 87% (5496/6317) ", "Checking out files: 88% (5559/6317) ", "Checking out files: 89% (5623/6317) ", "Checking out files: 90% (5686/6317) ", "Checking out files: 91% (5749/6317) ", "Checking out files: 92% (5812/6317) ", "Checking out files: 93% (5875/6317) ", "Checking out files: 94% (5938/6317) ", "Checking out files: 95% (6002/6317) ", "Checking out files: 96% (6065/6317) ", "Checking out files: 97% (6128/6317) ", "Checking out files: 98% (6191/6317) ", "Checking out files: 98% (6253/6317) ", "Checking out files: 99% (6254/6317) ", "Checking out files: 100% (6317/6317) ", "Checking out files: 100% (6317/6317), done.", "INFO:bench.app:installing erpnext", "INFO:bench.utils:./env/bin/pip install -q -e ./apps/erpnext ", "DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.", "Command \"python setup.py egg_info\" failed with error code 1 in /tmp/pip-install-K3IAtE/frappe/", "Traceback (most recent call last):", " File \"/usr/local/bin/bench\", line 11, in <module>", " load_entry_point('bench', 'console_scripts', 'bench')()", " File \"/home/erp_jmi/.bench/bench/cli.py\", line 40, in cli", " bench_command()", " File \"/usr/local/lib/python2.7/dist-packages/click/core.py\", line 764, in __call__", " return self.main(*args, **kwargs)", " File \"/usr/local/lib/python2.7/dist-packages/click/core.py\", line 717, in main", " rv = self.invoke(ctx)", " File \"/usr/local/lib/python2.7/dist-packages/click/core.py\", line 1137, in invoke", " return _process_result(sub_ctx.command.invoke(sub_ctx))", " File \"/usr/local/lib/python2.7/dist-packages/click/core.py\", line 956, in invoke", " return ctx.invoke(self.callback, **ctx.params)", " File \"/usr/local/lib/python2.7/dist-packages/click/core.py\", line 555, in invoke", " return callback(*args, **kwargs)", " File \"/home/erp_jmi/.bench/bench/commands/make.py\", line 40, in get_app", " get_app(git_url, branch=branch)", " File \"/home/erp_jmi/.bench/bench/app.py\", line 135, in get_app", " install_app(app=app_name, bench_path=bench_path, verbose=verbose)", " File \"/home/erp_jmi/.bench/bench/app.py\", line 171, in install_app", " find_links=find_links))", " File \"/home/erp_jmi/.bench/bench/utils.py\", line 159, in exec_cmd", " raise CommandFailedError(cmd)", "bench.utils.CommandFailedError: ./env/bin/pip install -q -e ./apps/erpnext "], "stdout": "('installing', u'erpnext')", "stdout_lines": ["('installing', u'erpnext')"]}
to retry, use: --limit @/tmp/.bench/playbooks/site.retry
PLAY RECAP *********************************************************************
localhost : ok=72 changed=16 unreachable=0 failed=1
Traceback (most recent call last):
File "install.py", line 425, in <module>
install_bench(args)
File "install.py", line 122, in install_bench
run_playbook('site.yml', sudo=True, extra_vars=extra_vars)
File "install.py", line 338, in run_playbook
success = subprocess.check_call(args, cwd=os.path.join(cwd, 'playbooks'))
File "/usr/lib/python2.7/subprocess.py", line 190, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['ansible-playbook', '-c', 'local', 'site.yml', '-e', '@/tmp/extra_vars.json', '--become', '--become-user=erp_jmi']' returned non-zero exit status 2
If anyone has a work-around, please advise.
BKM