Setup fails while installing using EasyInstall Script

Hi Guys.

 So i am trying to install ERPNext for production, I am using EasyInstall Script. Below my VPS configuration

Ubuntu 16.04.2 LTS
Maria DB 10.1.22

Following errors are i am getting

TASK [Set root Password] *******************************************************
fatal: [localhost]: FAILED! => {“changed”: true, “cmd”: [“mysqladmin”, “-u”, “root”, “password”, “my_password”], “delta”: “0:00:00.006345”, “end”: “2017-03-25 20:47:28.888583”, “failed”: true, “rc”: 1, “start”: “2017-03-25 20:47:28.882238”, “stderr”: “\u0007mysqladmin: connect to server at ‘localhost’ failed\nerror: ‘Access denied for user ‘root’@‘localhost’ (using password: NO)’”, “stdout”: “”, “stdout_lines”: [], “warnings”: []}
…ignoring

TASK [Install erpnext app] *****************************************************
fatal: [localhost]: FAILED! => {“changed”: true, “cmd”: [“bench”, “–site”, “site1.local”, “install-app”, “erpnext”], “delta”: “0:00:01.016902”, “end”: “2017-03-25 20:47:40.499933”, “failed”: true, “rc”: 1, “start”: “2017-03-25 20:47:39.483031”, “stderr”: “Traceback (most recent call last):\n File “/usr/lib/python2.7/runpy.py”, line 174, 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 \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/env/local/lib/python2.7/site-packages/click/decorators.py”, line 17, in new_func\n return f(get_current_context(), *args, **kwargs)\n File “/home/frappe/frappe-bench/apps/frappe/frappe/commands/init.py”, line 24, in _func\n ret = f(frappe._dict(ctx.obj), *args, **kwargs)\n File “/home/frappe/frappe-bench/apps/frappe/frappe/commands/site.py”, line 152, in install_app\n _install_app(app, verbose=context.verbose)\n File “/home/frappe/frappe-bench/apps/frappe/frappe/installer.py”, line 101, in install_app\n frappe.clear_cache()\n File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 475, in clear_cache\n for fn in get_hooks(“clear_cache”):\n File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 791, in get_hooks\n hooks = _dict(cache().get_value(“app_hooks”, load_app_hooks))\n File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/redis_wrapper.py”, line 70, in get_value\n val = generator()\n File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 769, in load_app_hooks\n for app in [app_name] if app_name else get_installed_apps(sort=True):\n File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 733, in get_installed_apps\n installed = json.loads(db.get_global(“installed_apps”) or “[]”)\n File “/home/frappe/frappe-bench/apps/frappe/frappe/database.py”, line 688, in get_global\n return self.get_default(key, user)\n File “/home/frappe/frappe-bench/apps/frappe/frappe/database.py”, line 700, in get_default\n d = self.get_defaults(key, parent)\n File “/home/frappe/frappe-bench/apps/frappe/frappe/database.py”, line 706, in get_defaults\n defaults = frappe.defaults.get_defaults(parent)\n File “/home/frappe/frappe-bench/apps/frappe/frappe/defaults.py”, line 72, in get_defaults\n globald = get_defaults_for()\n File “/home/frappe/frappe-bench/apps/frappe/frappe/defaults.py”, line 180, in get_defaults_for\n where parent = %s order by creation”"", (parent,), as_dict=1)\n File “/home/frappe/frappe-bench/apps/frappe/frappe/database.py”, line 106, in sql\n self.connect()\n File “/home/frappe/frappe-bench/apps/frappe/frappe/database.py”, line 52, in connect\n use_unicode=True, charset=‘utf8’)\n File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/init.py”, line 81, in Connect\n return Connection(*args, **kwargs)\n File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/connections.py”, line 193, in init\n super(Connection, self).init(*args, **kwargs2)\n_mysql_exceptions.OperationalError: (1045, “Access denied for user ‘1bd3e0294da19198’@‘localhost’ (using password: YES)”)", “stdout”: “”, “stdout_lines”: [], “warnings”: []}

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

PLAY RECAP *********************************************************************
localhost : ok=48 changed=8 unreachable=0 failed=1

Traceback (most recent call last):
File “install.py”, line 351, in
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 541, 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

I double checked the mysql root password, It seems something else is wrong. Also i am not using UNIX_SOCKET Authentication Plugin in maridb

I think something else also broke before… Try switching to the manual method to install erpnext

bench get-app erpnext https://github.com/frappe/erpnext

Thank you Rushabh,

  finally I could install it, `bench new-site site1.local` gave me some suggestion to make changes in my.cnf, I did it and it worked