I create 3 sites and installed library_management on it.
For above 3 sites [library.dev, library.dev1, library.dev2] it maintain separate database.
But issue is when I’m entering data in site library.dev1:8000
same data is visible in library.dev:8000 and library.dev2:8000
May be it referring same database (default on) .
As per Multi tenant feature my thinking is it maintain separate database for each site, so that record created in one site(library.dev1) should not be visible in other site(library.dev2).
Please correct me if I miss some steps related to multi-tenancy, As I’m new to frappe framework, I want to explore more on it.
It working, in my local system having python version 2.7.6 and OS is ununtu 14.04
But when I am doing same thing in my production machine having python version 2.7.12+ and OS is ubuntu 16.04
after running below command
sudo bench setup production erpnext
It giving below error
supervisor.conf already exists and this will overwrite it. Do you want to continue? [y/N]: y
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/erpnext/bench-repo/bench/cli.py”, line 40, in cli
bench_command()
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 722, in call
return self.main(*args, **kwargs)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 697, in main
rv = self.invoke(ctx)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 535, in invoke
return callback(*args, **kwargs)
File “/home/erpnext/bench-repo/bench/commands/setup.py”, line 56, in setup_production
setup_production(user=user)
File “/home/erpnext/bench-repo/bench/config/production_setup.py”, line 17, in setup_production
bench_name=bench_name, extn=supervisor_conf_extn))
File “/usr/lib/python2.7/posixpath.py”, line 70, in join
elif path == ‘’ or path.endswith(‘/’):
AttributeError: ‘NoneType’ object has no attribute ‘endswith’
To switch to production mode on Ubuntu 16.10 following is what I did and you can follow the thread below.
frappe@erpnext:~/frappe-bench$ sudo supervisorctl reload
Restarted supervisord
frappe@erpnext:~/frappe-bench$ sudo service nginx start
frappe@erpnext:~/frappe-bench$ sudo bench setup production [USERNAME]
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
No config updates to processes
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
frappe@erpnext:~/frappe-bench$