Supervisorctl restart frappe error

Hi team, using ubuntu 22 here production mode Erpnext14

root@erp14:/home/frappe/frappe-bench# sudo bench restart
$ supervisorctl restart frappe:
error: <class ‘PermissionError’>, [Errno 13] Permission denied: file: /usr/lib/python3/dist-packages/supervisor/ line: 560
Traceback (most recent call last):
File “/usr/local/bin/bench”, line 8, in
File “/usr/local/lib/python3.10/dist-packages/bench/”, line 127, in cli
File “/usr/lib/python3/dist-packages/click/”, line 1128, in call
return self.main(*args, **kwargs)
File “/usr/lib/python3/dist-packages/click/”, line 1053, in main
rv = self.invoke(ctx)
File “/usr/lib/python3/dist-packages/click/”, line 1659, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/lib/python3/dist-packages/click/”, line 1395, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/usr/lib/python3/dist-packages/click/”, line 754, in invoke
return __callback(*args, **kwargs)
File “/usr/local/lib/python3.10/dist-packages/bench/commands/”, line 41, in restart
Bench(“.”).reload(web, supervisor, systemd)
File “/usr/local/lib/python3.10/dist-packages/bench/utils/”, line 126, in wrapper_fn
return fn(*args, **kwargs)
File “/usr/local/lib/python3.10/dist-packages/bench/”, line 151, in reload
restart_supervisor_processes(, web_workers=web, _raise=_raise)
File “/usr/local/lib/python3.10/dist-packages/bench/utils/”, line 315, in restart_supervisor_processes
failure ="{sudo}supervisorctl restart {group}", _raise=_raise)
File “/usr/local/lib/python3.10/dist-packages/bench/”, line 48, in run
return exec_cmd(cmd, cwd=cwd or self.cwd, _raise=_raise)
File “/usr/local/lib/python3.10/dist-packages/bench/utils/”, line 158, in exec_cmd
raise CommandFailedError

can anyone shed some light please?

In terminal enter below command to edit supervisor.conf

sudo nano /etc/supervisor/supervisord.conf

Below [unix_http_server] enter this


sve and close the file

after that restart supervisor with below command

sudo service supervisor restart

in your bench folder run command

bench setup supervisor

Thanks it works :slight_smile: