Another "Sorry! We will be back soon" Issue

Hi All,

I pointed a subdomain at my site’s ip address but discovered the ip was still being displayed in the browser. I then tried renaming the site from site1.local to the actual subdomain but then I encountered the “Sorry! We will be back soon” page that refused to go away. I’ve tried a lot of suggestions from the forum but none seems to have worked so far

I’ve run bench setup nginx several times followed by sudo service nginx restart but no change yet. I also tried sudo service nginx reload instead of restart but it hasn’t worked either. I’ve checked supervisorctl status and everything seems to be running

Any suggestions/assistance would be most welcome

Thanks!

Hi,

do you have multitenant on?

bench config dns_multitenant on

What happens, if the domain your browser point to is “yourdomain.com” and you run

bench new-site yourdomain.com
bench bench setup nginx
service nginx reload
bench restart

And then try again?

Do you get errors when running

bench migrate
1 Like

Hi @lasalesi

Thanks for you response

Yes, I have also tried running the command again just to be sure

I have already renamed my site folder to my domain name. Are you saying I should attempt creating a new site with the same name?

I’ve tried these but the site still shows the page “Sorry! We will be back soon”

No errors when I run bench migrate (and passing the site parameter)

Hi @wale,

can you try bench migrate without parameter? This should recap the registered sites…

What is in your (frappe-bench)/config/nginx.conf?

server {
        listen 80;
        server_name
                site1.local
                ;

Below site1.local, yourdomain.com should appear…

In case you only use one site, have you tried running

bench use yourdomain.com

And, can you check in /var/log/nginx/access.log if the request host matches the host in the config and this matches the (frappe-bench)/sites/(host)?

Hi @lasalesi

It gives the following error:
" Migrating site1.local
site1.local does not exist"

Content of nginx.conf:

upstream frappe-bench-frappe {
    server 127.0.0.1:8000 fail_timeout=0;
}

upstream frappe-bench-socketio-server {
    server 127.0.0.1:9000 fail_timeout=0;
}



# setup maps

map $host $site_name_fbygbcv {
        mydomain.com mydomain.com;
        default $host;

}

# server blocks

server {
        listen 80;
        server_name
                mydomain.com
                mydomain.com
                ;

        root /home/frappe/frappe-bench/sites;



        location /assets {
                try_files $uri =404;
        }
 location ~ ^/protected/(.*) {
                internal;
                try_files /$site_name_fbygbcv/$1 =404;
        }

        location /socket.io {
                proxy_http_version 1.1;
                proxy_set_header Upgrade $http_upgrade;
                proxy_set_header Connection "upgrade";
                proxy_set_header X-Frappe-Site-Name $site_name_fbygbcv;
                proxy_set_header Origin $scheme://$http_host;
                proxy_set_header Host $host;

                proxy_pass http://frappe-bench-socketio-server;
        }

mydomain.com is appearing twice… not sure why

I use only one site on this server and I tried running the command as suggested but no difference yet

Please explain. Where do I find the request host in the access.log file? Where do I find host in the config?
Also, I’m not sure what you’re referring to as (host) in the sites folder

Thanks

I guess the two instances of mydomain.com originate from renaming site1.local and also creating a second site. Maybe revert site1.local back to original state. If you only use one site, multitenancy should not be required. Only running site1.local should cover all incoming requests.

You mentioned initially a subdomain, so your host is subdomain.yourdomain.com, which resolves to the IP of the ERPNext system? In this case, also the site should be subdomain.yourdomain.com (it must match the full host name).

The host name will be in the log file the requested resource, e.g.

192.168.0.67 - - [07/Dec/2017:15:10:02 +0100] "POST / HTTP/1.1" 200 555 "http://testerp/desk" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:57.0) Gecko/20100101 Firefox/57.0" "-"

In the above instance, testerp is the local host name. It resolves to the ERPNext server, and there, either multitenancy is off and all sites are replyied to with the site1.local (or default site), or the site that is called testerp. In case your hostname is http://erpnext.mydomain.com, the site needs to be called erpnext.mydomain.com

Hi @lasalesi

I renamed the site from site1.local to subdomain.mydomain.com

I didn’t create any new site so that couldn’t have been the cause of duplication

Using your example above, I checked the access.log file and found the following:

105.112.43.77 - - [07/Dec/2017:07:34:26 +0100] "GET / HTTP/1.1" 200 2552 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64)

105.112.43.77 - - [07/Dec/2017:07:34:26 +0100] "GET /website_theme.css HTTP/1.1" 200 0 "http://100.200.300.40/" "Mozilla/5.0 (Windows NT 10.0; Win64; x$

In some of the lines, the host name shows just a dash (-) while in others, it shows the i.p. address. None shows the actual subdomain!

Any ideas?

Thanks

Hi @lasalesi

Your last post gave me some insight into the issue. I went back to the domain account and found it had somehow been reset! I had to update the A records again and after that, it was just a matter of waiting for it to propagate and clearing the cache

Thanks a lot for all your help

Cheers!