Encountered an issue while restarting frappe-bench-web after running the "bench update".
The command sudo supervisorctl restart frappe-bench-web: fails with the following error:
frappe-bench-web:frappe-bench-node-socketio: ERROR (spawn error)
ERROR: sudo supervisorctl restart frappe-bench-web:
subprocess.CalledProcessError: Command 'sudo supervisorctl restart frappe-bench-web:' returned non-zero exit status 7.
This results in a traceback error indicating that the supervisor process failed to restart. The issue seems to originate from the bench.reload method when executing restart_supervisor_processes.
Steps to Reproduce:
Compile translations for frappe.
Run sudo supervisorctl restart frappe-bench-web:.
Observe the error output.
Error Traceback:
frappe-bench-web:frappe-bench-node-socketio: ERROR (spawn error)
ERROR: sudo supervisorctl restart frappe-bench-web:
subprocess.CalledProcessError: Command 'sudo supervisorctl restart frappe-bench-web:' returned non-zero exit status 7.
The above exception was the direct cause of the following exception:
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 132, in cli
bench_command()
File "/usr/local/lib/python3.10/dist-packages/bench/commands/update.py", line 59, in update
update(
File "/usr/local/lib/python3.10/dist-packages/bench/utils/bench.py", line 488, in update
bench.reload(web=False, supervisor=restart_supervisor, systemd=restart_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 154, 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 342, 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 178, in exec_cmd
raise CommandFailedError(cmd) from subprocess.CalledProcessError(return_code, cmd)
bench.exceptions.CommandFailedError: sudo supervisorctl restart frappe-bench-web:
Expected Behavior: The frappe-bench-web processes should restart without errors when the sudo supervisorctl restart frappe-bench-web: command is executed.
Actual Behavior: The command fails, causing the bench command to terminate with a CommandFailedError.
this command sudo supervisorctl restart all is running successfully without any error
Suggested Solutions:
Check the supervisor configuration for frappe-bench-node-socketio and ensure the paths are correct.
Investigate permissions or dependencies that might cause the spawn error.
Additional Context: The issue occurs after compiling translations, though the exact link to the translation update process is unclear. Manual intervention is required to resolve the problem.
Encountered an issue while restarting frappe-bench-web after running the "bench update".
The command sudo supervisorctl restart frappe-bench-web: fails with the following error:
frappe-bench-web:frappe-bench-node-socketio: ERROR (spawn error) ERROR: sudo supervisorctl restart frappe-bench-web: subprocess.CalledProcessError: Command 'sudo supervisorctl restart frappe-bench-web:' returned non-zero exit status 7.
This results in a traceback error indicating that the supervisor process failed to restart. The issue seems to originate from the bench.reload method when executing restart_supervisor_processes.
Steps to Reproduce:
Compile translations for frappe. Run sudo supervisorctl restart frappe-bench-web:. Observe the error output. Error Traceback:
frappe-bench-web:frappe-bench-node-socketio: ERROR (spawn error) ERROR: sudo supervisorctl restart frappe-bench-web: subprocess.CalledProcessError: Command 'sudo supervisorctl restart frappe-bench-web:' returned non-zero exit status 7.
The above exception was the direct cause of the following exception:
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 132, in cli
bench_command()
File "/usr/local/lib/python3.10/dist-packages/bench/commands/update.py", line 59, in update
update(
File "/usr/local/lib/python3.10/dist-packages/bench/utils/bench.py", line 488, in update
bench.reload(web=False, supervisor=restart_supervisor, systemd=restart_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 154, 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 342, 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 178, in exec_cmd
raise CommandFailedError(cmd) from subprocess.CalledProcessError(return_code, cmd)
bench.exceptions.CommandFailedError: sudo supervisorctl restart frappe-bench-web:
Environment:
OS: Ubuntu 22.02 Frappe Press version:latest Bench version: 5.22.9
Expected Behavior: The frappe-bench-web processes should restart without errors when the sudo supervisorctl restart frappe-bench-web: command is executed.
Actual Behavior: The command fails, causing the bench command to terminate with a CommandFailedError. this command sudo supervisorctl restart all is running successfully without any error Suggested Solutions:
Check the supervisor configuration for frappe-bench-node-socketio and ensure the paths are correct. Investigate permissions or dependencies that might cause the spawn error. Additional Context: The issue occurs after compiling translations, though the exact link to the translation update process is unclear. Manual intervention is required to resolve the problem.