Nextcloud Upgrade to 24.0.7 breaking tables

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:

example

Or for longer, use three backticks above and below the code snippet:

longer
example
here

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version (eg, 20.0.5): 24.0.7
Operating system and version (eg, Ubuntu 20.04): Ubuntu Server 22.04 LTS
Apache or nginx version (eg, Apache 2.4.25): Apache 2.4.52
PHP version (eg, 7.4): 8.1.2

The issue you are facing:

Hello,

Ever since updating to 24.0.7 via the update tool I am getting the following errors:

  • The database is missing some indexes. Due to the fact that adding indexes on big tables could take some time they were not added automatically. By running “occ db:add-missing-indices” those missing indexes could be added manually while the instance keeps running. Once the indexes are added queries to those tables are usually much faster.
    • Missing index “mounts_class_index” in table “oc_mounts”.
  • Some columns in the database are missing a conversion to big int. Due to the fact that changing column types on big tables could take some time they were not changed automatically. By running “occ db:convert-filecache-bigint” those pending changes could be applied manually. This operation needs to be made while the instance is offline. For further details read the documentation page about this :arrow_upper_right:.
    • file_metadata.id

I have tried to fix this following the documentation, but I am getting the following error for both:

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?)

I need some help as this is slowing down my instance and I need it fixed.

Is this the first time you’ve seen this error? (Y):

Steps to replicate it:

  1. Tried again with running the occ commands and it is still not working

The output of your Nextcloud log in Admin > Logging:

PASTE HERE
Error	PHP	Error: fseek(): Stream does not support seeking at /var/www/cloud.experiencedmg.net/apps/files_external/3rdparty/icewind/streams/src/Wrapper.php#46		2022-11-08T12:46:47-0500
Error	PHP	Error: fseek(): Stream does not support seeking at /var/www/cloud.experiencedmg.net/apps/files_external/3rdparty/icewind/streams/src/Wrapper.php#46		2022-11-08T12:46:47-0500
Error	PHP	Error: fseek(): Stream does not support seeking at /var/www/cloud.experiencedmg.net/apps/files_external/3rdparty/icewind/streams/src/Wrapper.php#46		2022-11-08T12:46:43-0500
Error	PHP	Error: fseek(): Stream does not support seeking at /var/www/cloud.experiencedmg.net/apps/files_external/3rdparty/icewind/streams/src/Wrapper.php#46		2022-11-08T12:46:39-0500
Error	PHP	Error: fseek(): Stream does not support seeking at /var/www/cloud.experiencedmg.net/apps/files_external/3rdparty/icewind/streams/src/Wrapper.php#46		2022-11-08T12:45:59-0500
Error	PHP	Error: fseek(): Stream does not support seeking at /var/www/cloud.experiencedmg.net/apps/files_external/3rdparty/icewind/streams/src/Wrapper.php#46		2022-11-08T12:45:57-0500
Error	PHP	Error: fseek(): Stream does not support seeking at /var/www/cloud.experiencedmg.net/apps/files_external/3rdparty/icewind/streams/src/Wrapper.php#46		2022-11-08T12:45:56-0500
Error	PHP	Error: fseek(): Stream does not support seeking at /var/www/cloud.experiencedmg.net/apps/files_external/3rdparty/icewind/streams/src/Wrapper.php#46		2022-11-08T12:45:54-0500
Error	PHP	Error: fseek(): Stream does not support seeking at /var/www/cloud.experiencedmg.net/apps/files_external/3rdparty/icewind/streams/src/Wrapper.php#46		2022-11-08T12:45:54-0500
Error	PHP	Error: chmod(): Operation not permitted at /var/www/cloud.experiencedmg.net/lib/private/Config.php#271		2022-11-08T12:07:10-0500
Info	updater	\OC\Updater::resetLogLevel: Reset log level to Warning(2)		2022-11-08T12:07:10-0500
Info	updater	\OC\Updater::maintenanceDisabled: Turned off maintenance mode		2022-11-08T12:07:10-0500
Error	PHP	Error: chmod(): Operation not permitted at /var/www/cloud.experiencedmg.net/lib/private/Config.php#271		2022-11-08T12:07:10-0500
Info	updater	\OC\Updater::updateEnd: Update successful		2022-11-08T12:07:10-0500
Error	PHP	Error: chmod(): Operation not permitted at /var/www/cloud.experiencedmg.net/lib/private/Config.php#271		2022-11-08T12:07:10-0500
Info	updater	\OC\Updater::finishedCheckCodeIntegrity: Finished code integrity check		2022-11-08T12:07:10-0500
Info	updater	\OC\Updater::startCheckCodeIntegrity: Starting code integrity check...		2022-11-08T12:07:03-0500
Info	updater	\OC\Repair::step: Repair step: Add token cleanup job		2022-11-08T12:07:03-0500
Info	no app in context	Deprecated event type for \OC\Repair::step: Symfony\Component\EventDispatcher\GenericEvent is used		2022-11-08T12:07:03-0500
Info	updater	\OC\Repair::step: Repair step: Add background job to set the lookup server share state for users		2022-11-08T12:07:03-0500
Info	no app in context	Deprecated event type for \OC\Repair::step: Symfony\Component\EventDispatcher\GenericEvent is used		2022-11-08T12:07:03-0500
Info	updater	\OC\Repair::step: Repair step: Repair DAV shares		2022-11-08T12:07:03-0500
Info	no app in context	Deprecated event type for \OC\Repair::step: Symfony\Component\EventDispatcher\GenericEvent is used		2022-11-08T12:07:03-0500
Info	updater	\OC\Repair::step: Repair step: Queue a one-time job to check for user uploaded certificates		2022-11-08T12:07:03-0500
Info	no app in context	Deprecated event type for \OC\Repair::step: Symfony\Component\EventDispatcher\GenericEvent is used		2022-11-08T12:07:03-0500
Info	updater	\OC\Repair::step: Repair step: Add job to cleanup the bruteforce entries		2022-11-08T12:07:03-0500
Info	no app in context	Deprecated event type for \OC\Repair::step: Symfony\Component\EventDispatcher\GenericEvent is used		2022-11-08T12:07:03-0500
Info	updater	\OC\Repair::step: Repair step: Remove old dashboard app config data		2022-11-08T12:07:03-0500
Info	no app in context	Deprecated event type for \OC\Repair::step: Symfony\Component\EventDispatcher\GenericEvent is used		2022-11-08T12:07:03-0500
Info	updater	\OC\Repair::step: Repair step: Check encryption key format		2022-11-08T12:07:03-0500
Info	no app in context	Deprecated event type for \OC\Repair::step: Symfony\Component\EventDispatcher\GenericEvent is used		2022-11-08T12:07:03-0500
Info	updater	\OC\Repair::step: Repair step: Keep legacy encryption enabled		2022-11-08T12:07:03-0500
Info	no app in context	Deprecated event type for \OC\Repair::step: Symfony\Component\EventDispatcher\GenericEvent is used		2022-11-08T12:07:03-0500
Info	updater	\OC\Repair::step: Repair step: Reset generated avatar flag		2022-11-08T12:07:03-0500
Info	no app in context	Deprecated event type for \OC\Repair::step: Symfony\Component\EventDispatcher\GenericEvent is used		2022-11-08T12:07:03-0500
Info	updater	\OC\Repair::step: Repair step: Clear access cache of projects		2022-11-08T12:07:03-0500
Info	no app in context	Deprecated event type for \OC\Repair::step: Symfony\Component\EventDispatcher\GenericEvent is used		2022-11-08T12:07:03-0500
Info	updater	\OC\Repair::info: Repair info: No need to remove link shares.		2022-11-08T12:07:03-0500
Info	no app in context	Deprecated event type for \OC\Repair::info: Symfony\Component\EventDispatcher\GenericEvent is used		2022-11-08T12:07:03-0500
Info	updater	\OC\Repair::step: Repair step: Remove potentially over exposing share links		2022-11-08T12:07:03-0500
Info	no app in context	Deprecated event type for \OC\Repair::step: Symfony\Component\EventDispatcher\GenericEvent is used		2022-11-08T12:07:03-0500
Info	updater	\OC\Repair::step: Repair step: Add background job to cleanup login flow v2 tokens		2022-11-08T12:07:03-0500
Info	no app in context	Deprecated event type for \OC\Repair::step: Symfony\Component\EventDispatcher\GenericEvent is used		2022-11-08T12:07:03-0500
Info	updater	\OC\Repair::step: Repair step: Cleanup invalid photocache files for carddav		2022-11-08T12:07:03-0500
Info	no app in context	Deprecated event type for \OC\Repair::step: Symfony\Component\EventDispatcher\GenericEvent is used		2022-11-08T12:07:03-0500
Info	updater	\OC\Repair::step: Repair step: Queue a one-time job to cleanup old backups of the updater		2022-11-08T12:07:03-0500
Info	no app in context	Deprecated event type for \OC\Repair::step: Symfony\Component\EventDispatcher\GenericEvent is used		2022-11-08T12:07:03-0500
Info	updater	\OC\Repair::step: Repair step: Add preview background cleanup job		2022-11-08T12:07:03-0500
Info	no app in context	Deprecated event type for \OC\Repair::step: Symfony\Component\EventDispatcher\GenericEvent is used		2022-11-08T12:07:03-0500
Info	updater	\OC\Repair::step: Repair step: Clear every generated avatar on major updates		2022-11-08T12:07:03-0500


The output of your config.php file in `/path/to/nextcloud` (make sure you remove any identifiable information!):

PASTE HERE


The output of your Apache/nginx/system log in `/var/log/____`:

PASTE HERE
[Tue Nov 08 17:04:59.852077 2022] [access_compat:error] [pid 3620176] [client 192.168.1.177:60681] AH01797: client denied by server configuration: /var/www/cloud.exp>

[Tue Nov 08 17:13:53.960887 2022] [access_compat:error] [pid 3866331] [client 192.168.1.177:61021] AH01797: client denied by server configuration: /var/www/cloud.exp>

[Tue Nov 08 17:46:48.227852 2022] [php:notice] [pid 3620172] [client 192.168.1.177:62589] richdocumentscode (proxy.php) error exit, PID: 3620172, Message: The param >

[Tue Nov 08 17:46:49.476429 2022] [php:notice] [pid 3882958] [client 192.168.1.177:62588] richdocumentscode (proxy.php) error exit, PID: 3882958, Message: The param >

[Tue Nov 08 17:46:50.719552 2022] [php:notice] [pid 3882958] [client 192.168.1.177:62588] richdocumentscode (proxy.php) error exit, PID: 3882958, Message: The param >

[Tue Nov 08 17:46:51.963153 2022] [php:notice] [pid 3620172] [client 192.168.1.177:62589] richdocumentscode (proxy.php) error exit, PID: 3620172, Message: The param >

[Tue Nov 08 17:47:05.757322 2022] [php:notice] [pid 3870639] [client 192.168.1.177:62590] richdocumentscode (proxy.php) error exit, PID: 3870639, Message: No content>

[Tue Nov 08 17:48:59.066964 2022] [access_compat:error] [pid 3620174] [client 192.168.1.177:62718] AH01797: client denied by server configuration: /var/www/cloud.exp>

[Tue Nov 08 17:49:22.013187 2022] [access_compat:error] [pid 3620174] [client 192.168.1.177:62749] AH01797: client denied by server configuration: /var/www/cloud.exp>

[Tue Nov 08 18:01:50.467523 2022] [access_compat:error] [pid 3901805] [client 192.168.1.177:63393] AH01797: client denied by server configuration: /var/www/cloud.exp

PASTE HERE


Output errors in nextcloud.log in /var/www/ or as admin user in top right menu, filtering for errors. Use a pastebin service if necessary.

PASTE HERE
```Unable to find the nextcloud.log file.

check this post see if it helps

1 Like

Hi @Vincent_Stans

I followed that thread and it got rid of the error was getting running the occ commands for the following errors:

  • he database is missing some indexes. Due to the fact that adding indexes on big tables could take some time they were not added automatically. By running “occ db:add-missing-indices” those missing indexes could be added manually while the instance keeps running. Once the indexes are added queries to those tables are usually much faster.
    • Missing index “mounts_class_index” in table “oc_mounts”.
  • Some columns in the database are missing a conversion to big int. Due to the fact that changing column types on big tables could take some time they were not changed automatically. By running “occ db:convert-filecache-bigint” those pending changes could be applied manually. This operation needs to be made while the instance is offline. For further details read the documentation page about this :arrow_upper_right:.
    • file_metadata.id

But now I am getting the following errors when trying to run the OCC commands:

Console has to be executed with the user that owns the file config/config.php

Current user id: 33

Owner id of config.php: 0

Try adding ‘sudo -u #0’ to the beginning of the command (without the single quotes)

If running with ‘docker exec’ try adding the option ‘-u 0’ to the docker command (without the single quotes)

If I try one of the two options listed, I get either the help file for sudo or I get the sudo: error initializing audit plugin sudoers_audit. I cannot find an answer to these. Do you know?

are you running nextcloud in docker ?

usually you use ‘sudo -u www-data’ to run as user www-data (uid:33) and just sudo to run as root (uid:0)

I didn’t know you were using docker.

if your not using docker your file permissions are not set correctly.

Hi @Vincent_Stans I am not running on docker, but your suggestion worked and both errors are gone. Thanks!!

thats great but your config.php should be owned by www-data check the documentation on how to setup permissions correctly if you want.

https://docs.nextcloud.com/server/latest/admin_manual/configuration_files/external_storage/local.html

this will also prevent further issues in the future.

your always welcome to ask.

1 Like