Can't Install erpnext production

Hi Team ,

I am getting this error after trying to install production on ubundu .

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.237309”, “end”: “2018-01-29 07:40:12.653515”, “failed”: true, “rc”: 1, “start”: “2018-01-29 07:40:11.416206”, “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 \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/apps/frappe/frappe/commands/site.py”, line 34, 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 65, 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 36, in install_db\n create_database_and_user(force, verbose)\n File “/home/frappe/frappe-bench/apps/frappe/frappe/installer.py”, line 60, in create_database_and_user\n if force or (db_name not in dbman.get_database_list()):\n File “/home/frappe/frappe-bench/apps/frappe/frappe/model/db_schema.py”, line 549, in get_database_list\n return [d[0] for d in self.db.sql(“SHOW DATABASES”)]\n File “/home/frappe/frappe-bench/apps/frappe/frappe/database.py”, line 136, in sql\n self.connect()\n File “/home/frappe/frappe-bench/apps/frappe/frappe/database.py”, line 86, in connect\n charset=‘utf8mb4’, use_unicode = True, conv = conversions)\n File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/init.py”, line 90, in Connect\n return Connection(*args, **kwargs)\n File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/connections.py”, line 699, in init\n self.connect()\n File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/connections.py”, line 936, in connect\n self._request_authentication()\n File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/connections.py”, line 1156, in _request_authentication\n auth_packet = self._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.OperationalError: (1045, u"Access denied for user ‘root’@‘localhost’ (using password: YES)”)", “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 “, " 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/apps/frappe/frappe/commands/site.py”, line 34, in new_site", " verbose=verbose, install_apps=install_app, source_sql=source_sql, force=force)", " File “/home/frappe/frappe-bench/apps/frappe/frappe/commands/site.py”, line 65, in _new_site", " admin_password=admin_password, verbose=verbose, source_sql=source_sql,force=force, reinstall=reinstall)", " File “/home/frappe/frappe-bench/apps/frappe/frappe/installer.py”, line 36, in install_db", " create_database_and_user(force, verbose)", " File “/home/frappe/frappe-bench/apps/frappe/frappe/installer.py”, line 60, in create_database_and_user", " if force or (db_name not in dbman.get_database_list()):", " File “/home/frappe/frappe-bench/apps/frappe/frappe/model/db_schema.py”, line 549, in get_database_list", " return [d[0] for d in self.db.sql(“SHOW DATABASES”)]", " File “/home/frappe/frappe-bench/apps/frappe/frappe/database.py”, line 136, in sql", " self.connect()", " File “/home/frappe/frappe-bench/apps/frappe/frappe/database.py”, line 86, in connect", " charset=‘utf8mb4’, use_unicode = True, conv = conversions)", " File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/init.py”, line 90, in Connect", " return Connection(*args, **kwargs)", " File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/connections.py”, line 699, in init", " self.connect()", " File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/connections.py”, line 936, in connect", " self._request_authentication()", " File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/connections.py”, line 1156, in _request_authentication", " auth_packet = self._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.OperationalError: (1045, u"Access denied for user ‘root’@‘localhost’ (using password: YES)”)"], “stdout”: “”, “stdout_lines”: []}
to retry, use: --limit @/tmp/.bench/playbooks/production/install.retry

PLAY RECAP *****************************************************************************************************************************************************
localhost : ok=76 changed=46 unreachable=0 failed=1

Follow this :slight_smile:

  1. Download the install script
    For Linux:

wget https://raw.githubusercontent.com/frappe/bench/master/playbooks/install.py

  1. Run the install script
    If you are on a fresh server and logged in as root, use --user flag to create a user and install using that user

sudo python install.py --production

let me know if it’s working

Thank you for your reply…Will let you know…the output

1 Like

Thank you so much…I have installed production and can u share me the command to start production…I tried this command to start But not wokring
"sudo bench setup production "

run the following

sudo passwd frappe ( and setup password for frappe)

su frappe ( and insert the password)

cd /home/frappe/frappe-bench

bench setup production

bench restart

Thank you so much…It worked…

Also have a look at the Fail2ban service. I disabled it to work properly… Otherwise it was adding my office IP to Firewall and blocking my connection for 6 minutes.

Now I am using VM copy downloaded from ERPNEXT on AWS