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,
- 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] Validating package.json…
[2/5] Resolving packages…
[3/5] Fetching packages…
[4/5] 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] 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,
- 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.