TrueNAS Scale: Nextcloud 26 app upgrade remains in maintenance mode

artstar

Dabbler
Joined
Jan 10, 2022
Messages
36
Hi all,

I ran the upgrade in my TrueNAS Scale apps dashboard (official Nextcloud, not Truecharts) and after the upgrade, it was stuck in maintenance mode, according to the Nextcloud web UI.

Just thought I'd check to see if it was only me who experienced this (and had to manually disable maintenance mode via the container's shell)? Once I was able to manually correct this, the web UI presented me with Nextcloud's internal upgrade process (just click the Upgrade button) and we were eventually back to normal.
 

TYFLOOZY

Dabbler
Joined
Mar 25, 2023
Messages
30
I ran into this issue as well, but have not figured out how to get it to work yet. I'm still learning Shell and SSH stuff so trying to figure out how to get where I need to go to enter the code to disable maintenance mode. Did you run in the internal shell within the app or go to Command Prompt and enter in something? Looking for step by step instructions from the beginning please:).
 

Attachments

  • Screenshot 2023-04-08 140343.png
    Screenshot 2023-04-08 140343.png
    666.1 KB · Views: 226
  • Screenshot 2023-04-08 140625.png
    Screenshot 2023-04-08 140625.png
    622.7 KB · Views: 231

artstar

Dabbler
Joined
Jan 10, 2022
Messages
36
From the Apps menu, I ran a Shell session from within the NextCloud application.
1681034642270.png


I selected the Nextcloud container, not the postgres database.
1681034704559.png


Then I typed the following commands in sequence:
su su -m www-data -c 'php /var/www/html/occ maintenance:mode --off'

Logged back into Nextcloud's web UI and was then greeted with the button for continuing with the upgrade. That got me back up and running again.
 

TYFLOOZY

Dabbler
Joined
Mar 25, 2023
Messages
30
Thank you! That worked. Man that took forever.

Just curious, I saw where I can update Nexcloud within Truenas Scale (where it has the upgrade option and roll back) and also within Nextcloud as well, what is the prefeed way to update Nextcloud? I tried doing it within Nextcloud the first time and didn't seem to work or I didn't do it right.
 

artstar

Dabbler
Joined
Jan 10, 2022
Messages
36
Just wait for the upgrades to roll in from TrueNAS (or TrueCharts, for those who use them instead).
 

taltamir

Dabbler
Joined
Aug 2, 2022
Messages
28
Then I typed the following commands in sequence:
thank you very much. that solved the problem
I selected the Nextcloud container, not the postgres database.
I had to first perform a docker image prune so I could find the correct one. as there were too many of them and their names were very unclear. So I couldn't tell which was for the newest version.
 

indivision

Guru
Joined
Jan 4, 2013
Messages
806
From the Apps menu, I ran a Shell session from within the NextCloud application.
View attachment 65523

I selected the Nextcloud container, not the postgres database.
View attachment 65524

Then I typed the following commands in sequence:
su su -m www-data -c 'php /var/www/html/occ maintenance:mode --off'

Logged back into Nextcloud's web UI and was then greeted with the button for continuing with the upgrade. That got me back up and running again.
When I enter su it asks for a password.

But, I'm not sure which password it is asking for? For the server? For my nextcloud install? Some generic, unset Nextcloud password?

Any ideas?

Thank you.
 

artstar

Dabbler
Joined
Jan 10, 2022
Messages
36
When I enter su it asks for a password.

But, I'm not sure which password it is asking for? For the server? For my nextcloud install? Some generic, unset Nextcloud password?

Any ideas?

Thank you.

Are you sure you're entering the shell of the application itself and not initiating an ssh session into your actual TrueNAS Scale server?

You need to go to Apps -> Nextcloud -> Shell (per my screenshots). I just did it again, successfully with no password request, on my Nextcloud container (I had to delete and reinstall because somehow the upgrades tend to break the entire container from time to time).
 

indivision

Guru
Joined
Jan 4, 2013
Messages
806
Are you sure you're entering the shell of the application itself and not initiating an ssh session into your actual TrueNAS Scale server?

Thank you for following up!

Yes. I'm certain that I've used the shell option like your images. Though, it looks a little different for me because I'm now on Cobia. Maybe Cobia has tighter permissions for su user? Or, I must have some different permissions setup than you. It asks me for a password and I've tried all of them that I can imagine and they always say "Not Authorized".

You need to go to Apps -> Nextcloud -> Shell (per my screenshots). I just did it again, successfully with no password request, on my Nextcloud container (I had to delete and reinstall because somehow the upgrades tend to break the entire container from time to time).

Yeah. Nextcloud is not an easy one to maintain. I've done pretty well with it for a while now. Mainly by setting heavyscript to ignore it and manually updating it myself.

I did actually get out of maintenance mode, even with the su issue. I just edited the config.php. Which I apparently do have permission to change...

But, I still would like to get su working because I believe that is needed to make occ commands. And I need to run one to complete the update to version 28.
 

taltamir

Dabbler
Joined
Aug 2, 2022
Messages
28
Yes. I'm certain that I've used the shell option like your images.
If you are using the shell within the nextcloud install, then it is asking for the nextcloud password for the su command.

also you could have just tried the passwords for both the server and nextcloud and see which of those two (if any) works
 

indivision

Guru
Joined
Jan 4, 2013
Messages
806
If you are using the shell within the nextcloud install, then it is asking for the nextcloud password for the su command.
That doesn't appear to be the case. I tried the admin password and it didn't work.

also you could have just tried the passwords for both the server and nextcloud and see which of those two (if any) works
I did. Neither worked.

That's why I asked here.
 
Top