Easy install script for --production: error

hi,

i try to install erpnext via easy install script

root@PAVILION:~# sudo python install.py --production --user frappe

but I get this errrors:

TASK [restart mysql linux] *****************************************************
changed: [localhost]

TASK [Set root Password] *******************************************************
fatal: [localhost]: FAILED! => {"changed": true, "cmd": ["mysqladmin", "-u", "root", "password", "***"], "delta": "0:00:00.023016", "end": "2017-02-13 08:03:17.283291", "failed": true, "rc": 1, "start": "2017-02-13 08:03:17.260275", "stderr": "\u0007mysqladmin: connect to server at 'localhost' failed\nerror: 'Access denied for user 'root'@'localhost' (using password: NO)'", "stdout": "", "stdout_lines": [], "warnings": []}
...ignoring

TASK [add launchagents folder mac] *********************************************
skipping: [localhost]

–

`TASK [Check whether a site exists] *********************************************
ok: [localhost]

TASK [Create new site] *********************************************************
fatal: [localhost]: FAILED! => {"changed": true, "cmd": ["bench", "new-site", "site1.local", "--admin-password", "***", "--mariadb-root-password", "***"], "delta": "0:00:11.448552", "end": "2017-02-13 08:03:49.282894", "failed": true, "rc": 1, "start": "2017-02-13 08:03:37.834342", "stderr": "Traceback (most recent call last):\n  File \"/usr/lib/python2.7/runpy.py\", line 162, in _run_module_as_main\n    \"__main__\", fname, loader, pkg_name)\n  File \"/usr/lib/python2.7/runpy.py\", line 72, in _run_code\n    exec code in run_globals\n  File \"/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py\", line 79, in <module>\n    main()\n  File \"/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py\", line 16, in main\n    click.Group(commands=commands)(prog_name='bench')\n  File \"/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py\", line 722, in __call__\n    return self.main(*args, **kwargs)\n  File \"/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py\", line 697, in main\n    rv = self.invoke(ctx)\n  File \"/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py\", line 1066, in invoke\n    return _process_result(sub_ctx.command.invoke(sub_ctx))\n  File \"/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py\", line 1066, in invoke\n    return _process_result(sub_ctx.command.invoke(sub_ctx))\n  File \"/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py\", line 895, in invoke\n    return ctx.invoke(self.callback, **ctx.params)\n  File \"/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py\", line 535, in invoke\n    return callback(*args, **kwargs)\n  File \"/home/frappe/frappe-bench/apps/frappe/frappe/commands/site.py\", line 26, in new_site\n    verbose=verbose, install_apps=install_app, source_sql=source_sql, force=force)\n  File \"/home/frappe/frappe-bench/apps/frappe/frappe/commands/site.py\", line 56, in _new_site\n    admin_password=admin_password, verbose=verbose, source_sql=source_sql,force=force, reinstall=reinstall)\n  File \"/home/frappe/frappe-bench/apps/frappe/frappe/installer.py\", line 34, in install_db\n    create_database_and_user(force, verbose)\n  File \"/home/frappe/frappe-bench/apps/frappe/frappe/installer.py\", line 56, in create_database_and_user\n    raise Exception(\"Database %s already exists\" % (db_name,))\nException: Database 1bd3e0294da19198 already exists", "stdout": "", "stdout_lines": [], "warnings": []}

NO MORE HOSTS LEFT *************************************************************
        to retry, use: --limit @production/install.retry

PLAY RECAP *********************************************************************
localhost                  : ok=47   changed=10   unreachable=0    failed=1

Traceback (most recent call last):
  File "install.py", line 351, in <module>
    install_bench(args)
  File "install.py", line 111, in install_bench
    run_playbook('production/install.yml', sudo=True, extra_vars=extra_vars)
  File "install.py", line 301, 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
  1. any solutions?
  2. is there a command or script that can undo the frappe and/or erpnext installs?

try to remove mariadb-server and then reinstall

Thanks @lukptr for your suggestion, but it did not help.
I removed the database server but I get the same error :((

any other tips?

You may try using purge command to completely remove mariadb configuration files

@lukptr, I purged it but still same error my friend

you may refer (only for fresh OS installs)

1 Like

thanks @ItsRaichura