Bench restart fails

bench restart and bench update is failing on ubuntu 20.04 although it is working with other arguments like migrate.

Traceback (most recent call last):
  File "/home/mujeerhashmi/.local/bin/bench", line 8, in <module>
  File "/home/mujeerhashmi/.local/lib/python3.8/site-packages/bench/", line 41, in cli
  File "/home/mujeerhashmi/.local/lib/python3.8/site-packages/click/", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/home/mujeerhashmi/.local/lib/python3.8/site-packages/click/", line 717, in main
    rv = self.invoke(ctx)
  File "/home/mujeerhashmi/.local/lib/python3.8/site-packages/click/", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/mujeerhashmi/.local/lib/python3.8/site-packages/click/", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/mujeerhashmi/.local/lib/python3.8/site-packages/click/", line 555, in invoke
    return callback(*args, **kwargs)
  File "/home/mujeerhashmi/.local/lib/python3.8/site-packages/bench/commands/", line 26, in restart
    restart_supervisor_processes(bench_path='.', web_workers=web)
  File "/home/mujeerhashmi/.local/lib/python3.8/site-packages/bench/", line 519, in restart_supervisor_processes
    supervisor_status = subprocess.check_output(['sudo', 'supervisorctl', 'status'], cwd=bench_path)
  File "/usr/lib/python3.8/", line 411, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File "/usr/lib/python3.8/", line 512, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['sudo', 'supervisorctl', 'status']' returned non-zero exit status 3.

Executing sudo supervisorctl status is just fine from the commandline.

When bench update is executing this particular command is asking for sudo passwords.
$ /home/mujeerhashmi/erp/dev-bench/env/bin/pip install -q -U -e /home/mujeerhashmi/erp/dev-bench/apps/frappe
which seems to me is the culprit for the above error.

Any help will be appreciated.

Hello, Did you solve it? because I face the same isuse

Any update on the issue please??

Use the below commands, maybe it will work…
$ bench setup redis
$ bench setup socketio
$ bench setup requirements

1 Like