Nextcloud : can not update nor exit maintenance mode Topic is solved

Having issues with your DietPi installation or found a bug? Post it here.
Post Reply
The_freeman
Posts: 8
Joined: Wed Jun 09, 2021 6:16 pm

Nextcloud : can not update nor exit maintenance mode

Post by The_freeman »

Hi all,

Lately I updated Dietpi to v7.8.2 . Nextcloud goes to maintenance mode for upgrading

Image

After pressing start update it gives error

Image

Then it goes to maintenance mode . I tried this command

Code: Select all

occ upgrade
I it's done without error but nothing changes . I tried this command :

Code: Select all

root@DietPi:/# ncc maintenance:mode --off
Nextcloud or one of the apps require upgrade - only a limited number of commands are available
You may use your browser or the occ upgrade command to do the upgrade
Maintenance mode disabled
Same thing nothing happen . Can anyone help me please ?
User avatar
Joulinar
Posts: 6441
Joined: Sat Nov 16, 2019 12:49 am

Re: Nextcloud : can not update nor exit maintenance mode

Post by Joulinar »

use following to upgrade NextCloud on command line

Code: Select all

sudo -u www-data php /var/www/nextcloud/updater/updater.phar
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
The_freeman
Posts: 8
Joined: Wed Jun 09, 2021 6:16 pm

Re: Nextcloud : can not update nor exit maintenance mode

Post by The_freeman »

Thank you Joulinar for replaying 😃

Code: Select all

root@DietPi:/# sudo -u www-data php /var/www/nextcloud/updater/updater.phar
Nextcloud Updater - version: v20.0.0beta4-11-g68fa0d4

Current version is 21.0.7.

Update to Nextcloud 21.0.7 available. (channel: "stable")
Following file will be downloaded automatically: https://download.nextcloud.com/server/releases/nextcloud-21.0.7.zip
Open changelog ↗

Steps that will be executed:
[✔] Check for expected files
[✔] Check for write permissions
[✔] Create backup
[✔] Downloading
[✔] Verify integrity
[✔] Extracting
[✔] Enable maintenance mode
[✔] Replace entry points
[✔] Delete old files
[✔] Move new files in place
[✔] Done

Continue update? [y/N] y

Info: Pressing Ctrl-C will finish the currently running step and then stops the updater.

[✔] Check for expected files
[✔] Check for write permissions
[✔] Create backup
[✔] Downloading
[✔] Verify integrity
[✔] Extracting
[✔] Enable maintenance mode
[✔] Replace entry points
[✔] Delete old files
[✔] Move new files in place
[✔] Done

Update of code successful.

Should the "occ upgrade" command be executed? [Y/n] y
Nextcloud or one of the apps require upgrade - only a limited number of commands are available
You may use your browser or the occ upgrade command to do the upgrade
2021-11-26T13:50:05+00:00 Setting log level to debug
2021-11-26T13:50:05+00:00 Turned on maintenance mode
2021-11-26T13:50:05+00:00 Repair step: Repair MySQL collation
2021-11-26T13:50:05+00:00 Repair info: All tables already have the correct collation -> nothing to do
2021-11-26T13:50:05+00:00 Repair step: Repair SQLite autoincrement
2021-11-26T13:50:05+00:00 Repair step: Copy data from accounts table when migrating from ownCloud
2021-11-26T13:50:05+00:00 Repair step: Drop account terms table when migrating from ownCloud
2021-11-26T13:50:05+00:00 Updating database schema
2021-11-26T13:50:05+00:00 Updated database
2021-11-26T13:50:05+00:00 Updating <duplicatefinder> ...
2021-11-26T13:50:05+00:00 Repair step: duplicatefinder: Repair FileInfo objects
2021-11-26T13:50:05+00:00 Repair info: Recalculating Path Hashes
2021-11-26T13:50:05+00:00 duplicatefinder: Repair FileInfo objects
2021-11-26T13:50:05+00:00 
2021-11-26T13:50:05+00:00  Starting ...
    0/0 [>-]   0%2021-11-26T13:50:05+00:00 
2021-11-26T13:50:05+00:00 Repair info: Clearing duplicated records
PHP Fatal error:  Allowed memory size of 536870912 bytes exhausted (tried to allocate 20480 bytes) in /var/www/nextcloud/apps/duplicatefinder/lib/Db/EEntity.php on line 44
PHP Fatal error:  Allowed memory size of 536870912 bytes exhausted (tried to allocate 20480 bytes) in /var/www/nextcloud/lib/private/Log/ErrorHandler.php on line 66

Keep maintenance mode active? [y/N] n
Nextcloud or one of the apps require upgrade - only a limited number of commands are available
You may use your browser or the occ upgrade command to do the upgrade
Maintenance mode disabled

Maintenance mode is disabled
but still same problem :(
User avatar
Joulinar
Posts: 6441
Joined: Sat Nov 16, 2019 12:49 am

Re: Nextcloud : can not update nor exit maintenance mode

Post by Joulinar »

are you able to access web site?
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
The_freeman
Posts: 8
Joined: Wed Jun 09, 2021 6:16 pm

Re: Nextcloud : can not update nor exit maintenance mode

Post by The_freeman »

Joulinar wrote: Fri Nov 26, 2021 3:03 pm are you able to access web site?
Yes but it shows the same page in the first post . I can not access my files .
User avatar
Joulinar
Posts: 6441
Joined: Sat Nov 16, 2019 12:49 am

Re: Nextcloud : can not update nor exit maintenance mode

Post by Joulinar »

hm not sure what the issue could be. Strange is that your system is recognising an update but it is the same version as installed

Code: Select all

Current version is 21.0.7.

Update to Nextcloud 21.0.7
@MichaIng
maybe you would have an idea
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
The_freeman
Posts: 8
Joined: Wed Jun 09, 2021 6:16 pm

Re: Nextcloud : can not update nor exit maintenance mode

Post by The_freeman »

Thank you Joulinar . I was able to solve the problem :D

I just went to " /var/www/nextcloud/apps" and delete folder " duplicatefinder " , restart the services and update . And It works !

Thank you gain :)
User avatar
Joulinar
Posts: 6441
Joined: Sat Nov 16, 2019 12:49 am

Re: Nextcloud : can not update nor exit maintenance mode

Post by Joulinar »

ah not sure why I have overlooked it before. Indeed an issue with duplicatefinder as it tried to allocate more memory then allowed.

Code: Select all

2021-11-26T13:50:05+00:00 duplicatefinder: Repair FileInfo objects
2021-11-26T13:50:05+00:00 
2021-11-26T13:50:05+00:00  Starting ...
    0/0 [>-]   0%2021-11-26T13:50:05+00:00 
2021-11-26T13:50:05+00:00 Repair info: Clearing duplicated records
PHP Fatal error:  Allowed memory size of 536870912 bytes exhausted (tried to allocate 20480 bytes) in /var/www/nextcloud/apps/duplicatefinder/lib/Db/EEntity.php on line 44
PHP Fatal error:  Allowed memory size of 536870912 bytes exhausted (tried to allocate 20480 bytes) in /var/www/nextcloud/lib/private/Log/ErrorHandler.php on line 66
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Post Reply