Sudden "nextcloud is currently down"

NextCloudPi has been running on my Odroid HC2 for four years almost issue free. Now suddenly it appears than an automatic update broke something and I get this message in the browser when trying to access the Nextcloud WebUI:

This version of Nextcloud requires at least PHP 8.0
You are currently running 7.4.33. Please update your PHP version.

NCP-WebGUI is running but I SSH’d onto the server anyway and got this:

Running nc-info
Gathering information...
NextcloudPi version  v1.52.2
NextcloudPi image    NextCloudPi_11-27-20
OS                   Armbian 21.05.6 Buster \l . 4.14.222-odroidxu4 (armv7l)
automount            yes
USB devices          sda 
datadir              /media/USBdrive/ncdata
data in SD           no
data filesystem      btrfs
data disk usage      2,0T/3,7T
rootfs usage         4,2G/58G
swapfile             /var/swap
dbdir                /media/USBdrive/ncdatabase
Nextcloud check      error
HTTPD service        up
PHP service          up
MariaDB service      up
Redis service        up
HPB service          down
Postfix service      up
Internet check       ok
Public IPv4          178.x.x.x
Public IPv6          not found
Port 80              closed
Port 443             closed
IP                   192.168.2.32
Gateway              192.168.2.1
Interface            enx001e063656f8
Certificates         none
NAT loopback         no
Uptime               13:14

When trying to manually update Nextcloud to any version (either latest or 25.0.6 following this suggestion) it aborts with: nextcloud is currently down. Updating (the already current) NCP has no effect on that issue.

I was willing to take the arduous but safe approach of a complete re-install. But unfortunately I can’t even get a fresh backup for that purpose. Similar message:

Running nc-backup
Installing template 'ncp-metrics.cfg.sh'...
Cannot load Zend OPcache - it was already loaded
Cannot load Zend OPcache - it was already loaded
check free space...
Cannot load Zend OPcache - it was already loaded
Cannot load Zend OPcache - it was already loaded
This version of Nextcloud requires at least PHP 8.0<br/>You are currently running 7.4.33. Please update your PHP version.Abort...
Cannot load Zend OPcache - it was already loaded
This version of Nextcloud requires at least PHP 8.0<br/>You are currently running 7.4.33. Please update your PHP version.Cannot load Zend OPcache - it was already loaded
This version of Nextcloud requires at least PHP 8.0<br/>You are currently running 7.4.33. Please update your PHP version.Done. Press any key...

With my limited skills I tried manually updating PHP. But after several futile attempts, that completely broke apache, I was happy to safely restore the described state.

Please, is there any way to at least obtain a fresh backup? I am not expecting an easy solution to the actual problem, but am open to any positive surprise :slight_smile:

The logs are of little help:

/var/log/apache2/error.log
[Wed Jul 26 22:40:18.764670 2023] [ssl:error] [pid 8828:tid 3069295200] AH02217: ssl_stapling_init_cert: can't retrieve issuer certificate! [subject: CN=localhost / issuer: CN=localhost / serial: xxx>
[Wed Jul 26 22:40:18.764703 2023] [ssl:error] [pid 8828:tid 3069295200] AH02604: Unable to configure certificate localhost:4443:0 for stapling
[Wed Jul 26 22:40:18.787830 2023] [ssl:error] [pid 8829:tid 3069295200] AH02217: ssl_stapling_init_cert: can't retrieve issuer certificate! [subject: CN=localhost / issuer: CN=localhost / serial: xxx>
[Wed Jul 26 22:40:18.787857 2023] [ssl:error] [pid 8829:tid 3069295200] AH02604: Unable to configure certificate localhost:4443:0 for stapling
[Wed Jul 26 22:40:18.793462 2023] [mpm_event:notice] [pid 8829:tid 3069295200] AH00489: Apache/2.4.56 (Debian) OpenSSL/1.1.1n configured -- resuming normal operations
[Wed Jul 26 22:40:18.793558 2023] [core:notice] [pid 8829:tid 3069295200] AH00094: Command line: '/usr/sbin/apache2'

log/apache2/nc-error.log
[Wed Jul 26 22:40:18.763197 2023] [ssl:error] [pid 8828:tid 3069295200] AH02217: ssl_stapling_init_cert: can't retrieve issuer certificate! [subject: CN=localhost / issuer: CN=localhost / serial: xxx>
[Wed Jul 26 22:40:18.763333 2023] [ssl:error] [pid 8828:tid 3069295200] AH02604: Unable to configure certificate localhost:443:0 for stapling
[Wed Jul 26 22:40:18.786631 2023] [ssl:error] [pid 8829:tid 3069295200] AH02217: ssl_stapling_init_cert: can't retrieve issuer certificate! [subject: CN=localhost / issuer: CN=localhost / serial: xxx>
[Wed Jul 26 22:40:18.786675 2023] [ssl:error] [pid 8829:tid 3069295200] AH02604: Unable to configure certificate localhost:443:0 for stapling

You have to do a backup before you start changing things. You can backup the current state…

Regarding updating your system or php, there are a few topics here. I didn’t go through them all to see which applies the best (and probably I missed a few on the way):

Thank you. But since i had no success randomly trying the solution to other peoples problems I took the arduous approach, installed a clean Armbian Bullseye, used the NPC-curl-Installer, manually recreated all user accounts and coppied an rescanned their files.

Now I am still trying to rescue my family calendar from the remains of the old database, to feed them into Calcardbackup, but that is a minor issue.

My mistake was, that I had tried too hard last winter to update my system using an image, that other users already had complained about. That went a bit dodgy and I was on borrowed time from then onwards. Since I can hardly expect the NCP maintainers to keep current images for all kinds of exotic SBCs of the last decade, I have learned my lesson: Stick to the Armbian guys for best HW support and current OS and then add NCP on top.

UPDATE: Also I learned to keep the automatic NCP- and NC-updates deactivated and apply those manually after a fresh backup and some research about common issues.