After my raspberry pi received a power loss, it displayed php service down in ncp-info and 503 service unavailable in the browser. This error was displayed when trying to access the web panel and nextcloud itself. I tried to reinstall php7.3, however it didn’t fix my problem.
Any help would be greatly appreciated.
Without logs we can’t help you. Start with:
Could you tell me where I can find those logs?
I looked in /var/log/apache2/ and was greeted with multiple apache.log logs, most of which ended in .gz, I also had multiple nc-error logs and nc-access logs, both of which also mostly ended in .gz. I also had an ncp.log file in /var/log/.
I couldn’t work out where the dmesg logs are and I’m not entirely sure which logs you want, but I’ve attached the ones I think you want.
Nextcloud (I was unable to copy the full files as they are both over 1.5k lines long, so I’ve pasted small chunks, but this is basically what the whole file consists of, just repeated over and over again):
dmesg is a command run as root or with sudo, to show the kernel log. It will show filesystem errors, which could occur after power loss.
from NCP’s docs faq
Where are the logs?
Running sudo ncp-report basically gives you everything that could be relevant.
Nextcloud’s own logs are in (datadir)/nextcloud.log - you’ll probably find relevant log entries there, if Nextcloud itself is still reachable.
Apache’s logs are in /var/log/apache/…
And then there are your general server/system logs, found within various files in /var/log/… - especially relevant are /var/log/syslog and /var/log/auth.log
Ok, thank you, here are the logs and I get this error all the time:
Here is dmesg:
Here is ncp-report:
Here is php7.3-fpm, which I believe is the root of the problem:
And here are the syslogs, auth logs and apache2 logs:
You are correctly assuming that PHP-FPM is the cause.
It won’t start because it can’t find the PID file. Check that path, is there another file? If yes, change your Apache config to match that, and see what happens.