Basic Frappe Framework installation fails

Hi all

we are trying to install ERPNext.

I tried official guide at GitHub - frappe/bench: CLI to manage Multi-tenant deployments for Frappe apps

I used Centos7 on a Google Cloud Compute node with this characteristics : g1-small (1 vCPU, 1.7 GB memory)

We are following from Ofificial guide the PRODUCTION installation path.

Again, I limited my acitivty to follow the official guide but the installation fail all the time with this error :

[ict@instance-erpnext ~]$ wget https://raw.githubusercontent.com/frappe/bench/master/install_scripts/setup_frappe.sh | 454 B 00:00:00
[ict@instance-erpnext ~]$ sudo bash setup_frappe.sh --setup-production
Installing for centos 7 amd64
In case you encounter an error, you can post on https://discuss.frappe.io
Adding centos mariadb repo
Installing packages for centos. This might take time…
Installing wkhtmltopdf
Configuring CentOS services
Starting services
Adding frappe user
Installing frappe-bench
Setting up first site
Restarted supervisord
Job for nginx.service failed because the control process exited with error code. See “systemctl status nginx.servic
e” and “journalctl -xe” for details.
Traceback (most recent call last):
File “/bin/bench”, line 9, in
load_entry_point(‘bench==3.0.0’, ‘console_scripts’, ‘bench’)()
File “/home/ict/bench-repo/bench/cli.py”, line 40, in cli
bench_command()
File “/usr/lib/python2.7/site-packages/click/core.py”, line 716, in call
return self.main(*args, **kwargs)
File “/usr/lib/python2.7/site-packages/click/core.py”, line 696, in main
rv = self.invoke(ctx)
File “/usr/lib/python2.7/site-packages/click/core.py”, line 1060, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/lib/python2.7/site-packages/click/core.py”, line 1060, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/lib/python2.7/site-packages/click/core.py”, line 889, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/usr/lib/python2.7/site-packages/click/core.py”, line 534, in invoke
return callback(*args, **kwargs)
File “/home/ict/bench-repo/bench/commands/setup.py”, line 43, in setup_production
setup_production(user=user)
File “/home/ict/bench-repo/bench/config/production_setup.py”, line 30, in setup_production
restart_service(‘nginx’)
File “/home/ict/bench-repo/bench/config/production_setup.py”, line 35, in restart_service
exec_cmd(“{service_manager} restart {service}”.format(service_manager=‘systemctl’, service=service))
File “/home/ict/bench-repo/bench/utils.py”, line 100, in exec_cmd
raise CommandFailedError(cmd)
bench.utils.CommandFailedError: systemctl restart nginx

[ict@instance-erpnext ~]$ systemctl status nginx.service
● nginx.service - The nginx HTTP and reverse proxy server
Loaded: loaded (/usr/lib/systemd/system/nginx.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Thu 2016-05-19 08:00:57 UTC; 5min ago
Process: 12977 ExecStart=/usr/sbin/nginx (code=exited, status=0/SUCCESS)
Process: 15114 ExecStartPre=/usr/sbin/nginx -t (code=exited, status=1/FAILURE)
Process: 15113 ExecStartPre=/usr/bin/rm -f /run/nginx.pid (code=exited, status=0/SUCCESS)
Main PID: 12980 (code=exited, status=0/SUCCESS)
May 19 08:00:57 instance-erpnext systemd[1]: Starting The nginx HTTP and reverse proxy server…
May 19 08:00:57 instance-erpnext nginx[15114]: nginx: [emerg] open() “/etc/nginx/conf.d/frappe-bench.conf” f…f:33
May 19 08:00:57 instance-erpnext nginx[15114]: nginx: configuration file /etc/nginx/nginx.conf test failed
May 19 08:00:57 instance-erpnext systemd[1]: nginx.service: control process exited, code=exited status=1
May 19 08:00:57 instance-erpnext systemd[1]: Failed to start The nginx HTTP and reverse proxy server.
May 19 08:00:57 instance-erpnext systemd[1]: Unit nginx.service entered failed state.
May 19 08:00:57 instance-erpnext systemd[1]: nginx.service failed.

I checked the permissions and they are ok. Any Clue?

Most important : OFFICIAL installation guide seems to be very elegant and easy to follow… but sadly it generate errors all the time I tried it. Last but not least, as required we are using a completely blanked system.

Maybe that there are more specific guide availble for Centos? if so where is it?

many thanks for your support.

have a nice day

@spect, run journalctl -xe and look for errors, related to nginx

Dear strixaluco ,
please read all my post before write !

I posted the execution of this command :
systemctl status nginx.service

and the problem is

May 19 08:00:57 instance-erpnext nginx[15114]: nginx: [emerg] open() “/etc/nginx/conf.d/frappe-bench.conf” f…f:33
May 19 08:00:57 instance-erpnext nginx[15114]: nginx: configuration file /etc/nginx/nginx.conf test failed

It’s strange that using a blank instance I receive this error

Have you tried running nginx -t ?

1 Like

[root@instance-erpnext ~]# nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
[root@instance-erpnext ~]#

It’s scaring me too much that following a Oficial Guide for installation I’m wasting so much time and having so much errors . I was attracted becasue installation looked elegant and easy but it’s transforming in night mare. maybe this kind of product needs a consulting service from some ERPNExt expert?

we have Senior network/System administrator here not able to succed to install this box. what do you suggest?

thanks

What does systemctl status nginx.service show now?

Even though Frappe team is trying to facilitate the deployment process, you still have to be ready to fix some things if you want to run standalone version. Don’t panic.

1 Like

You can try bench setup nginx as well.

It’s not amatter of panic it’s a matter of attiude to be professional and honest.

When I promise someone that in a document there is an installation guide, that means that who is reading will find instruction to have a software installed and all the exact actions to follow in order to get it.

On the other side if I have a “try yourself” / draft/ Beta guidelines to achieve a goals … this are NOT Installation instructions are advice and notice for friends.

ON Erpnext site there is a very nice elegant installation guide .
Now you say that tema sis improving procedures.

What game is this?

Disclaimer: I’m neither affiliated nor related to the Frappe team, I’m just one of the users of ERPNext, so none of my words should be considered as position of Frappe team.


I’m not aware of any kind of promise that we, users, are given in regards of installation instructions and so on. Can you share the link, please?
Also, please get familiar with basics of GPLv3 license regarding warranty.

Probably you’d be more calm and safe with SaaS version in your case.

1 Like

links are this http://frappe.github.io/erpnext/

http://frappe.github.io/erpnext/install.html

and theya re not working on Centos7. This is sure 100%

and this is not an installation guide.

so change the title.

There is no any warranty. Please stop trolling and go read GPLv3 or subscribe to SaaS version. Let’s stop offtopic.

Again, how about bench setup nginx?

1 Like

Relax man,
the Bench installation guide says "The bench allows you to setup Frappe / ERPNext apps on your local Linux (CentOS 6, Debian 7, Ubuntu, etc). Spect, would you mind telling, where you read or were promised that you’ll be able to install on Centos7? Perhaps I am missing something?

I see, it says at a different place in the text, that CentOS 7 too is supported, but seems not to be working for you. Just out of interest, have you tried Ubuntu 14.04 etc?

Hi, I experienced and posted this problems a few months ago on the discussion site. Basically, selinux has to be disabled before you start the installation process.
Secondly, in the nginx conf file there is an entry to the default page which must be deleted in order to get to the main erpnext page.
The Installation Guide is outdated and posting issues in the discussion forum is mostly not answered.
We evaluated ERPNEXT to include it in our product offering as an IT Solution provider but decided against it, basically because the bench framework documentation is quite bad and the forum and discussion sites are in my experience quite low in answers. I am a 20+ years experienced IT guy and to hit my head on a wall like with erpnext early in the deployment and testing process (as well as complete hickups when doing bench update which can destroy the site which i experienced myself) it was too hot for us to offer it our customers as well as invest time and money into developing for the platform. I guess we have to wait too let the platform become stable.

Hi,

I have tried to follow this guides to install Erpnext on a VM, following the Oficial Guide for installation on Centos 7.

The scenario was set on:
Centos 7 : 3.10.0-327.28.3.el7.x86_64
Minimal installation.

Steps:

yum install vim wget ntp telnet open-vm-tools -y
yum (upgrade or update) -y

–To disable firewall

sudo vim /etc/sysconfig/selinux

Content of file Selinux:

/* This file controls the state of SELinux on the system.
SELINUX= can take one of these three values:
enforcing - SELinux security policy is enforced.
permissive - SELinux prints warnings instead of enforcing.
disabled - No SELinux policy is loaded. */

SELINUX=disabled

/* SELINUXTYPE= can take one of three two values:
targeted - Targeted processes are protected,
minimum - Modification of targeted policy. Only selected processes are protected.
mls - Multi Level Security protection.*/

SELINUXTYPE=targeted

-End of file content

Restartart

init 6

Run command:

su -
mkdir /opt/erpnext
cd /opt/erpnext
wget https://raw.githubusercontent.com/frappe/bench/master/install_scripts/setup_frappe.sh
bash setup_frappe.sh --setup-production

bash setup_frappe.sh --setup-production
Installing for centos 7 amd64
In case you encounter an error, you can post on https://discuss.frappe.io
Adding centos mariadb repo
Installing packages for centos. This might take time…
Installing wkhtmltopdf
Configuring CentOS services
Starting services
Adding frappe user
Installing frappe-bench

Setting up first site:

usermod -aG wheel frappe

Setup Site:

su frappe
cd ~/frappe-bench
mv sites/site1.local mysite.domain
bench --site mysite.domain install-app erpnext
sudo bench setup production frappe
exit
(Set to Y on every question)

Remove user from root group

sudo usermod -G “” frappe

I found problems running the Nginx service the /home/frappe/frappe-bench/config/nginx.conf was set as a symlink on the path /etc/nginx/conf.d/ and linked as frappe-bench.conf and on the main Nginx configuration directive, it was set the include conf.d/*.conf, when I tried to start the web service it failed, the reason I found out is that the Nginx was having issues with configs from symlink.

When issuing the command: nginx -t, everything run fine, but if It was run as a normal service it show up with an error like:

→ nginx: [emerg] open() “/etc/nginx/conf.d/frappe-bench.conf” failed (13: Permission denied) in /etc/nginx/nginx.conf:20
→ nginx[5657]: nginx: configuration file /etc/nginx/nginx.conf test failed
—>nginx.service: control process exited, code=exited status=1
→ systemd[1]: Failed to start The nginx HTTP and reverse proxy server.

So I did some modifications and copied the frappe-bench.conf symlinked to frappe.conf with root as owner:

cd /etc/nginx/conf.d/
ls -ls
frappe-bench.conf (symlink file)
cp frappe-bench.conf frappe.conf
rm frappe-bench.conf

Restart Nginx service:

service nginx start (I start the service since it was not started due to many failed attempts)

Whe running the <command journalctl -xe>:

– Unit nginx.service has begun starting up.
systemd[1]: nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
systemd[1]: nginx: configuration file /etc/nginx/nginx.conf test is successful
systemd[1]: Failed to read PID from file /run/nginx.pid: Invalid argument
systemd[1]: Started The nginx HTTP and reverse proxy server.
– Subject: Unit nginx.service has finished start-up
– Defined-By: systemd
– Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Run command to verify <netstat -nlt

Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 127.0.0.1:6379 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:8080 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:81 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:11000 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:8000 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:12000 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:9000 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:13000 0.0.0.0:* LISTEN
tcp6 0 0 :::3306 :::* LISTEN
tcp6 0 0 :::22 :::* LISTEN
tcp6 0 0 ::1:25 :::* LISTEN

The port 80 and 81 were set for company.com and company2.com for test purpose.

Keep also in mind that Centos has a serius problems with its “systemctl” service, in order to run and create services, that is why you should run the < yum upgrade -y> command after installation.

Some of the procedures were taken from

Note:
By the time I was trying to setup the Erpnext solution and tried to access to http://company1.com:80 or http://company2.com it shows up a “403 Forbidden”. Trying to figure out what is happening.

1 Like