With Nextcloud 14.0.2 and now 15.0.0 my system is set to automatically execute updates.
Because of that, every couple of days it switches to maintenance mode and gets stuck there.
So every couple of days I need to log into the shell and disable it with the occ command or by editing the config.php file.
This doesnt fix the root cause though. It isnreally annoying to be honest.
So how can I fix the system in order to automatically go back to maintenance mode off or to finally stop maintenance mode forever?
But I am not sure if that is what is related to your issue. How do you do the automatically executed updates? Normally there isnāt an update every couple of days, so worst case it should only leave you in maintenance mode after a real update (once a month), that is bad enough.
Iām using NextcloudPi with nc-autoupdate and nc-autoupdate-nextcloud so that NextCloudPi and NextCloud specific updates are getting executed. So itās probably the NextcloudPi Updates that happen more often.
Executing sudo -u www-data php updater/updater.phar results in:
Nextcloud Updater - version: v14.0.2RC2-7-g57268cb
Current version is 15.0.0
No update available.
Nothing to do.
Executing sudo -u www-data php occ upgrade results in:
Nextcloud is already latest version
@nachoparker: I did that, but didnāt find anything suspicious. Any advice about what to look for?
@Schmu: That caught my eye as well. And Iām asking the same question. Was not able to find any information in order to get the updater itself to a newer version.
So I checked where the updater is coming from and it is actually delivered with an update via the updater or via the nextcloud download site. But not with the zip archive from github.
And extract the updater folder. Copy that folder (āupdaterā) into your nextcloud directory and adapt ownership and permissions (adapt commands to your environment):
cd NEXTCLOUD-DIRECTORY
chown -R WEBSERVER-USER:WEBSERVER-GROUP updater
find . -type f -print0 | xargs -0 chmod 0640
find . -type d -print0 | xargs -0 chmod 0750
HI Schmu, seems to be a dead end.
Done the whole procedure with the result of getting the version number v14.0.2RC2-7-g57268cb again. Searching the updater.phar file in the https://download.nextcloud.com/server/releases/nextcloud-15.0.0.zip file shows that this seems to be the current version of that package.
Sorry, that lead into the wrong direction.
When the check is performed every couple of days, there is probably a cronjob configured. Could you check and post the output of: crontab -l -u www-data
When you executed these commands, was NC also sent into maintenance mode and stayed in maintenance?
Strange, I expected some updater script configured as cron job. Could you check for root and your normal user as well, if there are cron jobs leading to the regular check?
Iāve checked for the root and pi user, same result.
What I acutally do is using the nc (or ncp for NextcloudPi) commands:
I have been updating through nc-update but why isnāt Nextcloud on the latest version?
nc-update only updates NextCloudPi related stuff. In order to upgrade the Nextcloud instance itself you use nc-update-nextcloud. Or better still : enable nc-autoupdate and nc-autoupdate-nextcloud so your instance > will always be automatically update to the latest stable version of NCP and NC. It is not advisable (for NCP > users) to use NCās own update facility at present.
Sorryā¦ need to correct my last reply:
User www-data has the mentioned cronjob. root and pi have none at all.
Well I donāt have ncp running, so I donāt know much about it. However, even with nc-autoupdate-nextcloud I expected a cron job triggering it. Not sure where the automatism can be found instead.
@nachoparker can you please help here? Why is NC stuck in maintenance every time NCP checks for NC updates (when the autoupdater is activated)? It seems strange to me that it actually switches to maintenance mode, just to check for a new version and discover that there is no new version. I canāt figure it out and canāt find any lines in the code (on github master where maintenance would ever be set), sorry. I couldnāt find an issue on github for that and I guess it is not a general bug, otherwise others would have reported that already.
Thanks for your assistance. Oh and Happy new year! Keep up the good work!
Can only see that webdav logins are failing
Your ncp.log I could not open with plain text editor
(xed has not been able to detect the character encoding. Please check that you are not trying to open a binary file.)
Best use pastbin.com or similar and post link here.
Has anybody else reported same issue anywhere?
There are many people complaining about getting stuck in the maintenance mode. Anyhow it seems always to be a one time situation. They all eem to be happy to drop the occ maintenance mode off command.
Just yesterday around 4p.m. MEZ my NextcloudPi went into maintenance mode again.
Thanks for posting logs.
Yes there was an ncp-update last night, during which maintenance mode would be enabled, your log shows latest update was okay and maintenance mode disabled.
Finished code integrity check
Update successful
Turned off maintenance mode
You updated using
nc-update-nextcloud ]
Current Nextcloud version 14.0.4.2
Available Nextcloud version 15.0.0
NCP āproductionā users should really wait for NCP Devs to push update through nc-autoupdate-nextcloud. You can expect issues if you jump ahead. But yours seems to be fine now, or are you still having issues?