Update to 14.0.3 fails on 'Check for expected files'

Hello,

I’ve tried to update my 13.0.6 NextCloud instance to new 14.0.3 using Web-updater. But I got warning about extra file ‘nextcloud.log’.

Well, I’ve seen this one problem before and fixed it by removing ‘Auditing / Logging’ app, removing nextcloud logs and setting loglevel to 2 - all done retrospectively after manual update.

I’ve also restarted nginx and php services - without effect.

Nextcloud version: 13.0.6
Operating system and version: Ubuntu 18.04
Apache or nginx version: nginx/1.14.0 (Ubuntu)
PHP version (eg, 7.1): 7.2-fpm

What I have done till now:

  1. ‘Auditing / Logging’ app disabled
  2. Loglevel changed from 1 to 2
  3. /usr/share/nginx/nextcloud/nextcloud.log and /usr/share/nginx/nextcloud/ocs.nextcloud.log and /media/cloud-storage/data/nextcloud.log files has been removed
  4. Restarting nginx and php services

Please help, I would really love to avoid manual update this time.

Here is my updater.log

2018-10-14T20:24:09+0200 jMmWqdZRIN [info] request to updater
2018-10-14T20:24:09+0200 jMmWqdZRIN [info] currentStep()
2018-10-14T20:24:09+0200 jMmWqdZRIN [info] show HTML page
2018-10-14T20:24:09+0200 jMmWqdZRIN [info] current version: 13.0.6 build time: 2018-08-30T11:19:35+00:00 2a973843f0acf084ba62d41f7d2c1526b5f8f4d1
2018-10-14T20:24:09+0200 jMmWqdZRIN [info] getUpdateServerResponse()
2018-10-14T20:24:09+0200 jMmWqdZRIN [info] updaterServer: https://updates.nextcloud.org/updater_server/
2018-10-14T20:24:09+0200 jMmWqdZRIN [info] releaseChannel: stable
2018-10-14T20:24:09+0200 jMmWqdZRIN [info] internal version: 13.0.6.1
2018-10-14T20:24:09+0200 jMmWqdZRIN [info] updateURL: https://updates.nextcloud.org/updater_server/?version=13x0x6x1xxxstablexx2018-08-30T11%3A19%3A35%2B00%3A00+2a973843f0acf084ba62d41f7d2c1526b5f8f4d1x7x2x10
2018-10-14T20:24:09+0200 jMmWqdZRIN [info] getUpdateServerResponse response: Array
(
    [version] => 14.0.3.0
    [versionstring] => Nextcloud 14.0.3
    [url] => https://download.nextcloud.com/server/releases/nextcloud-14.0.3.zip
    [web] => https://docs.nextcloud.com/server/14/admin_manual/maintenance/upgrade.html
    [changes] => https://updates.nextcloud.com/changelog_server/?version=14.0.3
    [autoupdater] => 1
    [eol] => 0
    [signature] => cWbv8qrFK4lKaRAtHLvM3AjLcwd4S1lIWYzE3hbAN30MuW60weRqYZf412jUe/7g
EEaas6MNqgd5omqwsnTwn4KwtfUkKSB5JbwGHZY95Wv/mf5EyZfw0x04xo5A6W5l
Zv7kK0HOGGOzT1nqyJJHvin9jU3eBzpWe9Es2hwhQYFI9C+V/5Fvbm37dqN821gQ
aTT4zv8XwVkAoH6BRrNGjoUqQHVBcONVEcYPEahBI9SjuTVX807e9HETrsziKtHu
k5E2t0FCNl/qUvxEDtsvQk5+XD1fW6v5ievqfLoZhv/XqKdCfAqgyC83NijYB0/8
ajEplLd/VwvoezLExRngLQ==
)

2018-10-14T20:24:09+0200 jMmWqdZRIN [info] checkForUpdate() Array
(
    [version] => 14.0.3.0
    [versionstring] => Nextcloud 14.0.3
    [url] => https://download.nextcloud.com/server/releases/nextcloud-14.0.3.zip
    [web] => https://docs.nextcloud.com/server/14/admin_manual/maintenance/upgrade.html
    [changes] => https://updates.nextcloud.com/changelog_server/?version=14.0.3
    [autoupdater] => 1
    [eol] => 0
    [signature] => cWbv8qrFK4lKaRAtHLvM3AjLcwd4S1lIWYzE3hbAN30MuW60weRqYZf412jUe/7g
EEaas6MNqgd5omqwsnTwn4KwtfUkKSB5JbwGHZY95Wv/mf5EyZfw0x04xo5A6W5l
Zv7kK0HOGGOzT1nqyJJHvin9jU3eBzpWe9Es2hwhQYFI9C+V/5Fvbm37dqN821gQ
aTT4zv8XwVkAoH6BRrNGjoUqQHVBcONVEcYPEahBI9SjuTVX807e9HETrsziKtHu
k5E2t0FCNl/qUvxEDtsvQk5+XD1fW6v5ievqfLoZhv/XqKdCfAqgyC83NijYB0/8
ajEplLd/VwvoezLExRngLQ==
)

2018-10-14T20:24:09+0200 jMmWqdZRIN [info] end of checkForUpdate() Update to Nextcloud 14.0.3 available. (channel: "stable")<br /><span class="light">Following file will be downloaded automatically:</span> <code class="light">https://download.nextcloud.com/server/releases/nextcloud-14.0.3.zip</code>
2018-10-14T20:24:13+0200 9UyTwA7Od7 [info] request to updater
2018-10-14T20:24:13+0200 9UyTwA7Od7 [info] currentStep()
2018-10-14T20:24:13+0200 9UyTwA7Od7 [info] POST request for step "1"
2018-10-14T20:24:13+0200 9UyTwA7Od7 [info] startStep("1")
2018-10-14T20:24:13+0200 9UyTwA7Od7 [info] checkForExpectedFilesAndFolders()
2018-10-14T20:24:13+0200 9UyTwA7Od7 [error] POST request failed with UpdateException
2018-10-14T20:24:13+0200 9UyTwA7Od7 [error] Exception: UpdateException
Message: 
Code:0
Trace:
#0 /usr/share/nginx/nextcloud/updater/index.php(1285): Updater->checkForExpectedFilesAndFolders()
#1 {main}
File:/usr/share/nginx/nextcloud/updater/index.php
Line:383
Data:
Array
(
    [0] => nextcloud.log
)


2018-10-14T20:24:13+0200 9UyTwA7Od7 [info] rollbackChanges("1")
2018-10-14T20:24:13+0200 9UyTwA7Od7 [info] unlink .step
2018-10-14T20:24:13+0200 9UyTwA7Od7 [info] end of  rollbackChanges()

My config file

<?php
$CONFIG = array (
  'trusted_domains' => 
  array (
    0 => 'cloud.myweb.com',
  ),
  'datadirectory' => '/media/cloud-storage/data',
  'overwrite.cli.url' => 'https://cloud.myweb.com',
  'dbtype' => 'mysql',
  'version' => '13.0.6.1',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost:3306',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'dadada',
  'dbpassword' => 'ook',
  'installed' => true,
  'maintenance' => false,
  'log_type' => 'owncloud',
  'logfile' => 'nextcloud.log',
  'loglevel' => 2,
  'logdateformat' => 'F d, Y H:i:s',
  'updater.release.channel' => 'stable',
  'memcache.local' => '\\OC\\Memcache\\Redis',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'filelocking.enabled' => 'true',
  'redis' => 
  array (
    'host' => '/var/run/redis/redis-server.sock',
    'port' => 0,
    'timeout' => 0.0,
  ),
  'updater.secret' => '$2y$10$9h/zYSnQSm6kwCuPngJ5Fu769VJT.IQKK5E97BfwJNq834R9zaoE2',
);

does the root directory of your nextcloud has a hidden folder named “well known” or something, owned by root:root? If yes, just remove it and retry.

Nothing special I guess, here is output from ll command.

drwxr-x--- 13 www-data www-data  4096 říj 14 20:23 ./
drwxr-xr-x  7 root     root      4096 zář 19 20:45 ../
drwxr-x--- 52 www-data www-data  4096 říj 14 19:24 apps/
-rw-r-----  1 www-data www-data 12063 srp 30 13:16 AUTHORS
drwxr-x---  2 www-data www-data  4096 říj 14 21:04 config/
-rw-r-----  1 www-data www-data  3593 srp 30 13:16 console.php
drwxr-x--- 17 www-data www-data  4096 zář  6 22:07 core/
-rw-r-----  1 www-data www-data  4944 srp 30 13:16 cron.php
-rw-r-----  1 www-data www-data  2804 zář  3 21:11 .htaccess
-rw-r-----  1 www-data www-data   179 srp 30 13:16 index.html
-rw-r-----  1 www-data www-data  3664 srp 30 13:16 index.php
drwxr-x---  6 www-data www-data  4096 srp 30 13:16 lib/
-rw-r-----  1 www-data www-data  6725 říj 15 20:55 nextcloud.log
-rw-r-----  1 www-data www-data   283 srp 30 13:16 occ
drwxr-x---  2 www-data www-data  4096 říj 14 20:23 ocs/
drwxr-x---  2 www-data www-data  4096 srp 30 13:16 ocs-provider/
-rw-r-----  1 www-data www-data  3214 srp 30 13:16 public.php
-rw-r-----  1 www-data www-data  5370 srp 30 13:16 remote.php
drwxr-x---  4 www-data www-data  4096 srp 30 13:16 resources/
-rw-r-----  1 www-data www-data    26 srp 30 13:16 robots.txt
drwxr-x--- 14 www-data www-data  4096 srp 30 13:16 settings/
-rw-r-----  1 www-data www-data  2274 srp 30 13:16 status.php
drwxr-x---  3 www-data www-data  4096 srp 30 13:16 themes/
drwxr-x---  2 www-data www-data  4096 srp 30 13:17 updater/
-rw-r-----  1 www-data www-data   163 srp 30 13:16 .user.ini
-rw-r-----  1 www-data www-data   362 srp 30 13:21 version.php
drwxr-x--- 33 www-data www-data  4096 srp 30 13:21 3rdparty/

So I’ve found and successfully testes a solution for this nasty bug. It was pretty easy actually :slight_smile:

I’ve changed logging in config.php to syslog type and removed nextcloud.log from nextcloud root folder. Not sure why nextcloud.log blocked automatic update, though.

Link Logging configuration.

I think the logfile should not be in the nextcloud root directory, but in the data directory.