Self-hosted: Digital Ocean
Erpnext: 15.21.2
Frappe: 15.24.1
Bench: 5.22.6
Hrms: 15.20.0
Environment: Production
Setup: Manually (Forum Guide)
Referencing: Issue 19062 and Forum Discussion
because my node version is up to requirements
Node: v18.20.2
NPM: v10.5.0
Running all the commands from the frappe user I had created since initial installation.
ERPNext has been running flawlessly for about a month or two since its inception, recently I had to create a new app to override some core methods of manufacturing module.
Used
bench new-app custom_app
Everything builds successfully up until where bench restarts (bench restart stage), i get the following output at that point:
$ supervisorctl restart frappe-bench-web:
frappe-bench-web:frappe-bench-frappe-web: stopped
frappe-bench-web:frappe-bench-node-socketio: stopped
frappe-bench-web:frappe-bench-node-socketio: ERROR (spawn error)
frappe-bench-web:frappe-bench-frappe-web: started
WARN: restarting supervisor group `frappe-bench-web:` failed. Use `bench restart` to retry.
$ supervisorctl restart frappe-bench-workers:
frappe-bench-workers:frappe-bench-frappe-schedule: stopped
frappe-bench-workers:frappe-bench-frappe-short-worker-0: stopped
frappe-bench-workers:frappe-bench-frappe-long-worker-0: stopped
frappe-bench-workers:frappe-bench-frappe-schedule: started
frappe-bench-workers:frappe-bench-frappe-short-worker-0: started
frappe-bench-workers:frappe-bench-frappe-long-worker-0: started
INFO: A newer version of bench is available: 5.22.3 → 5.22.6
On manually restarting as instructed using bench restart, I get:
$ supervisorctl restart frappe-bench-web:
frappe-bench-web:frappe-bench-node-socketio: stopped
frappe-bench-web:frappe-bench-frappe-web: stopped
frappe-bench-web:frappe-bench-node-socketio: ERROR (spawn error)
frappe-bench-web:frappe-bench-frappe-web: started
ERROR: supervisorctl restart frappe-bench-web:
subprocess.CalledProcessError: Command '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 <module>
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/utils.py", line 41, in restart
Bench(".").reload(web, supervisor, 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 152, 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 169, in exec_cmd
raise CommandFailedError(cmd) from subprocess.CalledProcessError(return_code, cmd)
bench.exceptions.CommandFailedError: supervisorctl restart frappe-bench-web:
INFO: A newer version of bench is available: 5.22.3 → 5.22.6
It is worthwhile to mention that the app has been created, but I am awaiting clarity on the cause of the issue.
Kindly provide some pointers as to how to solve this. Also, I’ll be happy to provide logs as necessary.