Nextcloud Maintenance Mode ON after Docker update


Recommended Posts

After the upgrades/updates mentioned in the OP title, Nextcloud was stuck in Maintenance Mode. Letting it do it's thing for a whole night did not resolve this problem.
I need to mention that I did not try a reboot of the server, because of not wanting to interrupt the services to my network. 

 

My server run only the official Docker images of Nextcloud, the OnlyOfficeDocumentServer and MariaDB. 

 

I also wanted to help others and myself in the future, because of earlier frustrations with Nextcloud Docker updates messing up on my Unraid server, while not being able to make heads or tails of it then and now, while it fails its main instant-use service convenience at home. 

 

I entered the Nextcloud Docker with:

docker exec -it Nextcloud /bin/bash

 

and it gave the prompt: 
"I have no name!@9ece3e0eb99f:/var/www/html$"

Note that we are in the /var/www/html map where the occ program is. 

 

I tried to turn Maintenance Mode off with: 

php ./occ maintenance mode --off

 

and it gave:

"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"
 

Tried te same line again and it added the line below the message mentioned above:
"Maintenance mode disabled"

 

So I tried to upgrade all apps with:

php ./occ app:update --all

 

Still the same "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" response. 

 

Then I used:

php ./occ upgrade

 

Then it mentioned:
"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
Setting log level to debug
Turned on maintenance mode
Updating database schema
Updated database
Updating <recognize> ...
Repair error: RecursiveDirectoryIterator::__construct(/var/www/html/custom_apps/recognize/node_modules/ffmpeg-static/): Failed to open directory: No such file or directory
Updated <recognize> to 4.0.1
Starting code integrity check...
Finished code integrity check
Update successful
Turned off maintenance mode
Resetting log level"

Checked the Maintenance Mode with:
 

php ./occ maintenance:mode

 

And it mentioned: "Maintenance mode is currently disabled" 

 

So, I want to help others that hit the "Maintenance Mode" wall after an update/upgrade and I am eventually not sure which of the above did fix this, but it now runs again. 

It seems something did go wrong with the Recognize app:
"Repair error: RecursiveDirectoryIterator::__construct(/var/www/html/custom_apps/recognize/node_modules/ffmpeg-static/): Failed to open"
This map does not appear to exist when listing the files and maps within the bash CLI. Curious. EDIT: Update: Made an issue request @ its github page. 

I disabled Docker from within Settings and re-enabled it again just to make sure maintenance mode remains off after a reboot and all is well. 
And it is. Again without compromising any other services to the network, like network shares. 

Edited by Ymetro
"-all" needed an extra "-" in front of it
Link to comment

I might should have mentioned a "Docker image upgrade of Nextcloud" and an "Nextcloud app update" in the OP title for better perception...
But it seems one cannot edit an OP title, AFAIK. 

Also I am also not quite sure if this topic is in its right forum folder. 

 

"8 months later...":

Hey: I seemed to edit the title! Nice.

Edited by Ymetro
Can't reply to my own post - so -edit- it is.
Link to comment
  • 8 months later...

😅Ah, now I see why you needed this:

I also needed my own info for the latest Docker update to version: 28.0.2.5, so let me show the steps: 

- Just click on the Nextcloud icon on the Docker page

- Click "Console" in that menu

- first, before you use a command, learn what it can do and what options it has with: 

php ./occ --help

- then use: 

php ./occ status

to check what is going on.
 

Probably, the "maintenance:" and "needsDbUpgrade:" lines have the status "true"

 

- than do:

php ./occ update --all

and some package is being mentioned for upgrading - it was the Deck app in my case 
- and after that do a: 

php ./occ upgrade

 just like an "apt update" and "apt upgrade" in a Linux CLI

- after that, turn off the maintenance mode with:

php ./occ maintenance:mode --off

The prompt will mention that Maintenance mode is disabled. 

- you can check the status again with:

php ./occ status

All should be fine, and the web interface should work like advertised. 

Edited by Ymetro
small spelling correction
Link to comment
  • Ymetro changed the title to Nextcloud Maintenance Mode ON after Docker update

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.