Can anyone help me with the error supervisorctl restart frappe

bench restart
$ 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 “/home/pejay/.local/bin/bench”, line 8, in
sys.exit(cli())
^^^^^
File “/home/pejay/.local/share/pipx/venvs/frappe-bench/lib/python3.12/site-packages/bench/cli.py”, line 132, in cli
bench_command()
File “/home/pejay/.local/share/pipx/venvs/frappe-bench/lib/python3.12/site-packages/bench/commands/utils.py”, line 41, in restart
Bench(“.”).reload(web, supervisor, systemd)
File “/home/pejay/.local/share/pipx/venvs/frappe-bench/lib/python3.12/site-packages/bench/utils/render.py”, line 126, in wrapper_fn
return fn(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^
File “/home/pejay/.local/share/pipx/venvs/frappe-bench/lib/python3.12/site-packages/bench/bench.py”, line 154, in reload
restart_supervisor_processes(bench_path=self.name, web_workers=web, _raise=_raise)
File “/home/pejay/.local/share/pipx/venvs/frappe-bench/lib/python3.12/site-packages/bench/utils/bench.py”, line 342, in restart_supervisor_processes
failure = bench.run(f"{sudo}supervisorctl restart {group}", _raise=_raise)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/home/pejay/.local/share/pipx/venvs/frappe-bench/lib/python3.12/site-packages/bench/bench.py”, line 48, in run
return exec_cmd(cmd, cwd=cwd or self.cwd, _raise=_raise)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/home/pejay/.local/share/pipx/venvs/frappe-bench/lib/python3.12/site-packages/bench/utils/init.py”, line 178, in exec_cmd
raise CommandFailedError(cmd) from subprocess.CalledProcessError(return_code, cmd)
bench.exceptions.CommandFailedError: supervisorctl restart frappe:

Try this: Hooks are not updated even after bench migrate - #4 by NCP

The command bench restart is only for production benches or simply for when you have supervisorctl set up correctly, to manage frappe-web, frappe-redis and frappe-bench-workers processes.

If you are trying to setup a production bench, read this Setup Production

If you were simply trying to restart bench, you can just exit the process and start again for a non supervisor setup

1 Like

Thank you @NCP . Tried this but I added also sudo -ln to link the frappe file.