I have successfully installed frappe on a Debian VM and after several runs, I believe I have gotten the hang of how things are configured.
I am now trying to install erpnext on FreeBSD 13 and I have installed everything. I am now at the point of creating a new site, and I get a timeout. The timeout talks about redis-server and not MySQL I migrated from MySQL to MariaDB just for this very purpose of getting erpnext running.
I am trying to figure out what is going on during the process of creating a new site. On the Debian VM, when I execute the command:
bench new-site site.name
I immediately get prompted for the MySQL root password. This is not happening on FreeBSD. The command stays there until it times out, and then gives the error:
[frappe@gw ~/frappe-bench]$ bench new-site --verbose my.site.name
Traceback (most recent call last):
File "/opt/frappe/frappe-bench/env/lib/python3.11/site-packages/redis/connection.py", line 611, in connect
sock = self.retry.call_with_retry(
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/frappe/frappe-bench/env/lib/python3.11/site-packages/redis/retry.py", line 51, in call_with_retry
raise error
File "/opt/frappe/frappe-bench/env/lib/python3.11/site-packages/redis/retry.py", line 46, in call_with_retry
return do()
^^^^
File "/opt/frappe/frappe-bench/env/lib/python3.11/site-packages/redis/connection.py", line 612, in <lambda>
lambda: self._connect(), lambda error: self.disconnect(error)
^^^^^^^^^^^^^^^
File "/opt/frappe/frappe-bench/env/lib/python3.11/site-packages/redis/connection.py", line 677, in _connect
raise err
File "/opt/frappe/frappe-bench/env/lib/python3.11/site-packages/redis/connection.py", line 665, in _connect
sock.connect(socket_address)
TimeoutError: [Errno 60] Operation timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "/opt/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 104, in <module>
main()
File "/opt/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 19, in main
click.Group(commands=commands)(prog_name="bench")
File "/opt/frappe/frappe-bench/env/lib/python3.11/site-packages/click/core.py", line 1130, in __call__
return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/frappe/frappe-bench/env/lib/python3.11/site-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "/opt/frappe/frappe-bench/env/lib/python3.11/site-packages/click/core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/frappe/frappe-bench/env/lib/python3.11/site-packages/click/core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/frappe/frappe-bench/env/lib/python3.11/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/frappe/frappe-bench/env/lib/python3.11/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/frappe/frappe-bench/apps/frappe/frappe/commands/site.py", line 72, in new_site
frappe.init(site=site, new_site=True)
File "/opt/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 247, in init
setup_module_map()
File "/opt/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 1515, in setup_module_map
local.app_modules = _cache.get_value("app_modules")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/frappe/frappe-bench/apps/frappe/frappe/utils/redis_wrapper.py", line 87, in get_value
val = self.get(key)
^^^^^^^^^^^^^
File "/opt/frappe/frappe-bench/env/lib/python3.11/site-packages/redis/commands/core.py", line 1705, in get
return self.execute_command("GET", name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/frappe/frappe-bench/env/lib/python3.11/site-packages/redis/client.py", line 1235, in execute_command
conn = self.connection or pool.get_connection(command_name, **options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/frappe/frappe-bench/env/lib/python3.11/site-packages/redis/connection.py", line 1387, in get_connection
connection.connect()
File "/opt/frappe/frappe-bench/env/lib/python3.11/site-packages/redis/connection.py", line 615, in connect
raise TimeoutError("Timeout connecting to server")
redis.exceptions.TimeoutError: Timeout connecting to server
I have tried to be explicit about the command, but I am not sure I have the correct arguments on the CLI. I have tried:
bench new-site --no-mariadb-socket --db-name _erpnext2023 --db-type mariadb --db-host 127.0.0.1 --db-port 3306 --db-root-username root --db-root-password XXXXXX --verbose my.site.name
That did not give any joy.
On my FreeBSD server, mysql/mariadb socket is /tmp/mysql.sock, but it also listens on all interfaces on port 3306:
root@gw:/usr/home/wash # sockstat -l | grep :3306
mysql mariadbd 26637 22 tcp4 *:3306 *:*
I also have redis-server running:
root@gw:/usr/home/wash # sockstat -l | grep redis
redis redis-serv 69013 6 tcp4 127.0.0.1:6379 *:*
redis redis-serv 69013 7 tcp6 ::1:6379 *:*
If the --verbose option âcould speakâ, then I would be able to figure it out. Unfortunately it does not.
[frappe@gw ~/frappe-bench]$ bench new-site --verbose
Usage: bench new-site [OPTIONS] SITE
Try 'bench new-site --help' for help.
Error: Missing argument 'SITE'.
[frappe@gw ~/frappe-bench]$ bench new-site --verbose my.site.name
Then the error is the same:
File "/opt/frappe/frappe-bench/env/lib/python3.11/site-packages/redis/connection.py", line 615, in connect
raise TimeoutError("Timeout connecting to server")
redis.exceptions.TimeoutError: Timeout connecting to server
SOS!