Upgrade error (nextcloud.log as extra file)

Hi,

I have a strange problem with updating my nextcloud installation (13.0.5 to 13.0.6). I don’t know how to fix it.

Nextcloud version: 13.0.5
Operating system and version: Ubuntu 18.04
Apache or nginx version: nginx/1.14.0 (Ubuntu)
PHP version: 7.2

The issue you are facing:
I have fresh installation of NextCloud 13.0.5 using nginx, everything works fine except update to NextCloud 13.0.6 which appeared today. Problem is that Updater reports extra file: nextcloud.log
So I’ve tried to locate and delete all those files located in:

  • /usr/share/nginx/nextcloud/nextcloud.log
  • /usr/share/nginx/nextcloud/core/templates/nextcloud.log
  • /usr/share/nginx/nextcloud/data/nextcloud.log
  • /usr/share/nginx/nextcloud/ocs/nextcloud.log
  • /media/cloud_data/storage/nextcloud.log

I’ve already tried to delete those files, but this does not fix anything.

Is this the first time you’ve seen this error?: Yes

Steps to replicate it:

  1. In Settings > Basic Settings > click on Open Updater
  2. In second step I see that there is an extra file (nextcloud.log)

The output of your Nextcloud log in Admin > Logging:

Nothing relevant because I've deleted all nextcloud.log files on my system (I know, not the smartest step). I can see only Trusted domain error even after few update attempts.

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

<?php
$CONFIG = array (
  'default_language' => 'cs_CZ',
  'instanceid' => '123abc',
  'passwordsalt' => '132abc',
  'secret' => '123abc',
  'trusted_domains' => 
  array (
    0 => 'my.very-much-secret.domain',
  ),
  'datadirectory' => '/media/cloud_data/storage',
  'overwrite.cli.url' => 'https://my.very-much-secret.domain',
  'dbtype' => 'mysql',
  'version' => '13.0.5.2',
  'dbname' => 'daisy',
  'dbhost' => 'localhost:3306',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'carl',
  'dbpassword' => 'very-much-secure-password',
  'installed' => true,
  'maintenance' => false,
  'log_type' => 'owncloud',
  'logfile' => 'nextcloud.log',
  'loglevel' => 2,
  'logdateformat' => 'F d, Y H:i:s',
  'mail_from_address' => 'some_mail',
  'mail_smtpmode' => 'smtp',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_domain' => 'wow.org',
  'mail_smtpsecure' => 'ssl',
  'mail_smtphost' => 'smtp.wow.org',
  'mail_smtpport' => '465',
  'mail_smtpauth' => 1,
  'mail_smtpname' => 'just-some-email@wow.doge',
  'mail_smtppassword' => 'bark-bark-hooman',
  'updater.secret' => '$somemagichere123',
);


The output of your nginx log in /var/log/nginx/error.log:

2018/08/30 00:47:33 [crit] 1929#1929: *30809 SSL_do_handshake() failed (SSL: error:1417D18C:SSL routines:tls_process_client_hello:version too low) while SSL handshaking, client: 141.212.122.96, server: 0.0.0.0:443
2018/08/30 08:04:26 [error] 1929#1929: *30889 peer closed connection in SSL handshake (104: Connection reset by peer) while SSL handshaking to upstream, client: XX.XX.XX.XX, server: XYX.XYXYX.XY, request: "GET /hosting/discovery HTTP/1.1", upstream: "https://127.0.0.1:9980/hosting/discovery", host: "XYX.XYXYX.XY"
2018/08/30 16:44:58 [crit] 1929#1929: *33557 SSL_do_handshake() failed (SSL: error:1417D18C:SSL routines:tls_process_client_hello:version too low) while SSL handshaking, client: 184.105.139.70, server: 0.0.0.0:443
2018/08/30 22:25:30 [error] 1929#1929: *43118 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 109.105.39.20, server: XYX.XYXYX.XY, request: "GET /apps/serverinfo/update HTTP/1.1", upstream: "fastcgi://unix:/run/php/php7.2-fpm.sock:", host: "XYX.XYXYX.XY"
2018/08/30 22:25:35 [alert] 1929#1929: *34835 open socket #21 left in connection 47
2018/08/30 22:25:35 [alert] 1929#1929: *34837 open socket #24 left in connection 86
2018/08/30 22:25:35 [alert] 1929#1929: aborting
2018/08/30 22:25:38 [alert] 1924#1924: worker process 1929 exited on signal 9
2018/08/30 22:25:38 [alert] 1924#1924: worker process 1928 exited on signal 9
2018/08/30 22:26:44 [info] 1296#1296: Using 32768KiB of shared memory for nchan in /etc/nginx/nginx.conf:63

Thanks for all your help!

User did a manual update as a workaround.

And that emerged into the code integrity warning.

Got an error:
Technical information
=====================
The following list covers which files have failed the integrity check. Please read
the previous linked documentation to learn more about the errors and how to fix
them.

Results
=======
- core
	- EXTRA_FILE
		- nextcloud.log
- dav
	- EXTRA_FILE
		- lib/Files/LazySearchBackend.php
		- lib/Connector/Sabre/AnonymousOptionsPlugin.php

Raw output
==========
Array
(
    [core] => Array
        (
            [EXTRA_FILE] => Array
                (
                    [nextcloud.log] => Array
                        (
                            [expected] => 
                            [current] => e70d52d74d5a4d2d7c7f5ad45e3c8295d31800ab7f735a136fd66399697be572ee7e31ab1078ca5317c1d94c30fdb621cf463282d5311b5278cc8154aae13aab
                        )

                )

        )

    [dav] => Array
        (
            [EXTRA_FILE] => Array
                (
                    [lib/Files/LazySearchBackend.php] => Array
                        (
                            [expected] => 
                            [current] => df4c368f658c3d4802d03df400f592e55e502af2a0f1692505b7b41c9a7dfdb25114cde0e6a92899c4e9c393ca3c22ccadd24ded2a77983b8e58b13c3209d443
                        )

                    [lib/Connector/Sabre/AnonymousOptionsPlugin.php] => Array
                        (
                            [expected] => 
                            [current] => 631ea646332e96808c1ec42490d7230b584d08707fc4bbe1fe4998b48b45e83bd14f2775971721fd63d2e209f625798dbaecf0317d0f035c3521f98fd80062f5
                        )

                )

        )

) 

It was easy to get rid of [dav] extra files, so now I have this:

Technical information
=====================
The following list covers which files have failed the integrity check. Please read
the previous linked documentation to learn more about the errors and how to fix
them.

Results
=======
- core
	- EXTRA_FILE
		- nextcloud.log

Raw output
==========
Array
(
    [core] => Array
        (
            [EXTRA_FILE] => Array
                (
                    [nextcloud.log] => Array
                        (
                            [expected] => 
                            [current] => e70d52d74d5a4d2d7c7f5ad45e3c8295d31800ab7f735a136fd66399697be572ee7e31ab1078ca5317c1d94c30fdb621cf463282d5311b5278cc8154aae13aab
                        )

                )

        )

)

I’ve tried to delete nextcloud.log file in /core folder, successfully, but code integrity appears again with same warning (extra file /core/nextcloud.log). It is actually interesting because, when i list content of folder I get:

drwxr-x--- 17 www-data www-data    4096 zář  6 22:07 ./
drwxr-x--- 13 www-data www-data    4096 zář  3 21:10 ../
drwxr-x---  2 www-data www-data    4096 srp 30 13:16 ajax/
-rw-r-----  1 www-data www-data    1467 srp 30 13:16 Application.php
drwxr-x--- 15 www-data www-data    4096 srp 30 13:16 Command/
drwxr-x---  2 www-data www-data    4096 srp 30 13:16 Controller/
drwxr-x---  5 www-data www-data    4096 srp 30 13:16 css/
drwxr-x---  4 www-data www-data    4096 srp 30 13:16 doc/
drwxr-x---  2 www-data www-data    4096 srp 30 13:16 fonts/
drwxr-x---  7 www-data www-data    4096 srp 30 13:16 img/
drwxr-x---  7 www-data www-data    4096 srp 30 13:16 js/
drwxr-x---  2 www-data www-data    4096 srp 30 13:16 l10n/
drwxr-x---  2 www-data www-data    4096 srp 30 13:16 Middleware/
drwxr-x---  2 www-data www-data    4096 srp 30 13:16 Migrations/
-rw-r-----  1 www-data www-data   10083 srp 30 13:16 register_command.php
-rw-r-----  1 www-data www-data    7375 srp 30 13:16 routes.php
drwxr-x---  6 www-data www-data    4096 srp 30 13:16 search/
-rw-r-----  1 www-data www-data     925 srp 30 13:16 shipped.json
-rw-r-----  1 www-data www-data 1323010 srp 30 13:21 signature.json
drwxr-x---  4 www-data www-data    4096 srp 30 13:21 skeleton/
-rw-r-----  1 www-data www-data    1060 srp 30 13:16 strings.php
drwxr-x---  5 www-data www-data    4096 zář  3 22:33 templates/
drwxr-x--- 24 www-data www-data    4096 srp 30 13:16 vendor/

But when I try to run “locate nextcloud.log” i get this result:
/usr/share/nginx/nextcloud/nextcloud.log
/usr/share/nginx/nextcloud/core/nextcloud.log
/usr/share/nginx/nextcloud/core/templates/nextcloud.log
/usr/share/nginx/nextcloud/ocs/nextcloud.log
/usr/share/nginx/nextcloud-dirbkp_20180903/nextcloud.log
/usr/share/nginx/nextcloud-dirbkp_20180903/core/templates/nextcloud.log
/usr/share/nginx/nextcloud-dirbkp_20180903/data/nextcloud.log
/usr/share/nginx/nextcloud-dirbkp_20180903/ocs/nextcloud.log
/usr/share/nginx/nextcloud-old/nextcloud.log
/usr/share/nginx/nextcloud-old/core/templates/nextcloud.log
/usr/share/nginx/nextcloud-old/data/nextcloud.log
/usr/share/nginx/nextcloud-old/ocs/nextcloud.log

I’m not sure whats wrong, but its a bit annoying and I’m afraid that this will block further automatic updates. Do you have any idea how could I solve this issue?

Problem was probably caused by “Auditing / Logging” extension. Once I disabled extension and deleted nextcloud.log file, code integrity warning disappeared.

This unfortunately does not work for me on NC 19.0. The last upgrade I did manually, because the upgrade from 18.0.6 did not work for the same reason. And now I have the same problem again. I have removed the auditing/loggin app, and when I subsequently remove the offending files, they are immediately recreated in both nextcloud root directory and ocs. I cannot for the life of me understand why nc would object to files it obviously creates itself, but it makes updating through the updater impossible for me.

Any suggestions welcome!

This is the 2nd time I’ve come across this error, so it’s obviously not been fixed. Pity that I can’t remember how I got past it the first time as none of the above suggestions work.

I’m not sure how something as seemingly simple as a log file can completely block a software upgrade, but it seems rather poor IMHO. Not trying to bash the software but this kind of thing really shouldn’t happen.