[solved] Why is it so difficult to install erpnext?


I have tried installing erpnext for the past 6 hours. Using 2 different VPS’s, using multiple OS’s and every single time the install stops due to some error and it points to nginx.
bench.utils.CommandFailedError: service nginx restart

What sorcery is being used here? I am frustrated beyond anything.

How can this be prevented?

Sounds like you are starting from bare metal, but I guess I would ask if there are other web servers such as Apache running that might be conflicting with nginx?


thanks for your reply. Nothing else is running. Fresh install.
I tried CentOS 6 and 7. No joy.

I am busy reinstalling it again and will post the error :slight_smile:

Here we go. CentOS 7

Job for nginx.service failed because the control process exited with error code. See "systemctl status nginx.service" and "journalctl -xe" for details. Traceback (most recent call last): File "/bin/bench", line 9, in load_entry_point('bench==0.0.0', 'console_scripts', 'bench')() File "/home/frappe/bench-repo/bench/cli.py", line 60, in cli bench() File "/usr/lib64/python2.7/site-packages/click/core.py", line 716, in __call__ return self.main(*args, **kwargs) File "/usr/lib64/python2.7/site-packages/click/core.py", line 696, in main rv = self.invoke(ctx) File "/usr/lib64/python2.7/site-packages/click/core.py", line 1060, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/usr/lib64/python2.7/site-packages/click/core.py", line 1060, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/usr/lib64/python2.7/site-packages/click/core.py", line 889, in invoke return ctx.invoke(self.callback, **ctx.params) File "/usr/lib64/python2.7/site-packages/click/core.py", line 534, in invoke return callback(*args, **kwargs) File "/home/frappe/bench-repo/bench/cli.py", line 456, in setup_production _setup_production(user=user) File "/home/frappe/bench-repo/bench/production_setup.py", line 69, in setup_production restart_service('nginx') File "/home/frappe/bench-repo/bench/production_setup.py", line 9, in restart_service exec_cmd("{service_manager} restart {service}".format(service_manager='systemctl', service=service)) File "/home/frappe/bench-repo/bench/utils.py", line 105, in exec_cmd raise CommandFailedError(cmd) bench.utils.CommandFailedError: systemctl restart nginx

I finally resolved it.

Selinux was the culprit. Once it’s set to disable it installs fine.