ERPNext.com Frappe Cloud Documentation Partners Frappe School Public Chat

Bench restart error (spawn error)

This is a new installation and in production mode.
All is done and I can see the nginx default page.
But when bench restart I got:

frappe-bench-web:frappe-bench-node-socketio: stopped
frappe-bench-web:frappe-bench-frappe-web: stopped
frappe-bench-workers:frappe-bench-frappe-schedule: ERROR (spawn error)
frappe-bench-workers:frappe-bench-frappe-default-worker-0: ERROR (spawn error)
frappe-bench-workers:frappe-bench-frappe-short-worker-0: ERROR (spawn error)
frappe-bench-workers:frappe-bench-frappe-long-worker-0: ERROR (spawn error)
frappe-bench-web:frappe-bench-frappe-web: started
frappe-bench-web:frappe-bench-node-socketio: started

Why?
And how to solve?
Thank you

Could you try the following:

sudo supervisorctl restart all

(based on: [solved] production server - redis spawn error )

Run sudo supervisorctl restart all and got this:

frappe-bench-redis:frappe-bench-redis-cache: stopped
frappe-bench-redis:frappe-bench-redis-queue: stopped
frappe-bench-redis:frappe-bench-redis-socketio: stopped
frappe-bench-web:frappe-bench-node-socketio: stopped
frappe-bench-web:frappe-bench-frappe-web: stopped
frappe-bench-workers:frappe-bench-frappe-schedule: ERROR (spawn error)
frappe-bench-workers:frappe-bench-frappe-default-worker-0: ERROR (spawn error)
frappe-bench-workers:frappe-bench-frappe-short-worker-0: ERROR (spawn error)
frappe-bench-workers:frappe-bench-frappe-long-worker-0: ERROR (spawn error)
frappe-bench-redis:frappe-bench-redis-cache: started
frappe-bench-redis:frappe-bench-redis-queue: started
frappe-bench-redis:frappe-bench-redis-socketio: started
frappe-bench-web:frappe-bench-frappe-web: started
frappe-bench-web:frappe-bench-node-socketio: started

It’s the workers that are error.
The pause-scheduler in common_site_config.json has been set to 0.

Run sudo supervisorctl status:

frappe-bench-redis:frappe-bench-redis-cache                 RUNNING   pid 7102, uptime 0:01:27
frappe-bench-redis:frappe-bench-redis-queue                 RUNNING   pid 7103, uptime 0:01:27
frappe-bench-redis:frappe-bench-redis-socketio              RUNNING   pid 7104, uptime 0:01:27
frappe-bench-web:frappe-bench-frappe-web                    RUNNING   pid 7105, uptime 0:01:27
frappe-bench-web:frappe-bench-node-socketio                 RUNNING   pid 7106, uptime 0:01:27
frappe-bench-workers:frappe-bench-frappe-default-worker-0   FATAL     Exited too quickly (process log may have details)
frappe-bench-workers:frappe-bench-frappe-default-worker-1   FATAL     Exited too quickly (process log may have details)
frappe-bench-workers:frappe-bench-frappe-default-worker-2   FATAL     Exited too quickly (process log may have details)
frappe-bench-workers:frappe-bench-frappe-long-worker-0      FATAL     Exited too quickly (process log may have details)
frappe-bench-workers:frappe-bench-frappe-long-worker-1      FATAL     Exited too quickly (process log may have details)
frappe-bench-workers:frappe-bench-frappe-long-worker-2      FATAL     Exited too quickly (process log may have details)
frappe-bench-workers:frappe-bench-frappe-schedule           FATAL     Exited too quickly (process log may have details)
frappe-bench-workers:frappe-bench-frappe-short-worker-0     FATAL     Exited too quickly (process log may have details)
frappe-bench-workers:frappe-bench-frappe-short-worker-1     FATAL     Exited too quickly (process log may have details)
frappe-bench-workers:frappe-bench-frappe-short-worker-2     FATAL     Exited too quickly (process log may have details)

From the logs/worker.error.log gets a lot of this:

supervisor: couldn't exec /root/.local/bin/bench: EACCES
supervisor: child process was not spawned

Run bench src:

/home/punia/.local/lib/python3.6/site-packages

Run which bench:

~/.local/bin/bench

Run sudo which bench:

/root/.local/bin/bench

Now when bench restart I get this (the error is no file)

$ supervisorctl restart frappe-bench-workers: frappe-bench-web:
frappe-bench-web: frappe-bench-node-socketio: stopped
frappe-bench-web: frappe-bench-frappe-web: stopped
frappe-bench-workers: frappe-bench-frappe-schedule: ERROR (no such file)
frappe-bench-workers: frappe-bench-frappe-default-worker-0: ERROR (no such file)
frappe-bench-workers: frappe-bench-frappe-default-worker-1: ERROR (no such file)
frappe-bench-workers: frappe-bench-frappe-default-worker-2: ERROR (no such file)
frappe-bench-workers: frappe-bench-frappe-short-worker-0: ERROR (no such file)
frappe-bench-workers: frappe-bench-frappe-short-worker-1: ERROR (no such file)
frappe-bench-workers: frappe-bench-frappe-short-worker-2: ERROR (no such file)
frappe-bench-workers: frappe-bench-frappe-long-worker-0: ERROR (no such file)
frappe-bench-workers: frappe-bench-frappe-long-worker-1: ERROR (no such file)
frappe-bench-workers: frappe-bench-frappe-long-worker-2: ERROR (no such file)
frappe-bench-web: frappe-bench-frappe-web: started
frappe-bench-web: frappe-bench-node-socketio: started

I don’t know if this is related, but I run sudo systemctl status *
and get these:

Unit apps.service could not be found.
Unit archived_sites.service could not be found.
Unit config.service could not be found.
Unit env.service could not be found.
Unit logs.service could not be found.
Unit patches.txt.service could not be found.
Unit Procfile.service could not be found.
Unit sites.service could not be found.

I wonder how you have resolved this, as I’m facing the same problem.

I forgot. But I think I enabled and started each services one by one manually with
sudo systemctl enable (or start) servicename

1 Like