Hi,
best instructions so far, but I am facing an error on a plain Ubuntu 22.02. installation.
frappe@eprv15:~/frappe-bench$ bench restart
$ sudo supervisorctl restart frappe-bench-web:
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: 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 <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 327, 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 158, in exec_cmd
raise CommandFailedError(cmd) from subprocess.CalledProcessError(return_code, cmd)
bench.exceptions.CommandFailedError: sudo supervisorctl restart frappe-bench-web:
frappe@eprv15:~/frappe-bench$ sudo supervisorctl status
frappe-bench-redis:frappe-bench-redis-cache RUNNING pid 11933, uptime 0:04:30
frappe-bench-redis:frappe-bench-redis-queue RUNNING pid 11934, uptime 0:04:30
frappe-bench-web:frappe-bench-frappe-web RUNNING pid 12035, uptime 0:03:48
frappe-bench-web:frappe-bench-node-socketio FATAL Exited too quickly (process log may have details)
frappe-bench-workers:frappe-bench-frappe-long-worker-0 RUNNING pid 11947, uptime 0:04:30
frappe-bench-workers:frappe-bench-frappe-schedule RUNNING pid 11937, uptime 0:04:30
frappe-bench-workers:frappe-bench-frappe-short-worker-0 RUNNING pid 11946, uptime 0:04:30
node-socketio.error.log:
SyntaxError: Unexpected token '.'
at wrapSafe (internal/modules/cjs/loader.js:915:16)
at Module._compile (internal/modules/cjs/loader.js:963:27)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
at Module.load (internal/modules/cjs/loader.js:863:32)
at Function.Module._load (internal/modules/cjs/loader.js:708:14)
at Module.require (internal/modules/cjs/loader.js:887:19)
at require (internal/modules/cjs/helpers.js:74:18)
at Object.<anonymous> (/home/frappe/frappe-bench/apps/frappe/node_modules/@redis/client/dist/index.js:18:18)
at Module._compile (internal/modules/cjs/loader.js:999:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
/home/frappe/frappe-bench/apps/frappe/node_modules/@redis/client/dist/lib/client/index.js:35
modules: extensions?.modules,
^
supervisor.conf:
frappe@eprv15:~/frappe-bench/config$ cat supervisor.conf
; Notes:
; priority=1 --> Lower priorities indicate programs that start first and shut down last
; killasgroup=true --> send kill signal to child processes too
; graceful timeout should always be lower than stopwaitsecs to avoid orphan gunicorn workers.
[program:frappe-bench-frappe-web]
command=/home/frappe/frappe-bench/env/bin/gunicorn -b 127.0.0.1:8000 -w 9 --max-requests 5000 --max-requests-jitter 500 -t 120 --graceful-timeout 30 frappe.app:application --preload
priority=4
autostart=true
autorestart=true
stdout_logfile=/home/frappe/frappe-bench/logs/web.log
stderr_logfile=/home/frappe/frappe-bench/logs/web.error.log
stopwaitsecs=40
killasgroup=true
user=frappe
directory=/home/frappe/frappe-bench/sites
[program:frappe-bench-frappe-schedule]
command=/usr/local/bin/bench schedule
priority=3
autostart=true
autorestart=true
stdout_logfile=/home/frappe/frappe-bench/logs/schedule.log
stderr_logfile=/home/frappe/frappe-bench/logs/schedule.error.log
user=frappe
directory=/home/frappe/frappe-bench
[program:frappe-bench-frappe-short-worker]
command=/usr/local/bin/bench worker --queue short,default
priority=4
autostart=true
autorestart=true
stdout_logfile=/home/frappe/frappe-bench/logs/worker.log
stderr_logfile=/home/frappe/frappe-bench/logs/worker.error.log
user=frappe
stopwaitsecs=360
directory=/home/frappe/frappe-bench
killasgroup=true
numprocs=1
process_name=%(program_name)s-%(process_num)d
[program:frappe-bench-frappe-long-worker]
command=/usr/local/bin/bench worker --queue long,default,short
priority=4
autostart=true
autorestart=true
stdout_logfile=/home/frappe/frappe-bench/logs/worker.log
stderr_logfile=/home/frappe/frappe-bench/logs/worker.error.log
user=frappe
stopwaitsecs=1560
directory=/home/frappe/frappe-bench
killasgroup=true
numprocs=1
process_name=%(program_name)s-%(process_num)d
[program:frappe-bench-redis-cache]
command=/usr/bin/redis-server /home/frappe/frappe-bench/config/redis_cache.conf
priority=1
autostart=true
autorestart=true
stdout_logfile=/home/frappe/frappe-bench/logs/redis-cache.log
stderr_logfile=/home/frappe/frappe-bench/logs/redis-cache.error.log
user=frappe
directory=/home/frappe/frappe-bench/sites
[program:frappe-bench-redis-queue]
command=/usr/bin/redis-server /home/frappe/frappe-bench/config/redis_queue.conf
priority=1
autostart=true
autorestart=true
stdout_logfile=/home/frappe/frappe-bench/logs/redis-queue.log
stderr_logfile=/home/frappe/frappe-bench/logs/redis-queue.error.log
user=frappe
directory=/home/frappe/frappe-bench/sites
[program:frappe-bench-node-socketio]
command=/usr/bin/node /home/frappe/frappe-bench/apps/frappe/socketio.js
priority=4
autostart=true
autorestart=true
stdout_logfile=/home/frappe/frappe-bench/logs/node-socketio.log
stderr_logfile=/home/frappe/frappe-bench/logs/node-socketio.error.log
user=frappe
directory=/home/frappe/frappe-bench
[group:frappe-bench-web]
programs=frappe-bench-frappe-web,frappe-bench-node-socketio
[group:frappe-bench-workers]
programs=frappe-bench-frappe-schedule,frappe-bench-frappe-short-worker,frappe-bench-frappe-long-worker
[group:frappe-bench-redis]
programs=frappe-bench-redis-cache,frappe-bench-redis-queue
bench --version: 5.20.0
node -v: v18.19.0
I am trying to get v15 up and running different way and servers/VMs, but everywhere the same error.
any ideas, how to fix this?
br
Andreas