Nextcloud Stuck in Maintenace Mode after failed Update

Hello Forum,

I am using Nexcloud 13.1-RELEASE-p9 installed as a plugin inside of TrueNAS Core 13.0-U6.4. I tried updating via the web-UI. (I now know that was a bad idea…)
First it Failed at the Backup Step. Than I restartet the server and tried it again.
I get the error: “pkg error: py39-fail2ban :,py39-certbot : Refusing to fetch artifact and run post_install.sh”
And now I’m stuck at maintenance mode.
I cannot ssh into it, so I use the TrueNAS shell of the jail.
I tried modifying the config.php and change the maintenance-mode value to false but that didn’t work.
I tried commands from different forums like
“sudo -u www-data php occ maintenance:mode --off”
But these didn’t work either.
It doesn’t even know sudo. I can change to root via su but even then it cannot “open the input file”

Can someone please explain to me what is wrong here and how I can turn of maintenance mode?

Thanks

You don’t have a snapshot from before you initiated the update via the GUI so you can roll back?

Fact is that updating from the GUI when it was installed as a plugin always causes things to break. I made the same mistake a couple of years ago. The issue with the failed backup happens to me too, every time i update via the GUI. The trick there is to just go back in your browser and start the update process once again and it will pick up where it stopped. The better solution is to update via SSH which doesn’t give any trouble at all.

Thanks for your message

Unfortunately not…

Ok i will remember that in the future.

That’s not possible because I’m locked out…
Everytime I want to access the web-UI if my server I’m greeted by a white page with “update in progress” written on it

That’s why I need to know how to disable maintenance Mode via console

Can you post your config.php blanking out sensitive info? Normally, you should be able to see at which step the updater is.

Here you go
I hope that helps

config.php
<?php
$CONFIG = array (
  'apps_paths' =>
  array (
    0 =>
    array (
      'path' => '/usr/local/www/nextcloud/apps',
      'url' => '/apps',
      'writable' => true,
    ),
    1 =>
    array (
      'path' => '/usr/local/www/nextcloud/apps-pkg',
      'url' => '/apps-pkg',
      'writable' => false,
    ),
  ),
  'logfile' => '/var/log/nextcloud/nextcloud.log',
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'one-click-instance' => true,
  'one-click-instance.user-limit' => 100,
  'memcache.distributed' => '\\OC\\Memcache\\Redis',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' =>
  array (
    'host' => 'localhost',
  ),
  'passwordsalt' => 'B9hsJgJp99WDSYXXXXXXXXXXXXXXXXX',
  'secret' => 'WmBDtjRRJsCZEGtOUgn4w+XXXXXXXXXXXXXXXXXXXXX',
  'trusted_domains' =>
  array (
    0 => 'localhost',
    1 => 'XXX.XXX.XXX.XXX',
    2 => 'my.domain.com',
  ),
  'datadirectory' => '/usr/local/www/nextcloud/data',
  'dbtype' => 'mysql',
  'version' => '29.0.0.19',
  'overwrite.cli.url' => 'http://localhost',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'USER',
  'dbpassword' => 'vW(y.331G@.#YXXXXXXXXXXXX',
  'installed' => true,
  'instanceid' => 'ociqexxhjz27',
  'mail_smtpmode' => 'smtp',
  'mail_sendmailmode' => 'smtp',
  'twofactor_enforced' => 'false',
  'twofactor_enforced_groups' =>
  array (
  ),
  'twofactor_enforced_excluded_groups' =>
  array (
  ),
  'theme' => '',
  'loglevel' => 2,
  'maintenance' => false,
  'mail_smtpsecure' => 'ssl',
  'mail_from_address' => 'name',
  'mail_domain' => 'domain.com',
  'mail_smtphost' => 'smtp',
  'mail_smtpport' => 'XXX',
  'mail_smtpauth' => 1,
  'mail_smtpname' => 'mail.com',
  'mail_smtppassword' => 'XXXXXXXXXXXXXXXXXXXXX',
  'updater.secret' => '$2y$10$7PA0gw9UZmzlCYjyXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX>
);