i mean production mean run forever whitout bench start
when server shutdown and restart need erp start automatic
I am getting the following error while switching to production from developer
[root@herculesgroup frappe-bench]# sudo bench setup production
Usage: bench setup production [OPTIONS] USER
Error: Missing argument “user”.
[root@herculesgroup frappe-bench]# sudo bench setup production frappe
supervisor.conf already exists and this will overwrite it. Do you want to continue? [y/N]: y
nginx.conf already exists and this will overwrite it. Do you want to continue? [y/N]: y
Restarted supervisord
[root@herculesgroup frappe-bench]# bench restart
frappe: ERROR (no such group)
frappe: ERROR (no such group)
Am I missing something?
I can start bench using bench start though.
Hmm, try running :
bench setup supervisor
sudo supervisorctl reread
sudo supervisorctl reload
sudo supervisorctl restart all
I got the following message.
[root@herculesgroup frappe-bench]# bench setup supervisor
supervisor.conf already exists and this will overwrite it. Do you want to continue? [y/N]: y
[root@herculesgroup frappe-bench]# sudo supervisorctl reread
No config updates to processes
[root@herculesgroup frappe-bench]# sudo supervisorctl reload
Restarted supervisord
[root@herculesgroup frappe-bench]# sudo supervisorctl status
[root@herculesgroup frappe-bench]# supervisorctl status
[root@herculesgroup frappe-bench]# sudo supervisorctl reread
No config updates to processes
[root@herculesgroup frappe-bench]# supervisor reread
-bash: supervisor: command not found
[root@herculesgroup frappe-bench]# sudo supervisorctl reread
No config updates to processes
[root@herculesgroup frappe-bench]# sudo supervisorctl reload
Restarted supervisord
[root@herculesgroup frappe-bench]# sudo supervisorctl restart all
[root@herculesgroup frappe-bench]# bench restart
frappe: ERROR (no such group)
frappe: ERROR (no such group)
[root@herculesgroup frappe-bench]#
Am I missing something?
I’m not really sure why the supervisor config doesn’t seem to be loaded at all.
could you suggest setup of supervisor manually.
I mean what all are the files need to be created and the content required in those files for running the supervisor in Centos 7.
I want to try creating all the files which are required for running the supervisor manually and writing the content into it.
Regards,
Koshish Koirala
@vjFaLk I managed to come this far by modifying the file /etc/supervisord.conf file
and the running sudo supervisord, sudo supervisorctl
[root@herculesgroup frappe-bench]# bench restart
frappe-bench-web:frappe-bench-frappe-web: stopped
frappe-bench-workers:frappe-bench-frappe-async-worker: stopped
frappe-bench-workers:frappe-bench-frappe-longjob-worker: stopped
frappe-bench-workers:frappe-bench-frappe-workerbeat: stopped
frappe-bench-workers:frappe-bench-frappe-worker: stopped
frappe-bench-web:frappe-bench-node-socketio: ERROR (abnormal termination)
frappe-bench-web:frappe-bench-frappe-web: started
frappe-bench-workers:frappe-bench-frappe-async-worker: started
frappe-bench-workers:frappe-bench-frappe-longjob-worker: started
frappe-bench-workers:frappe-bench-frappe-workerbeat: started
frappe-bench-workers:frappe-bench-frappe-worker: started
Now bench restart command looks like working
But at the browser its showing Unable to connect
While after running through bench start I am able to access in browser.
What might be the possible reasons?
Also unable to change from developer to production
Please be specific, what has not worked and any error response
Thanks
It’s sorted out
Nice - a request for next time? Whatever got you unstuck, please do note here with a link or tip for others to follow, thanks…
I fixed it on ubuntu by installing supervisor and creating frappe user with proper permission
What you modified in this file path ?
modifying the file /etc/supervisord.conf file
frappe-bench-workers:frappe-bench-frappe-schedule: stopped
frappe-bench-workers:frappe-bench-frappe-default-worker-0: stopped
frappe-bench-workers:frappe-bench-frappe-long-worker-0: stopped
frappe-bench-workers:frappe-bench-frappe-short-worker-0: stopped
frappe-bench-web:frappe-bench-frappe-web: stopped
frappe-bench-web:frappe-bench-node-socketio: stopped
frappe-bench-redis:frappe-bench-redis-queue: stopped
frappe-bench-redis:frappe-bench-redis-cache: stopped
frappe-bench-redis:frappe-bench-redis-socketio: stopped
frappe-bench-web:frappe-bench-frappe-web: ERROR (spawn error)
frappe-bench-redis:frappe-bench-redis-queue: ERROR (spawn error)
frappe-bench-redis:frappe-bench-redis-cache: ERROR (spawn error)
frappe-bench-redis:frappe-bench-redis-socketio: 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-web:frappe-bench-node-socketio: ERROR (spawn error)
frappe-bench-workers:frappe-bench-frappe-schedule: ERROR (spawn error)
frappe-bench-workers:frappe-bench-frappe-long-worker-0: ERROR (spawn error)
I found a solution as follows:
When you switch to development mode you normally do : bench set-config developer_mode 1 Inside the frappe-bench folder
To change to production mode, do: bench set-config developer_mode 0 Inside the frappe-bench folder
This edits the site_config.json file for your site.
Hello
here you have to give the sudo user you created for frappe
ex. sudo bench setup production [USER]