Service Unavailable Error 503

hi therei need support for the issue that iā€™m facing after update my ncp to last release.
The issues comes when i try to access ncp through webclient, iā€™m receiving error Service Unavailable, Error 503.

Here setup and logs:

version: root@rock64:~# ncp-update
Downloading updates
Performing updates
Installing nc-restore
Installing nc-backup
NextCloudPi updated to version v0.59.0

here ncp-report

https://pastebin.com/Wi5q4wg7

any help please!!

how did this happen? you seem to be missing config.php. What are the exact steps that lead to this situation?

i just updated NCP from web-client and it was sucessfully. the issues has come after power off in my homeā€¦

I have checked into NCP that seem there is a file called config.php into this path:

root@rock64:/var/www/nextcloud/config# ls -la
total 64
drwxr-xā€” 2 www-data www-data 4096 Sep 12 04:05 .
drwxr-xā€” 14 www-data www-data 4096 Sep 12 04:05 ā€¦
-rw-r----- 1 www-data www-data 1446 Sep 12 04:05 config.php
-rw-rā€“r-- 1 www-data www-data 48040 Sep 4 20:02 config.sample.php
-rw-rā€“r-- 1 www-data www-data 264 Sep 4 20:02 .htaccess

and listing file config.php;

root@rock64:/var/www/nextcloud/config# cat config.php
127.0.0.1 localhost rock64
192.168.1.207 mydomain-ncp.domain.org
::1 localhost rock64 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

thanks @nachoparker for your support!

@nachoparker any ideaā€¦?

how did you poweroff? did you just disconnect the raspi?

@nachoparker , cutt-off of electricity due maintenance works of electric supplier company, nothing special from my sideā€¦ :-/

here message of website ncp;

The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.

I have tried to execute:

sudo -u www-data php /var/www/nextcloud/occ maintenance:mode --off

but seem it doesnā€™t works:

takezo@rock64:~$ sudo -u www-data php /var/www/nextcloud/occ maintenance:mode --off
[sudo] password for takezo:
127.0.0.1 localhost rock64
192.168.1.207 domainncp.dnsdomain.org
::1 localhost rock64 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
Nextcloud is not installed - only a limited number of commands are available

[Symfony\Component\Console\Exception\CommandNotFoundException]
Command ā€œmaintenance:modeā€ is not defined.
Did you mean this?
maintenance:install

Powercutā€¦ that might corrupt your SD card. Try to run fsck or similar

@nachoparker seem that storage and sdcard are ok.
iā€™m intrigued about error message :

The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.

could i reinstall NCP without lost info: data files users and setup done ā€¦?

if you have a backup, no problem

backupā€¦ backupā€¦ nopeā€¦!
lets go to the first point, is there anything that i can do to find where and why im getting this errorā€¦? (where i can find the problem or missing fileā€¦)

thanks @nachoparker for your support?!

Your ncp-report output is no longer availableā€¦ I donā€™t remember your case

hi @nachoparker here you have ncp-report output:

https://pastebin.com/68UbNWWC

Your config.php is empty perhaps? in any case, if you have no backups just backup your data and database manually, then run nc-init (or reinstall), then restore your manual backup.

@nachoparker I have executed ncp-backup command and seem that is not working. here you have output:

Launching nc-backup
/usr/local/bin/ncp-backup: line 13: warning: command substitution: ignored null byte in input

[Symfony\Component\Console\Exception\CommandNotFoundException]
There are no commands defined in the ā€œconfig:systemā€ namespace.

Error reading data directory. Is NextCloud running and configured?
Done. Press any keyā€¦

any clue?

Your config.php is likely empty. You need to backup manually

hi @nachoparker ok, done!
trying to execute new installation of NCP from scrash Iā€™m now getting following errors:

root@rock64:/media/DataMedia/cloud# curl -sSL https://raw.githubusercontent.com/nextcloud/nextcloudpi/master/install.sh | bash

WARNING: existing mysqld configuration will be changed <<<
Getting build codeā€¦
Hit:1 http://security.debian.org stretch/updates InRelease
Hit:3 http://apt.armbian.com stretch InRelease
Ign:2 Index of /debian stretch InRelease
Hit:4 Index of /debian stretch-updates InRelease
Hit:5 Index of /debian stretch-backports InRelease
Hit:6 Index of /debian stretch Release
Reading package listsā€¦ Done
Reading package listsā€¦ Done
Building dependency tree
Reading state informationā€¦ Done
ca-certificates is already the newest version (20161130+nmu1+deb9u1).
sudo is already the newest version (1.8.19p1-2.1).
wget is already the newest version (1.18-5+deb9u2).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up php7.0-fpm (7.0.30-0+deb9u1) ā€¦
Job for php7.0-fpm.service failed because the control process exited with error code.
See ā€œsystemctl status php7.0-fpm.serviceā€ and ā€œjournalctl -xeā€ for details.
invoke-rc.d: initscript php7.0-fpm, action ā€œrestartā€ failed.
Ć¢ā€”Ā php7.0-fpm.service - The PHP 7.0 FastCGI Process Manager
Loaded: loaded (/lib/systemd/system/php7.0-fpm.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Thu 2018-09-27 11:41:10 CEST; 25ms ago
Docs: man:php-fpm7.0(8)
Process: 4019 ExecStart=/usr/sbin/php-fpm7.0 --nodaemonize --fpm-config /etc/php/7.0/fpm/php-fpm.conf (code=exited, status=78)
Main PID: 4019 (code=exited, status=78)

Sep 27 11:41:09 rock64 systemd[1]: Starting The PHP 7.0 FastCGI Process ManĆ¢ā‚¬Ā¦rā€¦
Sep 27 11:41:09 rock64 php-fpm7.0[4019]: Cannot load Zend OPcache - it was aĆ¢ā‚¬Ā¦ded
Sep 27 11:41:10 rock64 php-fpm7.0[4019]: [27-Sep-2018 11:41:10] ERROR: [/etcĆ¢ā‚¬Ā¦TRY
Sep 27 11:41:10 rock64 php-fpm7.0[4019]: [27-Sep-2018 11:41:10] ERROR: UnablĆ¢ā‚¬Ā¦e 1
Sep 27 11:41:10 rock64 php-fpm7.0[4019]: [27-Sep-2018 11:41:10] ERROR: faileĆ¢ā‚¬Ā¦nfā€™
Sep 27 11:41:10 rock64 php-fpm7.0[4019]: [27-Sep-2018 11:41:10] ERROR: FPM iĆ¢ā‚¬Ā¦led
Sep 27 11:41:10 rock64 systemd[1]: php7.0-fpm.service: Main process exited,Ć¢ā‚¬Ā¦/n/a
Sep 27 11:41:10 rock64 systemd[1]: Failed to start The PHP 7.0 FastCGI ProcĆ¢ā‚¬Ā¦ger.
Sep 27 11:41:10 rock64 systemd[1]: php7.0-fpm.service: Unit entered failed Ć¢ā‚¬Ā¦ate.
Sep 27 11:41:10 rock64 systemd[1]: php7.0-fpm.service: Failed with result ā€˜Ć¢ā‚¬Ā¦deā€™.
Hint: Some lines were ellipsized, use -l to show in full.
dpkg: error processing package php7.0-fpm (ā€“configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
php7.0-fpm
needrestart is being skipped since dpkg has failed
E: Sub-process /usr/bin/dpkg returned an error code (1)

awesome, save your backup in your computer, and flash the latest SD card image.

Then, restore your backup

:disappointed_relieved: