I have a OpenSUSE 15.0 server which running nginx with multiple IPs. I met two times power failure in this month because of data center 's power supply fire. When the power came back, I found the server auto reboot-itself but without nginx running.
systemctl enable nginx
doesn’t work. I don’t know why. I have to login to this server and manually start nginx and other app.
Can someone tell me a good way to make the nginx auto run again after power failure? Thank you.
Typically the UPS software you should have installed should support executing special commands including starting services.
There may be a specific problem that is preventing your nginx from starting…
Perhaps look at your bootlog for the specific session that suffered the power failure as well as the bootlog for the service start failirue
For the following command, you can specify any previous bootlog by changing the** n **which a number
Post the following for your machine so we can verify your configuration
systemctl status nginx
The following should display all system log entries for your nginx service for a specified bootlog (you’ll have to know how many times your system might have rebooted since the power failure). The following assumes that the current session is the second time you’ve rebooted your machine since your power failure
journalctl -b -2 -u nginx.service
Post your results of the above if you need help interpreting the entries.