Having problems with local install

trying to run test server, hosted locally

TASK [Create new site] *****************************************************************************
fatal: [localhost]: FAILED! => {"changed": true, "cmd": ["bench", "new-site", "site1.local", "--admin-password", "password", "--mariadb-root-password", "password"], "delta": "0:00:01.111037", "end": "2018-01-18 13:38:14.834986", "failed": true, "rc": 1, "start": "2018-01-18 13:38:13.723949", "stderr": "ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)", "stderr_lines": ["ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)"], "stdout": "Database not installed, this can due to lack of permission, or that the database name exists.\nCheck your mysql root password, or use --force to reinstall", "stdout_lines": ["Database not installed, this can due to lack of permission, or that the database name exists.", "Check your mysql root password, or use --force to reinstall"]}
        to retry, use: --limit @/tmp/.bench/playbooks/production/install.retry

PLAY RECAP *****************************************************************************************
localhost                  : ok=69   changed=41   unreachable=0    failed=1

Traceback (most recent call last):
  File "install.py", line 388, in <module>
    install_bench(args)
  File "install.py", line 114, in install_bench
    run_playbook('production/install.yml', sudo=True, extra_vars=extra_vars)
  File "install.py", line 326, 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
frappe@ERP:~$

I used the instructions in github. Im always running to this error

Hey Lenard ,

Check this post !!
https://discuss.frappe.io/t/wkhtmltopdf-error-erpnext-v8/24400/10

1 Like

Ill look into this

TASK [Install erpnext app] *************************************************************************
fatal: [localhost]: FAILED! => {"changed": true, "cmd": ["bench", "--site", "site1.local", "install-app", "erpnext"], "delta": "0:00:00.918040", "end": "2018-01-18 19:20:19.782273", "failed": true, "rc": 1, "start": "2018-01-18 19:20:18.864233", "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 94, in <module>\n    main()\n  File \"/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py\", line 18, 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 165, in install_app\n    _install_app(app, verbose=context.verbose)\n  File \"/home/frappe/frappe-bench/apps/frappe/frappe/installer.py\", line 109, in install_app\n    frappe.clear_cache()\n  File \"/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py\", line 516, in clear_cache\n    for fn in get_hooks(\"clear_cache\"):\n  File \"/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py\", line 832, 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 72, in get_value\n    val = generator()\n  File \"/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py\", line 810, 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 774, 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 719, in get_global\n    return self.get_default(key, user)\n  File \"/home/frappe/frappe-bench/apps/frappe/frappe/database.py\", line 731, in get_default\n    d = self.get_defaults(key, parent)\n  File \"/home/frappe/frappe-bench/apps/frappe/frappe/database.py\", line 737, in get_defaults\n    defaults = frappe.defaults.get_defaults(parent)\n  File \"/home/frappe/frappe-bench/apps/frappe/frappe/defaults.py\", line 57, in get_defaults\n    globald = get_defaults_for()\n  File \"/home/frappe/frappe-bench/apps/frappe/frappe/defaults.py\", line 177, 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 166, in sql\n    self._cursor.execute(query, values)\n  File \"/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/cursors.py\", line 165, in execute\n    result = self._query(query)\n  File \"/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/cursors.py\", line 321, in _query\n    conn.query(q)\n  File \"/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/connections.py\", line 860, in query\n    self._affected_rows = self._read_query_result(unbuffered=unbuffered)\n  File \"/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/connections.py\", line 1061, in _read_query_result\n    result.read()\n  File \"/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/connections.py\", line 1349, in read\n    first_packet = self.connection._read_packet()\n  File \"/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/connections.py\", line 1018, in _read_packet\n    packet.check_error()\n  File \"/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/connections.py\", line 384, in check_error\n    err.raise_mysql_exception(self._data)\n  File \"/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/err.py\", line 107, in raise_mysql_exception\n    raise errorclass(errno, errval)\npymysql.err.ProgrammingError: (1146, u\"Table '1bd3e0294da19198.tabDefaultValue' doesn't exist\")", "stderr_lines": ["Traceback (most recent call last):", "  File \"/usr/lib/python2.7/runpy.py\", line 174, in _run_module_as_main", "    \"__main__\", fname, loader, pkg_name)", "  File \"/usr/lib/python2.7/runpy.py\", line 72, in _run_code", "    exec code in run_globals", "  File \"/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py\", line 94, in <module>", "    main()", "  File \"/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py\", line 18, in main", "    click.Group(commands=commands)(prog_name='bench')", "  File \"/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py\", line 722, in __call__", "    return self.main(*args, **kwargs)", "  File \"/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py\", line 697, in main", "    rv = self.invoke(ctx)", "  File \"/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py\", line 1066, in invoke", "    return _process_result(sub_ctx.command.invoke(sub_ctx))", "  File \"/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py\", line 1066, in invoke", "    return _process_result(sub_ctx.command.invoke(sub_ctx))", "  File \"/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py\", line 895, in invoke", "    return ctx.invoke(self.callback, **ctx.params)", "  File \"/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py\", line 535, in invoke", "    return callback(*args, **kwargs)", "  File \"/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/decorators.py\", line 17, in new_func", "    return f(get_current_context(), *args, **kwargs)", "  File \"/home/frappe/frappe-bench/apps/frappe/frappe/commands/__init__.py\", line 24, in _func", "    ret = f(frappe._dict(ctx.obj), *args, **kwargs)", "  File \"/home/frappe/frappe-bench/apps/frappe/frappe/commands/site.py\", line 165, in install_app", "    _install_app(app, verbose=context.verbose)", "  File \"/home/frappe/frappe-bench/apps/frappe/frappe/installer.py\", line 109, in install_app", "    frappe.clear_cache()", "  File \"/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py\", line 516, in clear_cache", "    for fn in get_hooks(\"clear_cache\"):", "  File \"/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py\", line 832, in get_hooks", "    hooks = _dict(cache().get_value(\"app_hooks\", load_app_hooks))", "  File \"/home/frappe/frappe-bench/apps/frappe/frappe/utils/redis_wrapper.py\", line 72, in get_value", "    val = generator()", "  File \"/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py\", line 810, in load_app_hooks", "    for app in [app_name] if app_name else get_installed_apps(sort=True):", "  File \"/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py\", line 774, in get_installed_apps", "    installed = json.loads(db.get_global(\"installed_apps\") or \"[]\")", "  File \"/home/frappe/frappe-bench/apps/frappe/frappe/database.py\", line 719, in get_global", "    return self.get_default(key, user)", "  File \"/home/frappe/frappe-bench/apps/frappe/frappe/database.py\", line 731, in get_default", "    d = self.get_defaults(key, parent)", "  File \"/home/frappe/frappe-bench/apps/frappe/frappe/database.py\", line 737, in get_defaults", "    defaults = frappe.defaults.get_defaults(parent)", "  File \"/home/frappe/frappe-bench/apps/frappe/frappe/defaults.py\", line 57, in get_defaults", "    globald = get_defaults_for()", "  File \"/home/frappe/frappe-bench/apps/frappe/frappe/defaults.py\", line 177, in get_defaults_for", "    where parent = %s order by creation\"\"\", (parent,), as_dict=1)", "  File \"/home/frappe/frappe-bench/apps/frappe/frappe/database.py\", line 166, in sql", "    self._cursor.execute(query, values)", "  File \"/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/cursors.py\", line 165, in execute", "    result = self._query(query)", "  File \"/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/cursors.py\", line 321, in _query", "    conn.query(q)", "  File \"/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/connections.py\", line 860, in query", "    self._affected_rows = self._read_query_result(unbuffered=unbuffered)", "  File \"/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/connections.py\", line 1061, in _read_query_result", "    result.read()", "  File \"/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/connections.py\", line 1349, in read", "    first_packet = self.connection._read_packet()", "  File \"/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/connections.py\", line 1018, in _read_packet", "    packet.check_error()", "  File \"/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/connections.py\", line 384, in check_error", "    err.raise_mysql_exception(self._data)", "  File \"/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/err.py\", line 107, in raise_mysql_exception", "    raise errorclass(errno, errval)", "pymysql.err.ProgrammingError: (1146, u\"Table '1bd3e0294da19198.tabDefaultValue' doesn't exist\")"], "stdout": "", "stdout_lines": []}
    to retry, use: --limit @/tmp/.bench/playbooks/production/install.retry

PLAY RECAP *****************************************************************************************
localhost                  : ok=64   changed=11   unreachable=0    failed=1

Traceback (most recent call last):
  File "install.py", line 388, in <module>
install_bench(args)
  File "install.py", line 114, in install_bench
run_playbook('production/install.yml', sudo=True, extra_vars=extra_vars)
  File "install.py", line 326, 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 got a bigger error

@Lenard the 1st error log suggests it’s a MariaDB error.
Have sent in a PR in bench, fix for ubuntu and centOS by codingCoffee · Pull Request #544 · frappe/bench · GitHub
Will be merged and fixed soon

@codingCoffee PR won’t fix the db issue of Mariadb 10.2 configuration. However, it might fix the /home/root issue on CentOS. You can follow these instructions to get the system running on any supported platform.

https://jwrober.github.io/erpnext_admin_guide/i-u-b/install