Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reopen - bench: ERROR: supervisorctl restart frappe #23766 #1531

Open
zongo811 opened this issue Feb 5, 2024 · 1 comment
Open

Reopen - bench: ERROR: supervisorctl restart frappe #23766 #1531

zongo811 opened this issue Feb 5, 2024 · 1 comment
Labels

Comments

@zongo811
Copy link

zongo811 commented Feb 5, 2024

Description of the issue

Please look again at frappe/frappe#23766 for there has been a misunderstanding. supervisorctl restart frappe is called internally by the bench-update-function, not by me!

I have no way to influence how bench update ... handles the restart of the bench internally.

Context information (for bug reports)

Output of bench version

erpnext 14.61.3
frappe 14.64.0

Steps to reproduce the issue

  1. On debian bullseye run bench update --no-backup

Observed result

Update stops with error on restarting the bench.

Expected result

Update completes without error.

Stacktrace / full error message

Output of "bench update --no-backup"

$ bench update --no-backup
....
erpnext/dist/css-rtl/
├─ erpnext-web.bundle.2BBNIN2U.css                          30.43 Kb
├─ erpnext.bundle.GE7BCT43.css                              52.63 Kb
└─ erpnext_email.bundle.73SAVFYA.css                        0.75 Kb

 DONE  Total Build Time: 24.070s

Done in 25.76s.
$ supervisorctl restart frappe:
frappe: ERROR (no such group)
frappe: ERROR (no such group)
ERROR: supervisorctl restart frappe:
subprocess.CalledProcessError: Command 'supervisorctl restart frappe:' returned non-zero exit status 2.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/local/bin/bench", line 33, in <module>
    sys.exit(load_entry_point('frappe-bench', 'console_scripts', 'bench')())
  File "/home/frappe/.local/lib/python3.10/site-packages/bench/cli.py", line 132, in cli
    bench_command()
  File "/home/frappe/.local/lib/python3.10/site-packages/bench/commands/update.py", line 59, in update
    update(
  File "/home/frappe/.local/lib/python3.10/site-packages/bench/utils/bench.py", line 473, in update
    bench.reload(web=False, supervisor=restart_supervisor, systemd=restart_systemd)
  File "/home/frappe/.local/lib/python3.10/site-packages/bench/utils/render.py", line 126, in wrapper_fn
    return fn(*args, **kwargs)
  File "/home/frappe/.local/lib/python3.10/site-packages/bench/bench.py", line 152, in reload
    restart_supervisor_processes(bench_path=self.name, web_workers=web, _raise=_raise)
  File "/home/frappe/.local/lib/python3.10/site-packages/bench/utils/bench.py", line 330, in restart_supervisor_processes
    failure = bench.run(f"{sudo}supervisorctl restart {group}", _raise=_raise)
  File "/home/frappe/.local/lib/python3.10/site-packages/bench/bench.py", line 48, in run
    return exec_cmd(cmd, cwd=cwd or self.cwd, _raise=_raise)
  File "/home/frappe/.local/lib/python3.10/site-packages/bench/utils/__init__.py", line 169, in exec_cmd
    raise CommandFailedError(cmd) from subprocess.CalledProcessError(return_code, cmd)
bench.exceptions.CommandFailedError: supervisorctl restart frappe:

Additional information

OS version / distribution, Frappe install method, etc.
Debian bullseye, manual install

@zongo811 zongo811 added the bug label Feb 5, 2024
@ankush
Copy link
Member

ankush commented Feb 5, 2024

You can remove restart_supervisor_on_update from common site config if you're using developer mode but still have supervisor installed.

@ankush ankush transferred this issue from frappe/frappe Feb 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants