Setup production error

Hi, i am trying to setup production mode to run site on browser but facing this error since several weeks. Please help!!

root@devchd:/home/Erp/frappe-bench# sudo bench setup production dev
supervisor.conf already exists and this will overwrite it. Do you want to continue? [y/N]: y
Port configuration list:

Site site1.local assigned port: 80
nginx.conf already exists and this will overwrite it. Do you want to continue? [y/N]: y
Traceback (most recent call last):
File “/usr/local/bin/bench”, line 11, in
load_entry_point(‘bench’, ‘console_scripts’, ‘bench’)()
File “/home/Erp/bench-repo/bench/cli.py”, line 40, in cli
bench_command()
File “/usr/local/lib/python2.7/site-packages/click/core.py”, line 722, in call
return self.main(*args, **kwargs)
File “/usr/local/lib/python2.7/site-packages/click/core.py”, line 697, in main
rv = self.invoke(ctx)
File “/usr/local/lib/python2.7/site-packages/click/core.py”, line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/local/lib/python2.7/site-packages/click/core.py”, line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/local/lib/python2.7/site-packages/click/core.py”, line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/usr/local/lib/python2.7/site-packages/click/core.py”, line 535, in invoke
return callback(*args, **kwargs)
File “/home/Erp/bench-repo/bench/commands/setup.py”, line 56, in setup_production
setup_production(user=user)
File “/home/Erp/bench-repo/bench/config/production_setup.py”, line 17, in setup_production
bench_name=bench_name, extn=supervisor_conf_extn))
File “/usr/local/lib/python2.7/posixpath.py”, line 70, in join
elif path == ‘’ or path.endswith(‘/’):
AttributeError: ‘NoneType’ object has no attribute ‘endswith’

Try to follow installation instructions mentioned here

Do you really think that i have not already go through this? I am asking the same problem since 2 weeks but sadly, there is even not a sensible reply. Do you really think this will help me out?
I installing Erpnext by following these steps and you mentioned to go through these steps again and it will solve my problem? I mean Really? seriously?

Maybe someone else can give you a more “sensible” reply. I have replied voluntarily as per my knowledge but maybe that is not good enough for you.

Yes, i really stuck on this issue. May be i spoke too much,sorry for that but you don’t have idea how much frustrate i am right now.

Hi Davinder,

I think you have already a bench, when your trying to create another bench and when setting up for production you are having this overwrite issue.

Please follow this steps to resolve it.

switch to root account.
Then
vim /etc/nginx/conf.d/frappe-bench.conf

server {
listen 80; // give another port number like 8080, 8090 any port.
server_name
site1.local
;

then save the file

wq;

then come back to bench .
Please check all the configuration file are set properly or not.
then
bench start or bench restart

Thanks
Vivekananda reddy

Welcome Davinder_Kumar

Rather than login as root I suggest you use sudo instead.

Note that the install instructions specifically state ‘Install bench as a non root user’

1 Like