Error In installing ERPNext stack in Ubuntu 20.04 : ansible-playbook error

Information about bug

I have a fresh VPS installation of Ubuntu 20.04 on Contabo. Tried Installing Erpnext on Ubuntu more than 3 times and got the same error :point_down:
[WARNING]: No inventory was parsed, only implicit localhost is available [WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all' Traceback (most recent call last): File "", line 497, in <module> install_bench(args) File "", line 278, in install_bench run_playbook('site.yml', sudo=True, extra_vars=extra_vars) File "", line 413, in run_playbook success = subprocess.check_call(args, cwd=playbooks_folder, stdout=log_stream, stderr=sys.stderr) File "/usr/lib/python3.8/", line 364, 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.

The Log file shows the error of not being able to connect to the database :point_down:

Both types of installation - with and without the verbose tag - gives an error.
Also tried to add root password to the \etc\mysql\.my.cnf file, but still gave an error…

Added the following lines to .my.cnf :point_down:
user=root password=######

You can follow this guide for the installation-

Follow this guide and install manually. It has worked with me every time.

To solve the error, create a new db user and set password. Give elevated rights to the user.

Whenever giving the command append
--mariadb-root-username MYSQL_USER --mariadb-root-password

This should work.

NM, My error was solved using this guide :point_down:


Please check the version of python installed in your computer via command --> python -V.

ERPNext required the python version 3.8+. if your python version is lower than this please upgrade the python by following below steps and after that continue with guide.

    sudo apt update
    sudo apt install software-properties-common
    sudo add-apt-repository ppa:deadsnakes/ppa
    sudo apt install python3.8 python3.8-dev
    cd /home/frappe/frappe-bench
    mv env env-old
    virtualenv --python python3.8 env
    env/bin/pip install -U pip
    env/bin/pip install -e apps/frappe -e apps/erpnext

After this you may continue with the steps in the guides.

Get an error: Fluent installation, but have to run the command bench start after every restart… Think its an NPX(caniuse-lite) error

Fixed the error… It was indeed an NPX issue… Nginx needed to be restarted as the old(past) version had some dependencies which needed to be reloaded…
For Future Reference…
#In the Bench directory
npm init
npm update caniuse-lite browserslist
yarn install
yarn upgrade caniuse-lite browserlist

That should particularly fix the bench start at restart problem

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.