bench
bench copied to clipboard
[v5.14.0+] bench setup production does not work properly
Issue: Bug report
Do the checklist before filing an issue:
- [x] Can you replicate the issue on the supported bench versions?
Describe the bug :chart_with_downwards_trend:
sudo bench setup production frappe
does not seem work as expected: chmod = 0760
and chown = frappe:frappe
is not written to /etc/supervisor/supervisord.conf
.
This causes the following error:
frappe@dev:~/bench$ bench restart
$ supervisorctl restart frappe:
error: <class 'PermissionError'>, [Errno 13] Permission denied: file: /usr/lib/python3/dist-packages/supervisor/xmlrpc.py line: 560
ERROR:
Traceback (most recent call last):
File "/usr/local/bin/bench", line 8, in <module>
sys.exit(cli())
File "/usr/local/lib/python3.8/dist-packages/bench/cli.py", line 127, in cli
bench_command()
File "/usr/lib/python3/dist-packages/click/core.py", line 764, in __call__
return self.main(*args, **kwargs)
File "/usr/lib/python3/dist-packages/click/core.py", line 717, in main
rv = self.invoke(ctx)
File "/usr/lib/python3/dist-packages/click/core.py", line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/lib/python3/dist-packages/click/core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/lib/python3/dist-packages/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/bench/commands/utils.py", line 41, in restart
Bench(".").reload(web, supervisor, systemd)
File "/usr/local/lib/python3.8/dist-packages/bench/utils/render.py", line 126, in wrapper_fn
return fn(*args, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/bench/bench.py", line 151, in reload
restart_supervisor_processes(bench_path=self.name, web_workers=web, _raise=_raise)
File "/usr/local/lib/python3.8/dist-packages/bench/utils/bench.py", line 315, in restart_supervisor_processes
failure = bench.run(f"{sudo}supervisorctl restart {group}", _raise=_raise)
File "/usr/local/lib/python3.8/dist-packages/bench/bench.py", line 48, in run
return exec_cmd(cmd, cwd=cwd or self.cwd, _raise=_raise)
File "/usr/local/lib/python3.8/dist-packages/bench/utils/__init__.py", line 158, in exec_cmd
raise CommandFailedError
bench.exceptions.CommandFailedError
Expected behavior :chart_with_upwards_trend:
First 4 lines of /etc/supervisor/supervisord.conf
look like this:
[unix_http_server]
file = /var/run/supervisor.sock ; (the path to the socket file)
chmod = 0760
chown = frappe:frappe
OS (please complete the following information): :cyclone:
- [x] Linux:
Ubuntu 20.04.5 LTS
Version Information
- Bench Branch: 5.14.0 to 5.16.1 (works fine until 5.13.4)
- Frappe Version: 13.49.2
- ERPNext Version: 13.46.1
Additional context :page_facing_up: Others affected by this as well: Frappe Discuss
Possible Solution :bookmark_tabs: Seems something has changed between version 5.13.4 and 5.14.0 on Aug 4, 2022 causing the issue (@gavindsouza).
:tada: This issue has been resolved in version 5.16.2 :tada:
The release is available on:
- GitHub release
-
v5.16.2
Your semantic-release bot :package::rocket:
Noop still have issue on a fresh install bench --version == 5.16.2
$ sudo supervisorctl restart frappe:
frappe: ERROR (no such group)
frappe: ERROR (no such group)
WARN: restarting supervisor failed. Use `bench restart` to retry.
$ bench build
Assets for Commit 86f72195251c5abfcacf5f9db0351fb0b54f8e1c don't exist
✔ Application Assets Linked
After manually fixing the file I still have following issue:
$ supervisorctl restart frappe:
unix:///var/run/supervisor.sock no such file
WARN: restarting supervisor failed. Use `bench restart` to retry.
Hi, does anyone have a answer? Pls kindly help the erpnext 14 community....Because of this a lot of people are hesitating to go with ERPNEXT. instead they go with ODOO
Hi everyone, is there any updates to this issue please? Since several issues are thrown predominantly due to this issue.
I get "WARN: restart failed: Couldn't find supervisorctl in PATH" and cannot restart bench due to the supervisor issue. Although I did follow a guide to install supervisor nothing works.
Thanks guys!
I have used the ERPNext Bitnami package for Google Cloud and am facing this issue without any solutions.