Supervisor Restart Error for frappe-bench-web in Frappe Press -- Bench Update Command
- Dominant language
- Python
- Stars
- 562
- Forks
- 410
- Avg merge
- 22h 15m
- Merged PRs (30d)
- 197
Description
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.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the failure with `sudo supervisorctl restart frappe-bench-web:` and trace the flow through `bench/utils/bench.py`, `bench/bench.py`, and `bench/commands/update.py`, especially `restart_supervisor_processes` and `reload`. Check the supervisor configuration and the `frappe-bench-node-socketio` process for the spawn error; done means `bench update` and the web-group restart complete without `CommandFailedError`.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- devops, infrastructure
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100