Update fails - maintainance mode

Hi there,

I have the feeling that what was described by @daringer :

If something is wrong with the upgrade, the Nextcloud instance could be left in a “bad state” …

happened to me. The web interface showed the dialog with the update option as the only choice, however the update failed for some reason and the nextbox remained in maintainance mode. Manually switching off the maintainence mode takes me back to the update window. I am kinda stuck in a loop here.

Any ideas what i could do? Thanks!


?

Hey @Julian,

I moved this into a new topic, please do not “invade” other topics with partly related topics referring them is clearly preferred to keep things cleaner …

So, you did try to switch off the maintenance mode using the NextBox button ? And you end up at the same spot, every time ?

I can more or less confirm this behaviour. I did the upgrade yesterday and it went fine (the reneval of the Lets encrypt certificate worked now - great!!). But today when I logged into the admin account and started the update of the apps, the Nextbox got stuck in maintenance mode (several hours by now).

Did you try exiting the Maintenance mode using the button (press it shortly once) as described here: LED Colors and Patterns — Nitrokey Documentation

Hi @daringer ,

sorry for posting to another topic and thanks for moving this issue into a new one.

Yes, I did try several times to switch off the maintainance mode which worked by shortly pushing the hardware button once, however, as you anticipated I got back to the update screen with the one update button only all the time. I repeated that several times and also restarted the nextbox by un-/re-plugging the power supply without any change.

1 Like

mmh, this is bad, the update mechanism from Nextcloud is not equipped with a fallback for these situations. Especially bad is the fact that this update has actually not introduced any Nextcloud specific update (the next one will do so), so I am really puzzled why this is happening for you guys. The only explanation I could think of is a Nextcloud app you might have installed that does something weird during the update.

If disabling Maintenance mode and restarting the process does not help, I am afraid you can only factory reset your NextBox. I would be very interested to get the logs after you did this, please send them to support@nitrokey.com so we have a chance to analyze them in order to maybe introduce mechanisms to avoid such cases in the future.

best

God, I just hit the very same eternal maintenance mode myself, after the last NC update (that went well), by asking for upgrading the internal Mail app.
I clicked "upgrade’, inserted my log/pass for that, got an error message, and since then : maintenance mode… (blue LED)
Hard reboot → during the boot the LED shifts from a kind of light blue to plain blue; ethernet is blinking sometimes. After various minutes, the .dedyn address is reachable again, showing maintenance mode ; the nextbox.local address is unreachable.

I can confirm it is also the internal mail app on my end that is trying to be updated

2 Likes

this seems unrelated (as you stated by yourself that the NC update went well), looks like the Mail app is somehow doing crazy things? Can anyone extract /srv/nextcloud/data/nextcloud.log there should visible what went wrong during the Mail update.

1 Like

@daringer I agree the trouble seems related to the action of upgrading mail, but it is real trouble… For me ssh-ing into the machine is already a daring adventure, I have to retrieve the recipe etc.
Other than that, nextbox.local doesn’t hang now here, it just switches me to the dedyn.io address (so, back to the maintenance screen)
Julian are you easier with ssh and the nextcloud.log?

Yes, this is intended as nextbox.local is a non-https connection you will automatically be forwarded to the https connection, but anyways both will show maintenance.

Was just going to ask you if you could share the SSH-ing recipe once you find it :slight_smile: .
I will try to find a SSH crash cours tonight…I just wonder is it possible to access the Nextbox via SSH if it has not been setup properly before?

No… You have to set it up in the system management app…
So I should try to do it myself, but I don’t have the time right now :frowning:
@daringer did you run that (in)famous mail update from this morning on a Nextbox, on your side?

Yes, just reproduced it, no need to get me logs, so far I can tell the issue is from the Mail app itself:

"message":{
 "Exception":"Exception",
 "Message":"Too few arguments to function OCA\\Mail\\Migration\\ProvisionAccounts::__construct(), 0 passed in /var/www/html/lib/private/Repair.php on line 133 and exactly 1 expected",
 "Code":0,
 "Trace":[{"file":"/var/www/html/lib/private/AppFramework/App.php","line":157,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\Settings\\Controller\\AppSettingsController"},"updateApp"]},

To me this looks like the 1.11.0 update for the Mail app does not use a Repair.php function call correctly :frowning:
Not really much we can do here at this moment, will try to see if I can find something related in their github…

2 Likes

WORKAROUND to fix this issue using ssh:

  • disable maintenance mode using a single-short-click on the nextbox button
  • login to your NextBox
  • change to root using sudo
  • run the following command:
docker exec -u 33 -it nextbox-compose_app_1 /var/www/html/occ app:disable mail

This disables the Mail app for now, but gives you back regular access to your Nextcloud…

We are looking into it, I hope this might be fixed on Mail-app-side, if not we are checking options for the users not having ssh activated… sorry for the inconvinience :flushed:

2 Likes

I have some good news at least. I just pressed the hardware button once shortly and directly after that the Nextbox was reachable and fully functional again. Perhaps the issue didn’t hit me that hard, because I have the Mail app deactivated anyway?

The only thing that is “not working” is that the logo, which I set up instead of the official nextcloud logo completely disappeared :grinning: Can live with that

1 Like

Perfect. Done this, works. I’m all the more happy that I’m leaving this place in two days, so I’d have been unable to ‘click’ on the NB button from far away to leave maintenance :grinning_face_with_smiling_eyes:
@daringer : extremely great support, as usual!

2 Likes

I totally agree!

1 Like

Hi, I am another user with this problem. So, I am looking forward to your solution. Kind regards, Basti

My understanding is that without SSH access the current only solution is a hardware reset leaving you with factory default settings and all data removed from your nextbox.
Worked for me, might not be your preferred solution approach though…