Failed bench setup supervisor

Hello Everyone,
I am facing error when running : bench setup supervisor as shown below.
any suggestion what’s going wrong with my configuration?

cc: @rmeyer
Thanks in advances,
Ade Suhada

image

frappe@75f8aa7eb63e:/workspace/development/frappe-bench$ bench setup supervisor                
/etc/supervisor/supervisord.conf will be updated with the following values:

Updated supervisord.conf: 'chmod' changed from '0700                       ; sockef file mode (default 0700)' to '0760'
Updated supervisord.conf: 'chown' changed from '' to 'frappe:frappe'
Do you want to continue? [y/N]: y
$ sudo service supervisor reload
Usage: /etc/init.d/supervisord {start|stop|restart|force-reload|status}
ERROR: 
Traceback (most recent call last):
  File "/home/frappe/.local/bin/bench", line 33, in <module>
    sys.exit(load_entry_point('frappe-bench', 'console_scripts', 'bench')())
  File "/home/frappe/.bench/bench/cli.py", line 117, in cli
    raise e
  File "/home/frappe/.bench/bench/cli.py", line 107, in cli
    bench_command()
  File "/home/frappe/.local/lib/python3.9/site-packages/click/core.py", line 1128, in __call__
    return self.main(*args, **kwargs)
  File "/home/frappe/.local/lib/python3.9/site-packages/click/core.py", line 1053, in main
    rv = self.invoke(ctx)
  File "/home/frappe/.local/lib/python3.9/site-packages/click/core.py", line 1659, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/frappe/.local/lib/python3.9/site-packages/click/core.py", line 1659, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/frappe/.local/lib/python3.9/site-packages/click/core.py", line 1395, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/frappe/.local/lib/python3.9/site-packages/click/core.py", line 754, in invoke
    return __callback(*args, **kwargs)
  File "/home/frappe/.bench/bench/commands/setup.py", line 46, in setup_supervisor
    update_supervisord_config(user=user, yes=yes)
  File "/home/frappe/.bench/bench/config/supervisor.py", line 126, in update_supervisord_config
    service('supervisor', 'reload')
  File "/home/frappe/.bench/bench/config/production_setup.py", line 105, in service
    exec_cmd(f"sudo service {service_name} {service_option}")
  File "/home/frappe/.bench/bench/utils/__init__.py", line 126, in exec_cmd
    raise CommandFailedError
bench.exceptions.CommandFailedError
frappe@75f8aa7eb63e:/workspace/development/frappe-bench$

This suggests you’re in frappe_docker development environment. There is no supervisor here.

There is sudo available in container allowing you to install anything with root privileges.

If wish to use supervisor, use easy_install or manual install.

Thanks for answering,
unfortunately i have already installed the supervisor, but the error message still the same.
is there any suggestion to change from development environment to production which is available to setup supervisor ?

Thanks you …

Searching for supervisor
Reading https://pypi.org/simple/supervisor/
Downloading https://files.pythonhosted.org/packages/de/c9/50b1575b46ad9802e1b8d444c1ba0db842a1006ff7c9bea9d5e0ea700f2d/supervisor-4.2.2-py2.py3-none-any.whl#sha256=4adf63c8f18cf42313171ce06a73c9ae2c5e88ef27c2bb0de3b8405368595c04
Best match: supervisor 4.2.2
Processing supervisor-4.2.2-py2.py3-none-any.whl
Installing supervisor-4.2.2-py2.py3-none-any.whl to /home/frappe/.pyenv/versions/3.7.12/lib/python3.7/site-packages
Adding supervisor 4.2.2 to easy-install.pth file
Installing echo_supervisord_conf script to /home/frappe/.pyenv/versions/3.7.12/bin
Installing pidproxy script to /home/frappe/.pyenv/versions/3.7.12/bin
Installing supervisorctl script to /home/frappe/.pyenv/versions/3.7.12/bin
Installing supervisord script to /home/frappe/.pyenv/versions/3.7.12/bin

Installed /home/frappe/.pyenv/versions/3.7.12/lib/python3.7/site-packages/supervisor-4.2.2-py3.7.egg
Processing dependencies for supervisor
Finished processing dependencies for supervisor