Error when deploying ERPNext on CentOS 6.7 with Google Cloud

wget https://raw.githubusercontent.com/frappe/bench/master/install_scripts/set
up_frappe.sh
–2015-11-18 17:22:49-- https://raw.githubusercontent.com/frappe/bench/master/install_scripts/setup_frappe.sh
Resolving raw.githubusercontent.com… 23.235.40.133
Connecting to raw.githubusercontent.com|23.235.40.133|:443… connected.
HTTP request sent, awaiting response… 200 OK
Length: 13790 (13K) [text/plain]
Saving to: “setup_frappe.sh”
100%[======================================================================>] 13,790 --.-K/s in 0s
2015-11-18 17:22:49 (1.19 GB/s) - “setup_frappe.sh” saved [13790/13790]
[root@linux01 user]# sudo bash setup_frappe.sh --setup-production
Installing for centos 6 amd64
In case you encounter an error, you can post on discuss.frappe.io
Adding centos mariadb repo
Installing packages for centos. This might take time…
Installing wkhtmltopdf
Installing supervisor
Starting supervisord:
Configuring CentOS services
Starting services
Adding frappe user
Installing frappe-bench
Setting up first site
Restarted supervisord
Traceback (most recent call last):
File “/usr/bin/bench”, line 9, in
load_entry_point(‘bench==0.92’, ‘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 700, in call
return self.main(*args, **kwargs)
File “/usr/lib64/python2.7/site-packages/click/core.py”, line 680, in main
rv = self.invoke(ctx)
File “/usr/lib64/python2.7/site-packages/click/core.py”, line 1027, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/lib64/python2.7/site-packages/click/core.py”, line 1027, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/lib64/python2.7/site-packages/click/core.py”, line 873, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/usr/lib64/python2.7/site-packages/click/core.py”, line 508, in invoke
return callback(*args, **kwargs)
File “/home/frappe/bench-repo/bench/cli.py”, line 459, 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 11, in restart_service
exec_cmd("{service_manager} {service} restart ".format(service_manager=‘service’, service=service))
File “/home/frappe/bench-repo/bench/utils.py”, line 104, in exec_cmd
raise CommandFailedError(cmd)
bench.utils.CommandFailedError: service nginx restart

make sure, you do not have nginx and other softwares such as mariadb/mysql present on your server. if you are running: sudo bash setup_frappe.sh --setup-production
it does fail if you have nginx or mysql/mariadb pre-installed.

Deploying VM with minimal image which does not come with any preinstalled softwares as mentioned above will help…
If already installed, then remove nginx along with config files before running bench setup on server.

PS: Reinstall VM with CentOS and try again as suggested above.

1 Like

Thank you.

So I removed –setup-production from the string and it worked.

Hi Newbie here.

I have this error when installing

file /usr/share/man/man1/mysql_config.1.gz from install of MariaDB-devel-10.0.24-1.el6.x86_64 conflicts with file from package MySQL55-devel-5.5.47-1.cp1148.x86_64

Help appreciated thank you…

You will need to remove mysql server.

yum remove mysql*

make sure to take backup if you have anything inside mysql database server.