Problem with overdue updates 22.2.10 to 23.0.12

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): 22.2.10
Operating system and version (eg, Ubuntu 20.04): raspbian 10 (buster)
Apache or nginx version (eg, Apache 2.4.25): Server version: Apache/2.4.38 (Raspbian) Server built: 2022-06-20T19:03:00
PHP version (eg, 7.4): PHP 7.3.31-1~deb10u1 (cli) (built: Oct 24 2021 15:18:08) ( NTS )

The issue you are facing:
There is a problem with files that are not passing integrity check. Log here: https://pastebin.com/d32fBEtY
Also the system is terribly slow at times - logging in can take minutes, but let’s ignore it for now.
I think the clue what’s wrong lies in that behaviour:

  1. When I run the integrity check with foobar (or anything) it gets added to the list and stays there. I assume that’s not normal? Trying to rescan produces "Access forbidden. CSRF check failed" page. There is a background task problem as well - it might be related. I tried to configure all 3 options - but there is always error message coming back that the background tasks were not executed for hours/months/years (!)
root@raspberrypi:/var/www/html/nextcloud# sudo -u www-data php ./occ integrity:check-app foobar
  - EXCEPTION:
    - class: Exception
    - message: App not found

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

Steps to replicate it:

Sorry, unknown. I did overdue upgrades from 19 to 20 to 21 to 22

The output of your Nextcloud log in Admin > Logging:

The log at error level is massive (sounds bad...). Last few lines:
Error	index	Exception: The requested uri(/.well-known/nodeinfo) cannot be processed by the script '/nextcloud/index.php')	
2022-12-27T16:21:12+0000
Error	public	Exception: The requested uri(/.well-known/webfinger) cannot be processed by the script '/nextcloud/public.php')	
2022-12-27T16:21:12+0000
Error	index	Exception: The requested uri(/.well-known/nodeinfo) cannot be processed by the script '/nextcloud/index.php')	
2022-12-27T16:19:22+0000
Error	public	Exception: The requested uri(/.well-known/webfinger) cannot be processed by the script '/nextcloud/public.php')	
2022-12-27T16:19:22+0000

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

<?php
$CONFIG = array (
  'instanceid' => 'XXX',
  'passwordsalt' => 'XXX',
  'secret' => 'XXX',
  'trusted_domains' => 
  array (
    0 => 'XXX',
  ),
  'datadirectory' => '/var/www/html/nextcloud/data',
  'dbtype' => 'sqlite3',
  'version' => '22.2.10.2',
  'overwrite.cli.url' => 'https://XXX.eu',
  'installed' => true,
  'maintenance' => false,
  'theme' => '',
  'loglevel' => 0,
  'app_install_overwrite' => 
  array (
    0 => 'occweb',
  ),
  'mail_domain' => 'XXX.eu',
  'mail_from_address' => 'XXX',
  'mail_smtpmode' => 'smtp',
  'mail_sendmailmode' => 'smtp',
  'updater.secret' => 'XXX',
  'data-fingerprint' => 'XXX',
);

The output of your Apache log in /var/log/apache2/error.log:
Interesting that might be another reason for my problems

[Tue Dec 27 00:00:03.708923 2022] [mpm_prefork:notice] [pid 5275] AH00163: Apache/2.4.38 (Raspbian) OpenSSL/1.1.1n configured -- resuming normal operations
[Tue Dec 27 00:00:03.876274 2022] [core:notice] [pid 5275] AH00094: Command line: '/usr/sbin/apache2'
[Tue Dec 27 04:46:42.340357 2022] [php7:error] [pid 25620] [client [MASKED]] script '/var/www/html/remote.php' not found or unable to stat
[Tue Dec 27 14:43:39.435726 2022] [php7:error] [pid 25619] [client [MASKED]] script '/var/www/html/remote.php' not found or unable to stat
[Tue Dec 27 15:21:02.873883 2022] [access_compat:error] [pid 25622] [client [MASKED]] AH01797: client denied by server configuration: /var/www/html/nextcloud/data/.ocdata
[Tue Dec 27 15:21:33.066622 2022] [access_compat:error] [pid 461] [client [MASKED]] AH01797: client denied by server configuration: /var/www/html/nextcloud/data/.ocdata
[Tue Dec 27 15:47:05.283478 2022] [access_compat:error] [pid 29074] [client [MASKED]] AH01797: client denied by server configuration: /var/www/html/nextcloud/data/.ocdata
[Tue Dec 27 15:54:38.852592 2022] [access_compat:error] [pid 817] [client [MASKED]] AH01797: client denied by server configuration: /var/www/html/nextcloud/data/.ocdata
[Tue Dec 27 15:55:08.894383 2022] [access_compat:error] [pid 860] [client [MASKED]] AH01797: client denied by server configuration: /var/www/html/nextcloud/data/.ocdata
[Tue Dec 27 15:55:20.930692 2022] [access_compat:error] [pid 860] [client [MASKED]] AH01797: client denied by server configuration: /var/www/html/nextcloud/data/.ocdata
[Tue Dec 27 15:58:29.697885 2022] [access_compat:error] [pid 817] [client [MASKED]] AH01797: client denied by server configuration: /var/www/html/nextcloud/data/.ocdata
[Tue Dec 27 16:11:03.076214 2022] [access_compat:error] [pid 921] [client [MASKED]] AH01797: client denied by server configuration: /var/www/html/nextcloud/data/.ocdata
[Tue Dec 27 16:11:17.106571 2022] [access_compat:error] [pid 924] [client [MASKED]] AH01797: client denied by server configuration: /var/www/html/nextcloud/data/.ocdata
[Tue Dec 27 16:16:06.420191 2022] [access_compat:error] [pid 924] [client [MASKED]] AH01797: client denied by server configuration: /var/www/html/nextcloud/data/.ocdata
[Tue Dec 27 16:19:22.866156 2022] [access_compat:error] [pid 1121] [client [MASKED]] AH01797: client denied by server configuration: /var/www/html/nextcloud/data/.ocdata
[Tue Dec 27 16:21:12.667242 2022] [access_compat:error] [pid 1122] [client [MASKED]] AH01797: client denied by server configuration: /var/www/html/nextcloud/data/.ocdata

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.

The log is massive, but it seems to be mostly repeats of those:
https://pastebin.com/b9C7d9NH

Any help is appreciated - with my current knowledge it looks like FUBAR, but I hope for the forum gurus it’s just another mangled configuration challenge, not FUBAR. If I missed any important info - I’ll be happy to provide it.

How did you get the update, via updater app or download the zip archive (e.g. from here. https://nextcloud.com/changelog/)?

The webfinger and other warnings, I wouldn’t bother too much at the moment, however your integrity check looks strange…
Perhaps some old app still in the apps folder that is not compatible with this version? Normally you just keep the data and config folder and replace all the code. The apps are then updated with versions corresponding to your current NC version (https://docs.nextcloud.com/server/latest/admin_manual/maintenance/manual_upgrade.html)

Thanks for the reply! I thought I’m on my own :slight_smile:
The updates from the web updater only. I can replace the NC files, but I was concerned about the database side. If you recommend replacing the files I can do it. The NC instance is just a personal storage, so even re-installation from scratch is not a problem, but normally I prefer to try to fix things to learn something in the process.

I can try to switch off/uninstall all apps possible and see if that makes any difference.

Edit:
Is that a sign of non-finished update from 21?

root@raspberrypi:/var/www/html/nextcloud/data/updater-oc8tq79nd98q# cat .step-previous-update 
{"state":"end","step":12}

I did machine restart (uptime +140 days), but that didn’t make any difference. Wht should be in .ocdata file? I have this in the apache logs:

AH01797: client denied by server configuration: /var/www/html/nextcloud/data/.ocdata

The file is there, but it’s zero length:

root@raspberrypi:/var/www/html/nextcloud/data# ls -la .ocd*
-rw-r--r-- 1 www-data www-data 0 gru 13 16:33 .ocdata

Looks like error in .htaccess file… or is that normal?

I switched off all apps, set up parallel NC installation, copied the files over (excluding some stuff like file_versions) with rsync, copied over the missing .user.ini file and it looks OK.
Edit:
Next step - enabled Updater and started update to 23
Update to 23 went OK.

The .ocdata is an empty file. If you have the data folder on an external drive, you will see the .ocdata file, the rest of the data folder might or might not be empty. If it is empty, it’s hard to tell if the external drive was just empty or disconnected. So the .ocdata file must always be present and if not some drive might have been disconnected.

Yes that is a good point. From this here:

It looks like the updater finished the last step!
The previous updates worked fine?

Or is there a bug in NC 23.0.12? Since it is the last one, that wouldn’t be great.