Updating nextcloudpi from 1.51.0 to 1.51.2 appears to succeed but back to 1.51.0 upon reboot

The ncp web interface told me I could update to 1.51.2 from 1.51.0 so I did, but upon reboot it said 1.51.0 is installed, and the update is available. Same thing from the command line if I ssh in. I’m not finding any sort of ncp install logs in the web interface so I’m not sure how to troubleshoot.

Possibly related, and the reason I logged in to the ncp interface to begin with, is the ncp and nc web interfaces have been dying a while after rebooting and I was hoping an update would solve it since I don’t see anything particularly wrong in the ncp interface. Since I’m not finding problems there, I’m not sure how to troubleshoot hence wanting to see if updating would help.

Maybe you can run ncp-report and share output via textfile or pastebin. So Devs can have look.
Can also look at latest ncp change log to see if of any changes effect your setup.

My instance (Proxmox VM) is on ncp v 1.51.2 without any issues, also after reboot.

Here it is: <--! Paste this in GitHub report --><details><summary>NextcloudPi diagnost - Pastebin.com

Also, fwiw I ran it while in the “bad state” and got the following output. I then rebooted and got the valid output linked above. But I figured I ought to include this too because perhaps it’s helpful in understanding the state ncp gets into a while after each reboot.

/usr/local/bin/ncp-report: 1: ric: not found
/usr/local/bin/ncp-report: 3: smartmon_power_cycle_count_threshold{disk=/dev/sda,type=sat,smart_id=12}: not found
/usr/local/bin/ncp-report: 6: smartmon_power_cycle_count_value{disk=/dev/sda,type=sat,smart_id=12}: not found
/usr/local/bin/ncp-report: 9: smartmon_power_cycle_count_worst{disk=/dev/sda,type=sat,smart_id=12}: not found
/usr/local/bin/ncp-report: 12: smartmon_power_on_hours_raw_value{disk=/dev/sda,type=sat,smart_id=9}: not found
/usr/local/bin/ncp-report: 15: smartmon_power_on_hours_threshold{disk=/dev/sda,type=sat,smart_id=9}: not found
/usr/local/bin/ncp-report: 18: smartmon_power_on_hours_value{disk=/dev/sda,type=sat,smart_id=9}: not found
/usr/local/bin/ncp-report: 21: smartmon_power_on_hours_worst{disk=/dev/sda,type=sat,smart_id=9}: not found
/usr/local/bin/ncp-report: 24: smartmon_raw_read_error_rate_raw_value{disk=/dev/sda,type=sat,smart_id=1}: not found
/usr/local/bin/ncp-report: 27: smartmon_raw_read_error_rate_threshold{disk=/dev/sda,type=sat,smart_id=1}: not found
/usr/local/bin/ncp-report: 30: Syntax error: Unterminated quoted string

Any help on this?

Would backing up my current instance of nextcloud, installing a fresh nextcloudpi instance, and restoring the backup be a viable way to solve a problem like this? Or would a problem like this carry over to the new instance? This feels like a nextcloudpi problem rather than a nextcloud problem since the nextcloudpi http server goes down too, so I’m thinking that could work. I’m a bit nervous about troubles post-reinstall with it not being 100% seamless, but I found GitHub - nextcloud/backup: Backup now. Restore later. and the procedure there sounds like it should be seamless.

Can you share content of /var/log/ncp.log, after running ncp-update ?
Your instance seems fine afaik from your ncp-report.
I am assuming this is its state after reboot.

Hard to say if a problem carries over, without the problem being identified.
It might be just be a connection time-out, while the smart-mon output suggests one of your drives might be failing and needing replacement.
You can check its health with smartctl
I would likely look at the syslog for input/output errors.

After reboot, a lot of stuff seems to reset. For instance if I install the nextcloud backup app, it’s gone after reboot. And of course as mentioned here, nextcloudpi reverts back to 1.51.0. And as I look at ncp.log, I see the same behavior. Here’s the log after ncp-update: [ nc-limits ] (Mon 1 May 16:54:06 BST 2023)Using 2984110080 for PHP max memor - Pastebin.com. After reboot though, all of this is gone and the new log is here: [ nc-limits ] (Mon 1 May 17:02:08 BST 2023)Using 2984110080 for PHP max memor - Pastebin.com. Smartctl doesn’t seem to work with sd cards because it can’t identify the type. But for syslog, here’s what’s in /var/log/messages: May 1 17:01:27 nextcloudpi kernel: [ 31.710263] cam-dummy-reg: disablingMay - Pastebin.com. I have an external drive for data, but of course if there’s a failing drive, that wouldn’t cause these sorts of problems. I have been wondering if the SD card might be starting to fail. I could order a new card and try restoring an ncp backup to see if that helps.

I think the card has failed. I couldn’t create an image file from the card. Working on a new install. Doesn’t seem to like my backup, probably because it came after the problems started, so I’m starting fresh unfortunately, other than that my data drive is external.