Try ERPNext Buy Support Partners Foundation Foundation Members

Installation error erpnext - easy installation

I get the following error while trying to install erpnext easy installation (in ubuntu 16.04 and 18.04 x64 vultr servers)

raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command ‘[‘ansible-playbook’, ‘-c’, ‘local’, ‘site.yml’, ‘-vvvv’, ‘-e’, ‘@/tmp/extra_vars.json’, ‘–become’, ‘–become-user=frappe’]’ returned non-zero exit status 2

Please help!

1 Like

Probably permissions. Is the install user a sudoer?

TASK [common : include_tasks] **************************************************
task path: /tmp/.bench/playbooks/roles/common/tasks/debian_family.yml:39
included: /tmp/.bench/playbooks/roles/common/tasks/ubuntu.yml for localhost

TASK [common : install pillow prerequisites for Ubuntu < 14.04] ****************
task path: /tmp/.bench/playbooks/roles/common/tasks/ubuntu.yml:3
[DEPRECATION WARNING]: Invoking “apt” only once while using a loop via
squash_actions is deprecated. Instead of using a loop to supply multiple items
and specifying pkg: "{{ item }}", please use pkg: ['libjpeg8-dev', 'libtiff4-dev', 'tcl8.5-dev', 'tk8.5-dev'] and remove the loop. This feature
will be removed in version 2.11. Deprecation warnings can be disabled by
setting deprecation_warnings=False in ansible.cfg.
fatal: [localhost]: FAILED! => {
“msg”: “The conditional check ‘ansible_distribution_version | version_compar e(‘14.04’, ‘lt’)’ failed. The error was: template error while templating string: no filter named ‘version_compare’. String: {% if ansible_distribution_version | version_compare(‘14.04’, ‘lt’) %} True {% else %} False {% endif %}\n\nThe erro r appears to be in ‘/tmp/.bench/playbooks/roles/common/tasks/ubuntu.yml’: line 3 , column 3, but may\nbe elsewhere in the file depending on the exact syntax prob lem.\n\nThe offending line appears to be:\n\n\n- name: install pillow prerequisi tes for Ubuntu < 14.04\n ^ here\n”
}

PLAY RECAP *********************************************************************
localhost : ok=4 changed=1 unreachable=0 failed=1 s kipped=1 rescued=0 ignored=0

Traceback (most recent call last):
File “install.py”, line 413, in
install_bench(args)
File “install.py”, line 135, in install_bench
run_playbook(‘site.yml’, sudo=True, extra_vars=extra_vars)
File “install.py”, line 327, 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’, ‘sit e.yml’, ‘-vvvv’, ‘-e’, ‘@/tmp/extra_vars.json’, ‘–become’, ‘–become-user=frapp e’]’ returned non-zero exit status 2

Don’t understand please explain some more. The command ran with sudo. Are you saying frappe user need to be sudo?

   "Updating DocTypes for frappe        : [======================================  ]",
    "Updating DocTypes for frappe        : [======================================  ]",
    "Updating DocTypes for frappe        : [======================================  ]",
    "Updating DocTypes for frappe        : [======================================  ]",
    "Updating DocTypes for frappe        : [======================================  ]",
    "Updating DocTypes for frappe        : [======================================= ]",
    "Updating DocTypes for frappe        : [======================================= ]",
    "Updating DocTypes for frappe        : [======================================= ]",
    "Updating DocTypes for frappe        : [======================================= ]",
    "Updating DocTypes for frappe        : [======================================= ]",
    "Updating DocTypes for frappe        : [========================================]"
]

}

PLAY RECAP ***********************************************************************************************
localhost : ok=79 changed=42 unreachable=0 failed=1 skipped=52 rescued=0 ignored=0

Traceback (most recent call last):
File “install.py”, line 413, in
install_bench(args)
File “install.py”, line 135, in install_bench
run_playbook(‘site.yml’, sudo=True, extra_vars=extra_vars)
File “install.py”, line 327, 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’, ‘-vvvv’, ‘-e’, ‘@/tmp/extra_vars.json’, ‘–become’, ‘–become-user=frappe’]’ returned non-zero exit status 2

Try this for now,
I’m testing my solution and it worked fine on ubuntu 16 server,
didn’t try it on Clean Ubuntu 18

python install.py --develop --version 11 --user frappe --repo-url https://github.com/ammarhararah/bench.git

I have made some changes on my fork of bench repo to adapt with ansible version,
since the old yml files of the bench are ready only for ansible <= 2.5
and the bench automatically installs last version (2.9)

bench fork link

Edit: Of course you can specify the version you want as usual, the necessary part is this flag

--repo-url https://github.com/ammarhararah/bench.git

Or Try this solution:

I tried this method, erpnext does get installed. Then i setup production, and i get the following error

What should I do now?

bench --site site1.local reinstall