Skip to content

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

Open
@zongo811

Description

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

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions