Nextcloud Maintenance Mode ON after Docker update


Go to solution Solved by ThElement12,

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 located. 

 

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

 

So I tried to upgrade all apps with:

php ./occ app:update --all

 

Still the same 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 leve

(oops, some of the snippet's end broke off)


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
Grammar, spelling and tidying up responses in code blocks.
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
  • 2 months later...

Mine gives:

3rdparty  COPYING  composer.json  config       core      custom_apps  dist        index.php  nextcloud-init-sync.lock  ocs           package-lock.json  public.php  resources   status.php  version.php
AUTHORS   apps     composer.lock  console.php  cron.php  data         index.html  lib        occ                       ocs-provider  package.json       remote.php  robots.txt  themes

 

So the OCC file is there...
Maybe "ls -l" to check if the right owner is appointed and if it is executable. 

Again, my result gives:

drwxr-xr-x 1 99 users     854 Apr 25 23:24 3rdparty
-rw-r--r-- 1 99 users   23796 Apr 25 23:24 AUTHORS
-rw-r--r-- 1 99 users   34520 Apr 25 23:24 COPYING
drwxr-xr-x 1 99 users    1218 Apr 25 23:24 apps
-rw-r--r-- 1 99 users    2079 Apr 25 23:24 composer.json
-rw-r--r-- 1 99 users    3140 Apr 25 23:24 composer.lock
drwxr-xr-x 1 99 users     398 Dec 25 10:00 config
-rw-r--r-- 1 99 users    4726 Apr 25 23:24 console.php
drwxr-xr-x 1 99 users     526 Apr 25 23:24 core
-rw-r--r-- 1 99 users    7900 Apr 25 23:24 cron.php
drwxr-xr-x 1 99 users      94 Apr 25 23:24 custom_apps
drwxrwx--- 1 99 users     342 Apr 20  2023 data
drwxr-xr-x 1 99 users   13938 Apr 25 23:24 dist
-rw-r--r-- 1 99 users     156 Apr 25 23:24 index.html
-rw-r--r-- 1 99 users    4564 Apr 25 23:24 index.php
drwxr-xr-x 1 99 users     126 Apr 25 23:24 lib
-rw-r--r-- 1 99 users       0 Apr 25 23:24 nextcloud-init-sync.lock
-rwxr-xr-x 1 99 users     283 Apr 25 23:24 occ
drwxr-xr-x 1 99 users      50 Apr 25 23:24 ocs
drwxr-xr-x 1 99 users      18 Apr 25 23:24 ocs-provider
-rw-r--r-- 1 99 users 1074100 Apr 25 23:24 package-lock.json
-rw-r--r-- 1 99 users    7032 Apr 25 23:24 package.json
-rw-r--r-- 1 99 users    3759 Apr 25 23:24 public.php
-rw-r--r-- 1 99 users    5597 Apr 25 23:24 remote.php
drwxr-xr-x 1 99 users     158 Apr 25 23:24 resources
-rw-r--r-- 1 99 users      26 Apr 25 23:24 robots.txt
-rw-r--r-- 1 99 users    2523 Apr 25 23:24 status.php
drwxr-xr-x 1 99 users      26 Feb  4  2023 themes
-rw-r--r-- 1 99 users     384 Apr 25 23:24 version.php

Compare this to what you have, or post it here. 

 

Otherwise, this might help:
https://help.nextcloud.com/t/could-not-open-input-file-occ/12604/3

Edited by Ymetro
Prettying it up and added a possible solution.
Link to comment

ls print this:

 

app  command  data      dev          etc   init  lsiopy  migrations  opt      proc  run   srv  tmp  var
bin  config   defaults  docker-mods  home  lib   media   mnt         package  root  sbin  sys  usr

 

Now when i type ls -l:

 

root@53abd88c5e33:/# ls -l
total 32
drwxr-xr-x   1 abc  abc     36 Apr 24 07:37 app
drwxr-xr-x   1 root root   930 Apr 17 06:49 bin
drwxr-xr-x   1 root root  5224 Apr 17 06:49 command
drwxrwx---   1 abc  abc    102 Feb 16 18:20 config
drwxrwx---   1 abc  abc    102 Feb 16 18:20 data
drwxr-xr-x   1 abc  abc     16 Apr 24 07:37 defaults
drwxr-xr-x   5 root root   340 Apr 25 14:18 dev
-rwxr--r--   1 root root 23629 Dec 31  1969 docker-mods
drwxr-xr-x   1 root root  1178 Apr 25 14:18 etc
drwxr-xr-x   1 root root     0 Apr 17 06:49 home
-rwxr-xr-x   1 root root  1012 Nov 20 09:09 init
drwxr-xr-x   1 root root  1042 Apr 24 07:40 lib
drwxr-xr-x   1 root root     0 Apr 17 06:49 lsiopy
drwxr-xr-x   1 root root    28 Apr 17 06:49 media
drwxr-xr-x   1 root root    92 Apr 24 07:37 migrations
drwxr-xr-x   1 root root     0 Apr 17 06:49 mnt
drwxr-xr-x   1 root root     0 Apr 17 06:49 opt
drwxr-xr-x   1 root root    30 Apr 17 06:49 package
dr-xr-xr-x 356 root root     0 Apr 25 14:18 proc
drwx------   1 root root    18 Apr 18 13:49 root
drwxr-xr-x   1 root root   224 Apr 25 14:19 run
drwxr-xr-x   1 root root   992 Apr 17 06:49 sbin
drwxr-xr-x   1 root root     0 Apr 17 06:49 srv
dr-xr-xr-x  13 root root     0 Apr 25 14:18 sys
drwxrwxrwt   1 root root   496 Apr 25 14:15 tmp
drwxr-xr-x   1 root root    68 Apr 24 07:37 usr
drwxr-xr-x   1 root root   102 Apr 24 07:40 var

 

Link to comment
42 minutes ago, ThElement12 said:

I FIXED IT!
It's strange because I had tried it before, but I just had to go to the unRAID console and type this:
 

docker exec -it nextcloud occ maintenance:mode --off

 

 

That indeed should work as when I enter the container with bash, with command: 

docker exec -it Nextcloud bash

it opens the prompt in /var/www/html I mentioned in the OP. 

So all seems well. 

I marked your comment as a solution, because it is quick. My story, on the other hand, was more intended for the ones who want to dive in a little deeper, and look around for better insight. 

Edited by Ymetro
Link to comment

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.