Sorry we will be back soon but access possible via debugger

Hello everyone,

I am using ERPNEXT on a Raspberry Pi server with two sites : QS.dev (port 80) and QS.prod (port 8081). I use version 9.1.4 for ERPNEXT and 9.1.6 for frappe.
I recently switched off the server by unplugging it, which is bad, I know.

After a week, I restarted the server and now I have the following situation:

  1. When I try to access QS.dev (http://192.168.1.43/#login), I get the error message “Sorry we will be back soon”
  2. When I try to access QS.prod (http://192.168.1.43:8081/#login), I get a 404 error
  3. When I run the command “bench --site QS.dev serve --port 8088” on the server, then I can access QS.dev (http://192.168.1.43:8088/#login), so it is not a problem of firewall or wrong address or changed IP in my opinion

I already tried several actions found on this forum, like bench update, bench site migrate, sudo supervisorctl restart all.

The file /var/log/nginx/error.log contains many lines like:
2017/10/13 07:50:51 [error] 25911#0: *94 upstream prematurely closed connection while reading response header from upstream, client: 192.168.1.46, server: qs.dev, request: "GET /favicon.ico HTTP/1.1", upstream: "http://127.0.0.1:8000/favicon.ico", host: "192.168.1.43", referrer: "http://192.168.1.43/"

I am now running out of ideas, could you please help me?

were you running any command while it went off? If you have backup, you can just restore that. Otherwise you can try deleting the last patch in the tabPatch Log and then bench migrate again (you should back up before going this route)

Thank you tundebabzy for your suggestion. I was not running any activity when I unplugged the server, but I guess some services didn’t like to be terminated without notice. I have restored my dev database but this didn’t change anything. I have removed the latest patches from the table, then I have run bench migrate followed by sudo supervisorctl restart all but the result is I have the same situation, I can’t access my site without issuing the command bench --site QS.dev serve --port 8088 on the server.

I guess the issue is with one of the configuration files that manages the connection between ERPNEXT and the browser. But there are several xxxx.conf files and they all look OK.

I have managed to fix my issue by running the following commands:

  • bench config dns_multitenant off as I was not sure, with all my tests, what was the status of the dns_multitenant configuration.

  • bench set-nginx-port QS.prod 8080 I think this is the key command I was looking for and it returned the list of my sites and the associated ports.

  • bench set-nginx-port QS.dev 8081 ditto for the development environment.

  • sudo supervisorctl restart all not sure it was needed but it doesn’t hurt anyway !

  • sudo service nginx reload in order to apply the new configuration of sites/ports.

With this, I am now able to access my development site and production site from my browser with a URL like http://192.168.1.43:8081/#login.

2 Likes