Please help
Error as:
TASK [bench : Install ERPNext to default site] **********************************************************************************************
task path: /tmp/.bench/playbooks/roles/bench/tasks/setup_erpnext.yml:23
<127.0.0.1> ESTABLISH LOCAL CONNECTION FOR USER: root
<127.0.0.1> EXEC /bin/sh -c ‘echo ~root && sleep 0’
<127.0.0.1> EXEC /bin/sh -c ‘( umask 77 && mkdir -p “echo /var/tmp/ansible-tmp-1598170810.0289495-138937659364274
” && echo ansible-tmp-1598170810.0289495-138937659364274=“echo /var/tmp/ansible-tmp-1598170810.0289495-138937659364274
” ) && sleep 0’
Using module file /usr/local/lib/python3.8/dist-packages/ansible/modules/commands/command.py
<127.0.0.1> PUT /root/.ansible/tmp/ansible-local-4869l22xp_aw/tmpdke7c8u0 TO /var/tmp/ansible-tmp-1598170810.0289495-138937659364274/AnsiballZ_command.py
<127.0.0.1> EXEC /bin/sh -c ‘setfacl -m u:anand:r-x /var/tmp/ansible-tmp-1598170810.0289495-138937659364274/ /var/tmp/ansible-tmp-1598170810.0289495-138937659364274/AnsiballZ_command.py && sleep 0’
<127.0.0.1> EXEC /bin/sh -c ‘sudo -H -S -n -u anand /bin/sh -c ‘"’“‘echo BECOME-SUCCESS-avqdaslggptjwaotmoapqrszznbrpsia ; /usr/bin/python3 /var/tmp/ansible-tmp-1598170810.0289495-138937659364274/AnsiballZ_command.py’”’“’ && sleep 0’
<127.0.0.1> EXEC /bin/sh -c ‘rm -f -r /var/tmp/ansible-tmp-1598170810.0289495-138937659364274/ > /dev/null 2>&1 && sleep 0’
fatal: [localhost]: FAILED! => {
“changed”: true,
“cmd”: [
“bench”,
“–site”,
“site1.local”,
“install-app”,
“erpnext”
],
“delta”: “0:00:10.896774”,
“end”: “2020-08-23 01:20:21.214546”,
“invocation”: {
“module_args”: {
“_raw_params”: “bench --site site1.local install-app erpnext”,
“_uses_shell”: false,
“argv”: null,
“chdir”: “/home/anand/frappe-bench”,
“creates”: null,
“executable”: null,
“removes”: null,
“stdin”: null,
“stdin_add_newline”: true,
“strip_empty_ends”: true,
“warn”: true
}
},
“msg”: “non-zero return code”,
“rc”: 1,
“start”: “2020-08-23 01:20:10.317772”,
“stderr”: “Traceback (most recent call last):\n File "/usr/lib/python3.8/runpy.py", line 193, in _run_module_as_main\n return _run_code(code, main_globals, None,\n File "/usr/lib/python3.8/runpy.py", line 86, in _run_code\n exec(code, run_globals)\n File "/home/anand/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 99, in \n main()\n File "/home/anand/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 18, in main\n click.Group(commands=commands)(prog_name=‘bench’)\n File "/home/anand/frappe-bench/env/lib/python3.8/site-packages/click/core.py", line 764, in call\n return self.main(*args, **kwargs)\n File "/home/anand/frappe-bench/env/lib/python3.8/site-packages/click/core.py", line 717, in main\n rv = self.invoke(ctx)\n File "/home/anand/frappe-bench/env/lib/python3.8/site-packages/click/core.py", line 1137, in invoke\n return _process_result(sub_ctx.command.invoke(sub_ctx))\n File "/home/anand/frappe-bench/env/lib/python3.8/site-packages/click/core.py", line 1137, in invoke\n return _process_result(sub_ctx.command.invoke(sub_ctx))\n File "/home/anand/frappe-bench/env/lib/python3.8/site-packages/click/core.py", line 956, in invoke\n return ctx.invoke(self.callback, **ctx.params)\n File "/home/anand/frappe-bench/env/lib/python3.8/site-packages/click/core.py", line 555, in invoke\n return callback(*args, **kwargs)\n File "/home/anand/frappe-bench/env/lib/python3.8/site-packages/click/decorators.py", line 17, in new_func\n return f(get_current_context(), *args, **kwargs)\n File "/home/anand/frappe-bench/apps/frappe/frappe/commands/init.py", line 26, in _func\n ret = f(frappe._dict(ctx.obj), *args, **kwargs)\n File "/home/anand/frappe-bench/apps/frappe/frappe/commands/site.py", line 203, in install_app\n _install_app(app, verbose=context.verbose)\n File "/home/anand/frappe-bench/apps/frappe/frappe/installer.py", line 51, in install_app\n frappe.clear_cache()\n File "/home/anand/frappe-bench/apps/frappe/frappe/init.py", line 581, in clear_cache\n frappe.cache_manager.clear_user_cache()\n File "/home/anand/frappe-bench/apps/frappe/frappe/cache_manager.py", line 43, in clear_user_cache\n clear_global_cache()\n File "/home/anand/frappe-bench/apps/frappe/frappe/cache_manager.py", line 54, in clear_global_cache\n clear_website_cache()\n File "/home/anand/frappe-bench/apps/frappe/frappe/website/render.py", line 328, in clear_cache\n for method in frappe.get_hooks("website_clear_cache"):\n File "/home/anand/frappe-bench/apps/frappe/frappe/init.py", line 958, in get_hooks\n hooks = _dict(cache().get_value("app_hooks", load_app_hooks))\n File "/home/anand/frappe-bench/apps/frappe/frappe/utils/redis_wrapper.py", line 79, in get_value\n val = generator()\n File "/home/anand/frappe-bench/apps/frappe/frappe/init.py", line 932, in load_app_hooks\n for app in [app_name] if app_name else get_installed_apps(sort=True):\n File "/home/anand/frappe-bench/apps/frappe/frappe/init.py", line 896, in get_installed_apps\n installed = json.loads(db.get_global("installed_apps") or "[]")\n File "/home/anand/frappe-bench/apps/frappe/frappe/database/database.py", line 702, in get_global\n return self.get_default(key, user)\n File "/home/anand/frappe-bench/apps/frappe/frappe/database/database.py", line 706, in get_default\n d = self.get_defaults(key, parent)\n File "/home/anand/frappe-bench/apps/frappe/frappe/database/database.py", line 724, in get_defaults\n defaults = frappe.defaults.get_defaults(parent)\n File "/home/anand/frappe-bench/apps/frappe/frappe/defaults.py", line 77, in get_defaults\n globald = get_defaults_for()\n File "/home/anand/frappe-bench/apps/frappe/frappe/defaults.py", line 203, in get_defaults_for\n res = frappe.db.sql("""select defkey, defvalue from tabDefaultValue
\n File "/home/anand/frappe-bench/apps/frappe/frappe/database/database.py", line 122, in sql\n self.connect()\n File "/home/anand/frappe-bench/apps/frappe/frappe/database/database.py", line 75, in connect\n self._conn = self.get_connection()\n File "/home/anand/frappe-bench/apps/frappe/frappe/database/mariadb/database.py", line 88, in get_connection\n conn = pymysql.connect(self.host, self.user or ‘’, self.password or ‘’,\n File "/home/anand/frappe-bench/env/lib/python3.8/site-packages/pymysql/init.py", line 94, in Connect\n return Connection(*args, **kwargs)\n File "/home/anand/frappe-bench/env/lib/python3.8/site-packages/pymysql/connections.py", line 325, in init\n self.connect()\n File "/home/anand/frappe-bench/env/lib/python3.8/site-packages/pymysql/connections.py", line 599, in connect\n self._request_authentication()\n File "/home/anand/frappe-bench/env/lib/python3.8/site-packages/pymysql/connections.py", line 861, in _request_authentication\n auth_packet = self._read_packet()\n File "/home/anand/frappe-bench/env/lib/python3.8/site-packages/pymysql/connections.py", line 684, in _read_packet\n packet.check_error()\n File "/home/anand/frappe-bench/env/lib/python3.8/site-packages/pymysql/protocol.py", line 220, in check_error\n err.raise_mysql_exception(self._data)\n File "/home/anand/frappe-bench/env/lib/python3.8/site-packages/pymysql/err.py", line 109, in raise_mysql_exception\n raise errorclass(errno, errval)\npymysql.err.InternalError: (1698, "Access denied for user ‘_1bd3e0294da19198’@‘localhost’")”,
“stderr_lines”: [
“Traceback (most recent call last):”,
" File "/usr/lib/python3.8/runpy.py", line 193, in _run_module_as_main”,
" return _run_code(code, main_globals, None,“,
" File "/usr/lib/python3.8/runpy.py", line 86, in _run_code”,
" exec(code, run_globals)“,
" File "/home/anand/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 99, in ”,
" main()“,
" File "/home/anand/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 18, in main”,
" click.Group(commands=commands)(prog_name=‘bench’)“,
" File "/home/anand/frappe-bench/env/lib/python3.8/site-packages/click/core.py", line 764, in call”,
" return self.main(*args, **kwargs)“,
" File "/home/anand/frappe-bench/env/lib/python3.8/site-packages/click/core.py", line 717, in main”,
" rv = self.invoke(ctx)“,
" File "/home/anand/frappe-bench/env/lib/python3.8/site-packages/click/core.py", line 1137, in invoke”,
" return _process_result(sub_ctx.command.invoke(sub_ctx))“,
" File "/home/anand/frappe-bench/env/lib/python3.8/site-packages/click/core.py", line 1137, in invoke”,
" return _process_result(sub_ctx.command.invoke(sub_ctx))“,
" File "/home/anand/frappe-bench/env/lib/python3.8/site-packages/click/core.py", line 956, in invoke”,
" return ctx.invoke(self.callback, **ctx.params)“,
" File "/home/anand/frappe-bench/env/lib/python3.8/site-packages/click/core.py", line 555, in invoke”,
" return callback(*args, **kwargs)“,
" File "/home/anand/frappe-bench/env/lib/python3.8/site-packages/click/decorators.py", line 17, in new_func”,
" return f(get_current_context(), *args, **kwargs)“,
" File "/home/anand/frappe-bench/apps/frappe/frappe/commands/init.py", line 26, in _func”,
" ret = f(frappe._dict(ctx.obj), *args, **kwargs)“,
" File "/home/anand/frappe-bench/apps/frappe/frappe/commands/site.py", line 203, in install_app”,
" _install_app(app, verbose=context.verbose)“,
" File "/home/anand/frappe-bench/apps/frappe/frappe/installer.py", line 51, in install_app”,
" frappe.clear_cache()“,
" File "/home/anand/frappe-bench/apps/frappe/frappe/init.py", line 581, in clear_cache”,
" frappe.cache_manager.clear_user_cache()“,
" File "/home/anand/frappe-bench/apps/frappe/frappe/cache_manager.py", line 43, in clear_user_cache”,
" clear_global_cache()“,
" File "/home/anand/frappe-bench/apps/frappe/frappe/cache_manager.py", line 54, in clear_global_cache”,
" clear_website_cache()“,
" File "/home/anand/frappe-bench/apps/frappe/frappe/website/render.py", line 328, in clear_cache”,
" for method in frappe.get_hooks("website_clear_cache"):“,
" File "/home/anand/frappe-bench/apps/frappe/frappe/init.py", line 958, in get_hooks”,
" hooks = _dict(cache().get_value("app_hooks", load_app_hooks))“,
" File "/home/anand/frappe-bench/apps/frappe/frappe/utils/redis_wrapper.py", line 79, in get_value”,
" val = generator()“,
" File "/home/anand/frappe-bench/apps/frappe/frappe/init.py", line 932, in load_app_hooks”,
" for app in [app_name] if app_name else get_installed_apps(sort=True):“,
" File "/home/anand/frappe-bench/apps/frappe/frappe/init.py", line 896, in get_installed_apps”,
" installed = json.loads(db.get_global("installed_apps") or "[]")“,
" File "/home/anand/frappe-bench/apps/frappe/frappe/database/database.py", line 702, in get_global”,
" return self.get_default(key, user)“,
" File "/home/anand/frappe-bench/apps/frappe/frappe/database/database.py", line 706, in get_default”,
" d = self.get_defaults(key, parent)“,
" File "/home/anand/frappe-bench/apps/frappe/frappe/database/database.py", line 724, in get_defaults”,
" defaults = frappe.defaults.get_defaults(parent)“,
" File "/home/anand/frappe-bench/apps/frappe/frappe/defaults.py", line 77, in get_defaults”,
" globald = get_defaults_for()“,
" File "/home/anand/frappe-bench/apps/frappe/frappe/defaults.py", line 203, in get_defaults_for”,
" res = frappe.db.sql("""select defkey, defvalue from tabDefaultValue
",
" File "/home/anand/frappe-bench/apps/frappe/frappe/database/database.py", line 122, in sql",
" self.connect()“,
" File "/home/anand/frappe-bench/apps/frappe/frappe/database/database.py", line 75, in connect”,
" self._conn = self.get_connection()“,
" File "/home/anand/frappe-bench/apps/frappe/frappe/database/mariadb/database.py", line 88, in get_connection”,
" conn = pymysql.connect(self.host, self.user or ‘’, self.password or ‘’,“,
" File "/home/anand/frappe-bench/env/lib/python3.8/site-packages/pymysql/init.py", line 94, in Connect”,
" return Connection(*args, **kwargs)“,
" File "/home/anand/frappe-bench/env/lib/python3.8/site-packages/pymysql/connections.py", line 325, in init”,
" self.connect()“,
" File "/home/anand/frappe-bench/env/lib/python3.8/site-packages/pymysql/connections.py", line 599, in connect”,
" self._request_authentication()“,
" File "/home/anand/frappe-bench/env/lib/python3.8/site-packages/pymysql/connections.py", line 861, in _request_authentication”,
" auth_packet = self._read_packet()“,
" File "/home/anand/frappe-bench/env/lib/python3.8/site-packages/pymysql/connections.py", line 684, in _read_packet”,
" packet.check_error()“,
" File "/home/anand/frappe-bench/env/lib/python3.8/site-packages/pymysql/protocol.py", line 220, in check_error”,
" err.raise_mysql_exception(self._data)“,
" File "/home/anand/frappe-bench/env/lib/python3.8/site-packages/pymysql/err.py", line 109, in raise_mysql_exception”,
" raise errorclass(errno, errval)",
“pymysql.err.InternalError: (1698, "Access denied for user ‘_1bd3e0294da19198’@‘localhost’")”
],
“stdout”: “”,
“stdout_lines”: []
}
PLAY RECAP **********************************************************************************************************************************
localhost : ok=73 changed=17 unreachable=0 failed=1 skipped=65 rescued=0 ignored=0
Traceback (most recent call last):
File “install.py”, line 464, in
install_bench(args)
File “install.py”, line 260, in install_bench
run_playbook(‘site.yml’, sudo=True, extra_vars=extra_vars)
File “install.py”, line 384, in run_playbook
success = subprocess.check_call(args, cwd=playbooks_folder, stdout=log_stream, stderr=sys.stderr)
File “/usr/lib/python3.8/subprocess.py”, 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=anand’]’ returned non-zero exit status 2.