Need help with Frappe Installation

Hi Team!

I am just getting started with Frappe and i am struct in the installation process for the past 2 days.

So I am following along with the tutorials,

  1. bench init frappe-bench

I am running bench version 5.4.1 and the command gets executed with the following warnings

yarn install v1.22.10
[1/5] :mag: Validating package.json…
[2/5] :mag: Resolving packages…
[3/5] :truck: Fetching packages…
[4/5] :link: Linking dependencies…
warning " > esbuild-plugin-postcss2@0.0.9" has unmet peer dependency “less@^4.x”.
warning " > esbuild-plugin-postcss2@0.0.9" has unmet peer dependency “postcss@8.x”.
warning " > esbuild-plugin-postcss2@0.0.9" has unmet peer dependency “sass@^1.x”.
warning " > esbuild-plugin-postcss2@0.0.9" has unmet peer dependency “stylus@^0.x”.
warning “esbuild-vue > @vue/component-compiler@4.2.3” has unmet peer dependency “postcss@>=6.0”.
warning Workspaces can only be enabled in private projects.
[5/5] :hammer: Building fresh packages…

and

WARN Cannot connect to redis_cache to update assets_json

Since it is just the warning i went ahead and continued the tutorial,

  1. After starting the bench, creating app, On creating a new site i get the following error

bench new-site library.test
MySQL root password:
Traceback (most recent call last):
File “/Users/Cosmos/frappe/frappe-bench/env/lib/python3.9/site-packages/pymysql/connections.py”, line 613, in connect
sock = socket.create_connection(
File “/usr/local/Cellar/python@3.9/3.9.5/Frameworks/Python.framework/Versions/3.9/lib/python3.9/socket.py”, line 843, in create_connection
raise err
File “/usr/local/Cellar/python@3.9/3.9.5/Frameworks/Python.framework/Versions/3.9/lib/python3.9/socket.py”, line 831, in create_connection
sock.connect(sa)
ConnectionRefusedError: [Errno 61] Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/usr/local/Cellar/python@3.9/3.9.5/Frameworks/Python.framework/Versions/3.9/lib/python3.9/runpy.py”, line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File “/usr/local/Cellar/python@3.9/3.9.5/Frameworks/Python.framework/Versions/3.9/lib/python3.9/runpy.py”, line 87, in _run_code
exec(code, run_globals)
File “/Users/Cosmos/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 104, in
main()
File “/Users/Cosmos/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 18, in main
click.Group(commands=commands)(prog_name=‘bench’)
File “/Users/Cosmos/frappe/frappe-bench/env/lib/python3.9/site-packages/click/core.py”, line 829, in call
return self.main(*args, **kwargs)
File “/Users/Cosmos/frappe/frappe-bench/env/lib/python3.9/site-packages/click/core.py”, line 782, in main
rv = self.invoke(ctx)
File “/Users/Cosmos/frappe/frappe-bench/env/lib/python3.9/site-packages/click/core.py”, line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/Users/Cosmos/frappe/frappe-bench/env/lib/python3.9/site-packages/click/core.py”, line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/Users/Cosmos/frappe/frappe-bench/env/lib/python3.9/site-packages/click/core.py”, line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/Users/Cosmos/frappe/frappe-bench/env/lib/python3.9/site-packages/click/core.py”, line 610, in invoke
return callback(*args, **kwargs)
File “/Users/Cosmos/frappe/frappe-bench/apps/frappe/frappe/commands/site.py”, line 38, in new_site
_new_site(db_name, site, mariadb_root_username=mariadb_root_username,
File “/Users/Cosmos/frappe/frappe-bench/apps/frappe/frappe/installer.py”, line 59, in _new_site
install_db(
File “/Users/Cosmos/frappe/frappe-bench/apps/frappe/frappe/installer.py”, line 106, in install_db
setup_database(force, source_sql, verbose, no_mariadb_socket)
File “/Users/Cosmos/frappe/frappe-bench/apps/frappe/frappe/database/init.py”, line 14, in setup_database
return frappe.database.mariadb.setup_db.setup_database(force, source_sql, verbose, no_mariadb_socket=no_mariadb_socket)
File “/Users/Cosmos/frappe/frappe-bench/apps/frappe/frappe/database/mariadb/setup_db.py”, line 37, in setup_database
if force or (db_name not in dbman.get_database_list()):
File “/Users/Cosmos/frappe/frappe-bench/apps/frappe/frappe/database/db_manager.py”, line 60, in get_database_list
return [d[0] for d in self.db.sql(“SHOW DATABASES”)]
File “/Users/Cosmos/frappe/frappe-bench/apps/frappe/frappe/database/database.py”, line 112, in sql
self.connect()
File “/Users/Cosmos/frappe/frappe-bench/apps/frappe/frappe/database/database.py”, line 65, in connect
self._conn = self.get_connection()
File “/Users/Cosmos/frappe/frappe-bench/apps/frappe/frappe/database/mariadb/database.py”, line 71, in get_connection
conn = pymysql.connect(
File “/Users/Cosmos/frappe/frappe-bench/env/lib/python3.9/site-packages/pymysql/connections.py”, line 353, in init
self.connect()
File “/Users/Cosmos/frappe/frappe-bench/env/lib/python3.9/site-packages/pymysql/connections.py”, line 664, in connect
raise exc
pymysql.err.OperationalError: (2003, “Can’t connect to MySQL server on ‘127.0.0.1’ ([Errno 61] Connection refused)”)

and

bench --site library.test install-app library_management returns
An error occurred while installing library_management:
(2003, “Can’t connect to MySQL server on ‘127.0.0.1’ ([Errno 61] Connection refused)”)

Bench seems to be running, but returns a 404 when accessing the site. Kindly help me where it went wrong.

Try the docker version .I just installed it a day back and it was super easy .The only problem i faced was the port 80 was already in use by another program .

Also try out the easy install / the pip installation. Whats your server environment?

Did you follow this tutorial?

I followed the single bench installation https://github.com/frappe/frappe_docker/blob/develop/docs/single-bench.md

try easy install method… here

before running

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

run

export LC_ALL=C.UTF-8

Try this method…

  1. sudo apt-get update
  2. create User …

adduser [USER]

  1. add created user in sudo group …

usermod -aG sudo [USER]

apt install python3-minimal build-essential python3-setuptools

  1. su [USER]

  2. export LC_ALL=C.UTF-8

  3. wget https://raw.githubusercontent.com/frappe/bench/develop/install.py

  4. python3 install.py --production --user [USER]
    or sudo python3 install.py --production --user [USER]

Replace [USER] with the name of your choice…

1 Like