Upgrade failed (strange error messages, full disk?, How to restart?)


#1
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: or upgrade to 14, somewhere inbetween
Operating system and version: Debian on Raspberry Pi
Apache or nginx version: 2.4.25-3
PHP version: 7.0.30

The issue you are facing:
I started the installer in the web interface and it seemed to run fine and said I just had to relog in. Great. The login screen says

The files of the app (federation), (files), (files_versions), (files_videoplayer), (firstrunwizard), (gallery), (logreader), (lookup_server_connector), (password_policy), (sharebymail), (twofactor_backupcodes) were not replaced correctly. Make sure it is a version compatible with the server.

But even on console I only get

2018-10-08T20:41:55+00:00 Updating database schema
2018-10-08T20:41:55+00:00 Updated database
2018-10-08T20:41:55+00:00 UnexpectedValueException: The files of the app “files” were not correctly replaced before running the update
2018-10-08T20:41:55+00:00 Update failed
2018-10-08T20:41:55+00:00 Maintenance mode is kept active

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

Steps to replicate it: I don’t know, I never had that before,

The output of your Nextcloud log in Admin > Logging:

Can't acces that anymore

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

<?php
$CONFIG = array (
  'datadirectory' => '/var/www/html/data',
  'dbtype' => 'mysql',
  'version' => '13.0.0.14',
  [ removed db info ]
  'filelocking.enabled' => true,
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' => 
  array (
    'host' => 'localhost',
    'port' => 6379,
  ),
  'installed' => true,
  'maintenance' => true,
  'theme' => '',
  'loglevel' => 1,
 ;```

The output of your Apache/nginx/system log in /var/log/____: Maybe theres one interesting line…

[Mon Oct 08 20:46:18.086818 2018] [:error] [pid 15337] [client 92.206.10.220:62395] PHP Warning: ZipArchive::extractTo(): No space left on device in /var/www/html/updater/index.php on line 760
[Mon Oct 08 22:04:23.376100 2018] [mpm_prefork:notice] [pid 580] AH00169: caught SIGTERM, shutting down
[Mon Oct 08 22:12:26.011555 2018] [mpm_prefork:notice] [pid 23690] AH00163: Apache/2.4.25 (Raspbian) OpenSSL/1.0.2l configured -- resuming normal operations
[Mon Oct 08 22:12:26.011834 2018] [core:notice] [pid 23690] AH00094: Command line: '/usr/sbin/apache2'

So I noticed that my SD card was full (since trash was stored on there and not on the external drive, and maybe that’s why the update was not completely (or not at all) downloaded. How can I now proceed and restart the upgrade?


#2

Hi,

The web updater only moves the current Nextcloud folder away as a backup, extracts the new NC files from the downloaded zip archive and copies the saved config.php back to the config directory.
So these are the steps you could perform manually.

  • Login via SSH
  • backup your current NC directory (move it somewhere else)
  • make really sure, you saved your /path/to/nextcloud/config/config.php
  • download the latest NC version as zip archive (if not already done)
  • extract that folder to /path/to/nextcloud now
  • copy your config.php back to /path/to/nextcloud/config/
  • access your server via web and click the upgrade button
  • if above-mentioned button doesn’t show up or didn’t work as expected, run
    sudo -u www-data php /path/to/nextcloud/occ upgrade
  • access your NC server via web and check that it is working
  • report back :wink:

#3

Hi Schmu,
thank you for the ideas, I actually found the reason. My trash was saved on the SD card (which has “only” 32 GB of space compared to my external HDD with 2 TB). Since I just had to restart after removing some trash, I found

sudo -u www-data php ./updater/updater.phar 

which solved my problem of not having a next cloud running. In the end it’s the lazy approach to your explanations :slight_smile:

Now it just would be great to have the trash being stored on the external hard drive, such that this won’t happen again. Do you have an idea how to do that?


#4

Hi Kellertuer,

I’m glad you were able to restore your server and complete the update.
What “trash” are you actually talking about? We would need to know which kind of data/ files fill up your SD to determine the best solution to avoid this.


#5

Well there is the part of deleted files bottom left in my Nextcloud web interface, that comes from the deleted files app (I am running the up to date 1.4.1). And this app stores the deleted files within /var/www/html/data/$Username/files_trashbin (well the actual files in files/ in there. But all my data actually resides on an external HDD (mounted to /mnt/MyDrive).
The whole system is a Raspberry so /has something like 32GB of space, while the mounted HDD has 2 TB so I would like to have the trashbinsomewhere on there, if possible (to avoid situations like last night, where I manually deleted 6 GB of trash).


#6

This sounds like a bug in the app to me. I suggest to file an issue on Github for this app.
You could ask for a workaround in that case until this is fixed.
Not sure, if a workaround could be based on softlinks by linking /var/www/html/data/ to /mnt/YourDrive/deleted_files for example. I think it’s best to have the developer have a look at this.


#7

Thanks for the reply. I will look into submitting an Issue then.