after running below command:
sudo docker exec -it awesome_archimedes bench init frappe-bench && cd frappe-bench
Error
/bin/sh: 1: redis-server: not found
Command ‘redis-server --version’ returned non-zero exit status 127.
ERROR: There was a problem while creating frappe-bench
I am running following commands:
sudo docker exec -it awesome_archimedes bash “-c” “cd ./frappe-bench && bench new-site erp-dev”
and getting below errors:
Traceback (most recent call last):
File “/usr/lib/python3.7/runpy.py”, line 193, in _run_module_as_main
“main”, mod_spec)
File “/usr/lib/python3.7/runpy.py”, line 85, in _run_code
exec(code, run_globals)
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 101, 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/lib/python3.7/site-packages/click/core.py”, line 764, in call
return self.main(*args, **kwargs)
File “/home/frappe/frappe-bench/env/lib/python3.7/site-packages/click/core.py”, line 717, in main
rv = self.invoke(ctx)
File “/home/frappe/frappe-bench/env/lib/python3.7/site-packages/click/core.py”, line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/frappe/frappe-bench/env/lib/python3.7/site-packages/click/core.py”, line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/frappe/frappe-bench/env/lib/python3.7/site-packages/click/core.py”, line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/home/frappe/frappe-bench/env/lib/python3.7/site-packages/click/core.py”, line 555, in invoke
return callback(*args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/commands/site.py”, line 41, in new_site
db_port=db_port, new_site=True)
File “/home/frappe/frappe-bench/apps/frappe/frappe/installer.py”, line 72, in _new_site
no_mariadb_socket=no_mariadb_socket,
File “/home/frappe/frappe-bench/apps/frappe/frappe/installer.py”, line 106, in install_db
setup_database(force, source_sql, verbose, no_mariadb_socket)
File “/home/frappe/frappe-bench/apps/frappe/frappe/database/init.py”, line 16, in setup_database
return frappe.database.mariadb.setup_db.setup_database(force, source_sql, verbose, no_mariadb_socket=no_mariadb_socket)
File “/home/frappe/frappe-bench/apps/frappe/frappe/database/mariadb/setup_db.py”, line 39, in setup_database
if force or (db_name not in dbman.get_database_list()):
File “/home/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 “/home/frappe/frappe-bench/apps/frappe/frappe/database/database.py”, line 121, in sql
self.connect()
File “/home/frappe/frappe-bench/apps/frappe/frappe/database/database.py”, line 74, in connect
self._conn = self.get_connection()
File “/home/frappe/frappe-bench/apps/frappe/frappe/database/mariadb/database.py”, line 90, in get_connection
local_infile = frappe.conf.local_infile)
File “/home/frappe/frappe-bench/env/lib/python3.7/site-packages/pymysql/init.py”, line 94, in Connect
return Connection(*args, **kwargs)
File “/home/frappe/frappe-bench/env/lib/python3.7/site-packages/pymysql/connections.py”, line 325, in init
self.connect()
File “/home/frappe/frappe-bench/env/lib/python3.7/site-packages/pymysql/connections.py”, line 630, in connect
raise exc
pymysql.err.OperationalError: (2003, “Can’t connect to MySQL server on ‘127.0.0.1’ ([Errno 111] Connection refused)”)
I have added permission:
Logs at mariadb container:
Version: ‘10.3.28-MariaDB-1:10.3.28+maria~focal’ socket: ‘/var/run/mysqld/mysqld.sock’ port: 3306 mariadb.org binary distribution
2021-04-08 3:18:36 14 [Warning] Access denied for user ‘_da39a3ee5e6b4b0d’@‘172.20.0.13’ (using password: YES)
2021-04-08 3:18:36 15 [Warning] ‘proxies_priv’ entry ‘@% root@f8c547eb2378’ ignored in --skip-name-resolve mode.
2021-04-08 3:18:36 16 [Warning] Aborted connection 16 to db: ‘_da39a3ee5e6b4b0d’ user: ‘_da39a3ee5e6b4b0d’ host: ‘172.20.0.13’ (Got an error reading communication packets)
2021-04-08 3:20:29 18 [Warning] Aborted connection 18 to db: ‘_da39a3ee5e6b4b0d’ user: ‘_da39a3ee5e6b4b0d’ host: ‘172.20.0.13’ (Got an error reading communication packets)
2021-04-08 3:34:29 21 [Warning] Aborted connection 21 to db: ‘unconnected’ user: ‘root’ host: ‘172.20.0.13’ (Got an error reading communication packets)
2021-04-08 3:52:09 24 [Warning] Aborted connection 24 to db: ‘unconnected’ user: ‘root’ host: ‘172.20.0.13’ (Got an error reading communication packets)
so I have provided the access but still same error:
mysql -uroot -padmin -Bse “GRANT ALL PRIVILEGES ON . TO ‘root’@‘127.%.%.%’ IDENTIFIED BY ‘admin’ WITH GRANT OPTION;”
mysql -uroot -padmin -Bse “GRANT ALL PRIVILEGES ON . TO ‘root’@‘localhost’ IDENTIFIED BY ‘admin’ WITH GRANT OPTION;”
mysql -uroot -padmin -Bse “GRANT ALL PRIVILEGES ON . TO ‘root’@‘192.168.%.%’ IDENTIFIED BY ‘admin’ WITH GRANT OPTION;”
mysql -uroot -padmin -Bse “GRANT ALL PRIVILEGES ON . TO ‘root’@‘206.189.139.74’ IDENTIFIED BY ‘admin’ WITH GRANT OPTION;”
mysql -uroot -padmin -Bse “GRANT ALL PRIVILEGES ON . TO ‘root’@‘172.20.0.13’ IDENTIFIED BY ‘admin’ WITH GRANT OPTION;”
Please help @revant_one