Background worker not working after install multiple bench on the same server

Hello, I have a dedicated server CentOS, I installed frappe bench on it from the root.

After that I create multiple users on the server and each user has a domain or sub-domain.

Then for each user I install erpnext using bench init … create new site … etc.

I faced some issues with reddis and nginx not working because the redis and nginx are shared with all users from root as well bech, so i changed the ports in each bench to be different and all working fine now and all websites are working.

But the issue now the scheduler and workers, background workers not working and only work for the first installed site, in supervisor I get these errors

frappe-bench-t1-redis:frappe-bench-t1-redis-cache RUNNING pid 12402, uptime 17:12:10 frappe-bench-t1-redis:frappe-bench-t1-redis-queue RUNNING pid 12401, uptime 17:12:10 frappe-bench-t1-redis:frappe-bench-t1-redis-socketio RUNNING pid 12405, uptime 17:12:10 frappe-bench-t1-web:frappe-bench-t1-frappe-web RUNNING pid 12429, uptime 17:12:10 frappe-bench-t1-web:frappe-bench-t1-node-socketio RUNNING pid 12428, uptime 17:12:10 frappe-bench-t1-workers:frappe-bench-t1-frappe-default-worker-0 FATAL can't find command 'None' frappe-bench-t1-workers:frappe-bench-t1-frappe-long-worker-0 FATAL can't find command 'None' frappe-bench-t1-workers:frappe-bench-t1-frappe-schedule FATAL can't find command 'None' frappe-bench-t1-workers:frappe-bench-t1-frappe-short-worker-0 FATAL can't find command 'None' frappe-bench-redis:frappe-bench-redis-cache FATAL Exited too quickly (process log may have details) frappe-bench-redis:frappe-bench-redis-queue RUNNING pid 12386, uptime 17:12:10 frappe-bench-redis:frappe-bench-redis-socketio RUNNING pid 12388, uptime 17:12:10 frappe-bench-t2-redis:frappe-bench-t2-redis-cache RUNNING pid 12384, uptime 17:12:10 frappe-bench-t2-redis:frappe-bench-t2-redis-queue RUNNING pid 12383, uptime 17:12:10 frappe-bench-t2-redis:frappe-bench-t2-redis-socketio RUNNING pid 12385, uptime 17:12:10 frappe-bench-t2-web:frappe-bench-t2-frappe-web RUNNING pid 12389, uptime 17:12:10 frappe-bench-t2-web:frappe-bench-t2-node-socketio RUNNING pid 12390, uptime 17:12:10 frappe-bench-t2-workers:frappe-bench-t2-frappe-default-worker-0 STOPPED Dec 31 07:00 PM frappe-bench-t2-workers:frappe-bench-t2-frappe-long-worker-0 STOPPED Dec 31 07:00 PM frappe-bench-t2-workers:frappe-bench-t2-frappe-schedule STOPPED Dec 31 07:00 PM frappe-bench-t2-workers:frappe-bench-t2-frappe-short-worker-0 STOPPED Dec 31 07:00 PM frappe-bench-web:frappe-bench-frappe-web RUNNING pid 12391, uptime 17:12:10 frappe-bench-web:frappe-bench-node-socketio RUNNING pid 12400, uptime 17:12:10 frappe-bench-workers:frappe-bench-frappe-default-worker-0 RUNNING pid 12419, uptime 17:12:10 frappe-bench-workers:frappe-bench-frappe-long-worker-0 RUNNING pid 12420, uptime 17:12:10 frappe-bench-workers:frappe-bench-frappe-schedule RUNNING pid 12413, uptime 17:12:10 frappe-bench-workers:frappe-bench-frappe-short-worker-0 RUNNING pid 12423, uptime 17:12:10 frappe-bench-t3-redis:frappe-bench-t3-redis-cache RUNNING pid 12408, uptime 17:12:10 frappe-bench-t3-redis:frappe-bench-t3-redis-queue RUNNING pid 12406, uptime 17:12:10 frappe-bench-t3-redis:frappe-bench-t3-redis-socketio RUNNING pid 12407, uptime 17:12:10 frappe-bench-t3-web:frappe-bench-t3-frappe-web RUNNING pid 12381, uptime 17:12:10 frappe-bench-t3-web:frappe-bench-t3-node-socketio RUNNING pid 12382, uptime 17:12:10 frappe-bench-t3-workers:frappe-bench-t3-frappe-default-worker-0 FATAL can't find command 'None' frappe-bench-t3-workers:frappe-bench-t3-frappe-long-worker-0 FATAL can't find command 'None' frappe-bench-t3-workers:frappe-bench-t3-frappe-schedule FATAL can't find command 'None' frappe-bench-t3-workers:frappe-bench-t3-frappe-short-worker-0 FATAL can't find command 'None'

So when i open the supervisor.conf for the working site i see the bench path correctly like this:

`
program:frappe-bench-frappe-schedule]
command=/usr/local/bin/bench schedule
priority=3
autostart=true
autorestart=true
stdout_logfile=/home/t2/frappe-bench/logs/schedule.log
stderr_logfile=/home/t2/frappe-bench/logs/schedule.error.log
user=t2
directory=/home/t2/frappe-bench

[program:frappe-bench-frappe-default-worker]
command=/usr/local/bin/bench worker --queue default
priority=4
autostart=true
`

But in the none working sites the path is set to ‘none’ and i tried to modify it manually and execute ‘bench setup supervisor’ in the site but it did not work, here is an image of the non working sites:

Please advice,
Thanks

I did not figure it out yet but i found a chart on frappe docs similar to the architecture I am talking about

Problem resolved by running production setup for each site from whm root user

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.