Multitenant is not working properly

I have a problem trying to install two sites on a server.
I used commands similar to the following:

wget https://raw.githubusercontent.com/frappe/bench/master/playbooks/install.py
sudo python install.py --production --user frappe

In frappe-bench folder:

sudo bench config dns_multitenant on

bench new-site site1
bench --site site1 install-app erpnext
bench setup nginx
service nginx reload

bench new-site site2
bench --site site2 install-app erpnext
bench setup nginx
service nginx reload

sudo bench setup production frappe

Everything seems to work until i try to access to any site (site1.servername.com, site2.servername.com). The message on the screen is:

Sorry! We will be back soon. Don´t panic…

Is there something wrong or am I accessing incorrectly?

Hi @emoji,

Rename your sites exactly like your subdomain name: site1.servername.com and site2.servername.com

It should solve your issue :wink:

seems your site is in maintenance state please migrate the site using bench migrate and check

Hi chdecultot,
I had an installation of erpnext that we used for a while. Unfortunatately the server crashed. Luckily, I had a backup I had made some time before the crash. I reinstalled erpnext and resored the database over the installation through mysql and I keep getting the "Unknown column “send_me_a_copy” error message. I noticed different versions of erpnext have differnet restore procedures. I also suspect the version i backed up from matters.

The problem is that i don’t know what version it was. I installed erpnext and I am not even sure what version this is. I followed some instruction to find the current version and got this in a init.py file. from future import unicode_literals
import inspect
import frappe
from erpnext.hooks import regional_overrides

version = ‘9.2.4’

Do I need to install the specific version I used before install (which I don’t even know) or is there a work around?

Thanks for the time and effort to support challenges like this.

Hi tiwiex,

Yes you need to make sure the two versions are matching, else the DB schemas are different.

You have completely erased your previous ERPNext install before restoring your database ?

I don’t think the Frappe/ERPNext version can be found anywhere in the database, but I haven’t searched for it. Maybe you can start here.
A hint can be provided by the last patches recorded in the DB. But I’m afraid it will not be enough to know to which exact version you should migrate.

When you find it, install the exact same version of ERPNext/Frappe, do your migration and then upgrade the system.

Sorry, but I don’t see any workaround here, except correcting the schema manually which is out of the question…

Thanks for finding time to answer. I am sure it would take shape with time. Too many technologies in the mix these days. Now I am getting “Your system is being updated. Please refresh again after a few moments” after doing a host of stuff. Will do a reset and see where that goes again. Will keep you posted on my findings.

Regards,
Tiwiex