Error: <class ‘PermissionError’>, [Errno 13] Permission denied: file: /usr/lib/python3/dist-packages/supervisor/xmlrpc.py line: 560

Thanks for this… I only added the lines in supervisord.conf though. Doing that and restarting supervisor was sufficient to clear the error

Kind regards,

Yes, that’s what the command does. And it’s not recommended!

Anyways, here is the corresponding bug report for this issue.

Welcome back @scdanieli. I hope the two years gap was filled by good things :sweat_smile:

You’re right, the bug report indicates what really is missing. I already made it work manually by setting the correct chmod and chown values in /etc/supervisor/supervisord.conf as described in this guide for Archlinux.

Hopefully it will get fixed soon.

Hi, I tried these commands:

sudo service supervisor stop
sudo service supervisor start

But am still getting the same error for bench restart

root@vmi934288:/home/calmh/myfrappe# sudo bench restart
$ supervisorctl restart frappe:
unix:///var/run/supervisor.sock no such file
ERROR:
Traceback (most recent call last):
File “/usr/local/bin/bench”, line 8, in
sys.exit(cli())
File “/usr/local/lib/python3.10/dist-packages/bench/cli.py”, line 127, in cli
bench_command()
File “/usr/local/lib/python3.10/dist-packages/click/core.py”, line 1130, in call
return self.main(*args, **kwargs)
File “/usr/local/lib/python3.10/dist-packages/click/core.py”, line 1055, in main
rv = self.invoke(ctx)
File “/usr/local/lib/python3.10/dist-packages/click/core.py”, line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/local/lib/python3.10/dist-packages/click/core.py”, line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/usr/local/lib/python3.10/dist-packages/click/core.py”, line 760, in invoke
return __callback(*args, **kwargs)
File “/usr/local/lib/python3.10/dist-packages/bench/commands/utils.py”, line 41, in restart
Bench(“.”).reload(web, supervisor, systemd)
File “/usr/local/lib/python3.10/dist-packages/bench/utils/render.py”, line 126, in wrapper_fn
return fn(*args, **kwargs)
File “/usr/local/lib/python3.10/dist-packages/bench/bench.py”, line 151, in reload
restart_supervisor_processes(bench_path=self.name, web_workers=web, _raise=_raise)
File “/usr/local/lib/python3.10/dist-packages/bench/utils/bench.py”, line 315, in restart_supervisor_processes
failure = bench.run(f"{sudo}supervisorctl restart {group}", _raise=_raise)
File “/usr/local/lib/python3.10/dist-packages/bench/bench.py”, 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/init.py”, line 158, in exec_cmd
raise CommandFailedError
bench.exceptions.CommandFailedError

This is the correct solution (only the second part, not the chmod -R o+rx)

3 Likes

I have tried adding those lines, even reinstalled still facing same error;

error

Other config file(s) may be corrupted as well. Can you check if have a config file for your bench in /etc/supervisor/conf.d/ and if so, post the content of /etc/supervisor/conf.d/your_bench.conf - So I can compare it to a working one.

This was fixed recently by @gavindsouza

Update bench to latest version.

1 Like