ERPNext Foundation ERPNext Cloud User Manual Blog Discuss Frappé* Donate

Why is it necessary to run "bench start" to start ERPNext?


#1

Is it not possible to just create a new virtual host in Apache and make it point to the erpnext folder?

Regards
Jaime


#2

Set up ERPNext in production mode if you don’t want to manually start the bench.


#3

How to do that?


#4

Here is the production setup guide


#5

It would be wonderful it it works perfectly… but none of automated scripts work in Centos 7:

I run the command and this was the result:

root@vps [/home/frappe/frappe-bench]# bench setup production frappe
Traceback (most recent call last):
  File "/usr/bin/bench", line 10, in <module>
    sys.exit(cli())
  File "/usr/lib/python2.7/site-packages/bench/cli.py", line 40, in cli
    bench_command()
  File "/usr/lib64/python2.7/site-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/usr/lib64/python2.7/site-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/usr/lib64/python2.7/site-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/lib64/python2.7/site-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/lib64/python2.7/site-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/lib64/python2.7/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/bench/commands/setup.py", line 57, in setup_production
    setup_production(user=user, yes=yes)
  File "/usr/lib/python2.7/site-packages/bench/config/production_setup.py", line 7, in setup_production
    generate_supervisor_config(bench_path=bench_path, user=user, yes=yes)
  File "/usr/lib/python2.7/site-packages/bench/config/supervisor.py", line 9, in generate_supervisor_config
    template = bench.env.get_template('supervisor.conf')
  File "/usr/lib64/python2.7/site-packages/jinja2/environment.py", line 830, in get_template
    return self._load_template(name, self.make_globals(globals))
  File "/usr/lib64/python2.7/site-packages/jinja2/environment.py", line 804, in _load_template
    template = self.loader.load(self, name, globals)
  File "/usr/lib64/python2.7/site-packages/jinja2/loaders.py", line 113, in load
    source, filename, uptodate = self.get_source(environment, name)
  File "/usr/lib64/python2.7/site-packages/jinja2/loaders.py", line 235, in get_source
    raise TemplateNotFound(template)
jinja2.exceptions.TemplateNotFound: supervisor.conf
root@vps [/home/frappe/frappe-bench]#

I have tried by doint it manually but the same happen.

Regards
Jaime


#6

Run these commands:

sudo apt-get install supervisor
sudo apt-get install nginx
sudo bench setup production frappe

Be sure to be on frappe-bench folder when you run the last command.

P.S. Let me know if that worked.


#7

No success:

root@vps [/home/frappe/frappe-bench]# yum install supervisor
Loaded plugins: fastestmirror, universal-hooks
Loading mirror speeds from cached hostfile
 * EA4: 208.100.0.204
 * base: ftpmirror.your.org
 * epel: mirror.steadfastnet.com
 * extras: ftpmirror.your.org
 * ius: muug.ca
 * updates: ftpmirror.your.org
Package supervisor-3.1.4-1.el7.noarch already installed and latest version
Nothing to do
root@vps [/home/frappe/frappe-bench]# yum install nginx
Loaded plugins: fastestmirror, universal-hooks
Loading mirror speeds from cached hostfile
 * EA4: 208.100.0.204
 * base: ftpmirror.your.org
 * epel: mirror.steadfastnet.com
 * extras: ftpmirror.your.org
 * ius: muug.ca
 * updates: ftpmirror.your.org
Package 1:nginx-1.14.2-1.el7_4.ngx.x86_64 already installed and latest version
Nothing to do
root@vps [/home/frappe/frappe-bench]# bench setup production frappe
Traceback (most recent call last):
  File "/usr/bin/bench", line 10, in <module>
    sys.exit(cli())
  File "/usr/lib/python2.7/site-packages/bench/cli.py", line 40, in cli
    bench_command()
  File "/usr/lib64/python2.7/site-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/usr/lib64/python2.7/site-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/usr/lib64/python2.7/site-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/lib64/python2.7/site-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/lib64/python2.7/site-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/lib64/python2.7/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/bench/commands/setup.py", line 57, in setup_production
    setup_production(user=user, yes=yes)
  File "/usr/lib/python2.7/site-packages/bench/config/production_setup.py", line 7, in setup_production
    generate_supervisor_config(bench_path=bench_path, user=user, yes=yes)
  File "/usr/lib/python2.7/site-packages/bench/config/supervisor.py", line 9, in generate_supervisor_config
    template = bench.env.get_template('supervisor.conf')
  File "/usr/lib64/python2.7/site-packages/jinja2/environment.py", line 830, in get_template
    return self._load_template(name, self.make_globals(globals))
  File "/usr/lib64/python2.7/site-packages/jinja2/environment.py", line 804, in _load_template
    template = self.loader.load(self, name, globals)
  File "/usr/lib64/python2.7/site-packages/jinja2/loaders.py", line 113, in load
    source, filename, uptodate = self.get_source(environment, name)
  File "/usr/lib64/python2.7/site-packages/jinja2/loaders.py", line 235, in get_source
    raise TemplateNotFound(template)
jinja2.exceptions.TemplateNotFound: supervisor.conf
root@vps [/home/frappe/frappe-bench]#
-rw-r--r--  1 root  root      92 Mar 12 11:37 recent_authed_mail_ips_users
-

#8

Don’t use root account for this. As a matter of fact, don’t use root accout at all. We have ‘su’ for this.


#9

@bedo

I know, but I got several problems installing ERPNext system in Centos 7, nothing explains in documents works, so to discard any permission issue, I use root.


#10

I used this step by step. See if it helps.