Nextcloud Upgrade to 29.07 fails

I have searched the forum for similar issues

on

This category is for issues regarding specific apps, NOT general issues with YunoHost.

on

This form is written in English :uk: but feel free to write in French :fr: if you’re more comfortable!

on

What type of hardware are you using

VPS bought online

What YunoHost version are you running

11.2.30.2 (stable)

What app is this about

Nextcloud

Describe your issue

  • tried to upgrade Nextcloud
  • error message
  • Nextcloud does not respond anymore
  • tried upgrade several times - stays the same error
  • Nexcloud service do not respond anymore (seems to be down)
  • diagnostics run does not complain anything (only Vaultwarden since there is a known issue)
  • restore from backup only tells me, cannot be done, since NC is already installed

anything I can do next to nail it down?

Share relevant logs or error messages

https://paste.yunohost.org/raw/uvakokuvul

1 Like

Looks like an upsteam issue, can you manually update polls app prior to upgrading Nextcloud?

Sort of happened to me too. Don’t have all details yet


thx for this hint. Did never make my hands dirty on NC.
Found a way to list all apps, but:

Looks, like I need to update php? Or where is this message coming from?
If so - whats the right way to do it on such a yunohst server?

root@mv:/var/www/nextcloud# sudo -u www-data php occ app:list
This version of Nextcloud requires at least PHP 8.0<br/>You are currently running 7.4.33. Please update your PHP version.

and if I try it as described here

root@mv:~# sudo -u nextcloud php8.2 --define apc.enable_cli=1 /var/www/nextcloud/occ app:list
An unhandled exception has been thrown:
OCP\HintException: [0]: Memcache OC\Memcache\APCu not available for local cache (Is the matching PHP module installed and enabled?)

You should enter the nextcloud shell like this
sudo yunohost app shell nextcloud
Then run your occ commands
php occ app:list
When finished exit the nextcloud shell
exit

2 Likes

thx!
Did try this before.
Now did double check.
same error:

nextcloud@mv:~$ php occ app:list
An unhandled exception has been thrown:
OCP\HintException: [0]: Memcache OC\Memcache\APCu not available for local cache (Is the matching PHP module installed and enabled?)

OK, you have a bug. To fix it run this as root or with sudo

yunohost app setting nextcloud phpflags -v "--define apc.enable_cli=1"

Then retry running occ commands inside the nextcloud shell

don’t know exactly, what I’m doing (with the commands, you mentioned gg).
But thx a lot anyway!!

Well - the phpflags command did not give any output - therefore I think it worked.

But, afterwards back inside the shell, running php occ app:list: still same error.

at least inside the shell php verison seems to be the correct one ;))

nextcloud@mv:~$ php occ app:list
An unhandled exception has been thrown:
OCP\HintException: [0]: Memcache OC\Memcache\APCu not available for local cache (Is the matching PHP module installed and enabled?)
nextcloud@mv:~$ php --version
PHP 8.2.24 (cli) (built: Sep 27 2024 04:03:56) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.2.24, Copyright (c) Zend Technologies
    with Zend OPcache v8.2.24, Copyright (c), by Zend Technologies
You have mail in /var/mail/nextcloud

is there kind of safe or maintenance mode without all the apps - to be able to login into NC web GUI and deactivate or remove apps?

Oh, what version of nextcloud you have?

You must be admin in nextcloud : click on your user icon in nextcloud, there you will see apps

I know this menu.
Since my nextcloud is not running and I’m not able to fire the occ commands I was thinking if ther maybe is a safe mode to start NC without the apps (apprarently I need to deactivate or even remove the polls app). But don’t know how to achieve this :see_no_evil:

I haven’t read the whole thread, so I must have missed that part.
So, we restart

Then
php --define apc.enable_cli=1 occ app:list
And may be instead of php we use php8.2

hmmmm.

Entered the shell an then tried php as well as php8.2

nextcloud@mv:~$ php --define apc.enable_cli=1 occ app:list
An unhandled exception has been thrown:
OCP\HintException: [0]: Memcache OC\Memcache\APCu not available for local cache (Is the matching PHP module installed and enabled?)
nextcloud@mv:~$ php8.2 --define apc.enable_cli=1 occ app:list
An unhandled exception has been thrown:
OCP\HintException: [0]: Memcache OC\Memcache\APCu not available for local cache (Is the matching PHP module installed and enabled?)

is there an equivalent way? manually delete a dircetory or similar?

I looked in the nextcloud forum and it seems not possible. There is a workaround by removing apcu from the config file.
In the nextcloud shell open config/config.php and replace ‘memcache.local’ => ‘\OC\Memcache\APCu’,
With ‘memcache.local’ => ‘none’,
Save the file and try running occ commands again, when done, revert that change

I highly appreciate your help!
Unfortuenately changing config/config.php as mentioned does not change anything


nextcloud@mv:~$ php --define apc.enable_cli=1 occ app:list
An unhandled exception has been thrown:
OCP\HintException: [0]: Memcache none not available for local cache (Is the matching PHP module installed and enabled?)
nextcloud@mv:~$ php8.2 --define apc.enable_cli=1 occ app:list
An unhandled exception has been thrown:
OCP\HintException: [0]: Memcache none not available for local cache (Is the matching PHP module installed and enabled?)

Only when delete the line the output changes “dramatically”. But that’s a complete different issue, I guess!?

nextcloud@mv:~$ php8.2 --define apc.enable_cli=1 occ app:list
PHP module zip not installed.
Please ask your server administrator to install the module.

An unhandled exception has been thrown:
Exception: Environment not properly prepared. in /var/www/nextcloud/lib/private/Console/Application.php:167
Stack trace:
#0 /var/www/nextcloud/console.php(101): OC\Console\Application->loadCommands()
#1 /var/www/nextcloud/occ(11): require_once('...')
#2 {main}

I’m sorry, I was tired while answering.
After changing the memcache to none, the occ command will be : php occ app:list

By the way: this is the message shown by the yunohost application GUI page:

https://domain.tld/yunohost/admin/#/apps/nextcloud/operations

An error prevents the configuration panel from being displayed:

Could not read return from hook /etc/yunohost/apps/nextcloud/scripts/config. Error: Corrupted YAML read from /tmp/tmp38bjy399/stdreturn (reason: mapping values are not allowed here<br> in "<unicode string>", line 9, column 60:<br> ... s been thrown: OCP\HintException: [0]: Memcache OC\Memcache\APCu ... <br> ^). Raw content: fpm_footprint:<br> high<br>fpm_free_footprint:<br> 0<br>fpm_usage: 'medium'<br>maintenance_mode:<br> 1<br>system_addressbook_exposed:<br> An unhandled exception has been thrown: OCP\HintException: [0]: Memcache OC\Memcache\APCu not available for local cache (Is the matching PHP module installed and enabled?)<br>

Please report this error to the YunoHost team to get it fixed!

Can I just uninstall and re-install NC using the gui? without looooosing data?