WARN: restart failed: Couldn't find supervisorctl in PATH

after update bench to v.5.15 I’ve got the warning below when using bench get-app

How to solve this warning?

1 Like

I encountered the same issue. Did it couse later on problems?

@akarapol,

Try this command …

sudo apt-get -y install supervisor
2 Likes

HI @Palle

The server can start and run.

The warning is change to

WARN: restarting supervisor failed. Use bench restart to retry.

(It’s run on WSL)

I have the same problem, solved with:

sudo apt-get -y install supervisor

than the new problem

yarn run v1.22.19
$ node esbuild --production --apps erpnext --run-build-command
File                                                        Size

 DONE  Total Build Time: 325.468ms

Done in 0.90s.
$ supervisorctl restart frappe:
error: <class 'PermissionError'>, [Errno 13] Permission denied: file: /usr/lib/python3/dist-packages/supervisor/xmlrpc.py line: 560
WARN: restarting supervisor failed. Use `bench restart` to retry.
jannis@ubu2204:~/frappe-bench$ 

How can i set the working permission?

I’m facing the same problem. I hope someone could provide us with a solution soon.

I’m also encountering same issue… anyway out???

Hello,

Here is the fix.
First, install supervisor if you didn’t already did it as mentioned above.

Then

Add “chown= yourfrappeusername:yourfrappeusername” in superisord.conf below chmod=0700.
Don’t forget to replace yourfrappeusername by your actual one.

cd
sudo nano /etc/supervisor/supervisord.conf

chown= yourfrappeusername:yourfrappeusername

sudo -A systemctl restart supervisor

Hi, I tried this but am still getting an error

$ 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 r
Bench(“.”).reload(web, supervisor, systemd)
File “/usr/local/lib/python3.10/dist-packages/bench/utils/render.py”, line 126, in wr
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 res
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
raise CommandFailedError
bench.exceptions.CommandFailedError

Hi,

Did you use this command ? :

sudo -A systemctl restart supervisor

Try this instead if it didn’t work :

sudo service supervisor stop
sudo service supervisor start

I never tried a restart with the “supervisorctl restart frappe” command, could you try “bench restart” in your bench repository to see if the same error happens in this case ?

1 Like

Bug report: [v5.14.0+] bench setup production does not work properly · Issue #1434 · frappe/bench · GitHub
Existing discussion: Error: <class ‘PermissionError’>, [Errno 13] Permission denied: file: /usr/lib/python3/dist-packages/supervisor/xmlrpc.py line: 560

1 Like