When running the command =>bench restart, it’s giving an error
$ sudo supervisorctl restart frappe:
frappe: ERROR (no such group)
frappe: ERROR (no such group)
ERROR: sudo supervisorctl restart frappe:
subprocess.CalledProcessError: Command ‘sudo 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/devcrm/.local/bin/bench”, line 8, in
sys.exit(cli())
File “/home/devcrm/.local/lib/python3.10/site-packages/bench/cli.py”, line 132, in cli
bench_command()
File “/home/devcrm/.local/lib/python3.10/site-packages/bench/commands/utils.py”, line 41, in restart
Bench(“.”).reload(web, supervisor, systemd)
File “/home/devcrm/.local/lib/python3.10/site-packages/bench/utils/render.py”, line 126, in wrapper_fn
return fn(*args, **kwargs)
File “/home/devcrm/.local/lib/python3.10/site-packages/bench/bench.py”, line 154, in reload
restart_supervisor_processes(bench_path=self.name, web_workers=web, _raise=_raise)
File “/home/devcrm/.local/lib/python3.10/site-packages/bench/utils/bench.py”, line 342, in restart_supervisor_processes
failure = bench.run(f"{sudo}supervisorctl restart {group}", _raise=_raise)
File “/home/devcrm/.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/devcrm/.local/lib/python3.10/site-packages/bench/utils/init.py”, line 178, in exec_cmd
raise CommandFailedError(cmd) from subprocess.CalledProcessError(return_code, cmd)
bench.exceptions.CommandFailedError: sudo supervisorctl restart frappe:
Solutions I already tried to solve this are : sudo apt remove --purge supervisor
sudo apt install supervisor
bench setup supervisor
bench setup socketio
bench setup supervisor
bench setup redis
sudo supervisorctl reload
but nothing works, Please help me to solve this error
This is what it returns when i check the status of supervisor
● supervisor.service - Supervisor process control system for UNIX
Loaded: loaded (/lib/systemd/system/supervisor.service; enabled; vendor preset: enabled)
Active: active (running) since Fri 2024-10-25 10:16:30 UTC; 2 days ago
Docs: http://supervisord.org
Main PID: 242597 (supervisord)
Tasks: 1 (limit: 19338)
Memory: 17.2M
CPU: 2min 2.015s
CGroup: /system.slice/supervisor.service
└─242597 /usr/bin/python3 /usr/bin/supervisord -n -c /etc/supervisor/supervisord.conf
Oct 25 12:13:07 supervisord[242597]: 2024-10-25 12:13:07,353 CRIT Supervisor is running as root. Privileges were not dropped because no user is specified in the config file. If >
Oct 25 12:13:07 supervisord[242597]: 2024-10-25 12:13:07,354 WARN No file matches via include “/etc/supervisor/conf.d/.conf"
Oct 25 12:13:07 supervisord[242597]: 2024-10-25 12:13:07,356 INFO RPC interface ‘supervisor’ initialized
Oct 25 12:13:07 supervisord[242597]: 2024-10-25 12:13:07,356 CRIT Server ‘unix_http_server’ running without any HTTP authentication checking
Oct 25 12:13:07 supervisord[242597]: 2024-10-25 12:13:07,358 INFO supervisord started with pid 242597
Oct 26 05:32:32 supervisord[242597]: 2024-10-26 05:32:32,169 CRIT Supervisor is running as root. Privileges were not dropped because no user is specified in the config file. If >
Oct 26 05:32:32 supervisord[242597]: 2024-10-26 05:32:32,170 WARN No file matches via include "/etc/supervisor/conf.d/.conf”
Oct 26 05:32:32 supervisord[242597]: 2024-10-26 05:32:32,171 INFO RPC interface ‘supervisor’ initialized
Oct 26 05:32:32 supervisord[242597]: 2024-10-26 05:32:32,172 CRIT Server ‘unix_http_server’ running without any HTTP authentication checking
Oct 26 05:32:32 supervisord[242597]: 2024-10-26 05:32:32,173 INFO supervisord started with pid 242597
Yes, site is running fine but we want to restart the bench to refresh any scheduled tasks. Some changes if made in .py file, only reflects after restarting the bench. to avoid any errors during setup changes