Problem: Update nextcloud from 10.0.1 to 10.0.2

I am running nextcloud 10.0.1.

  1. Attempted to update
    a. Using updater as admin from MacBook.
    b. NextCloud server on Unbuntu 16.

  2. Updater failed at Downloading with error:
    a. "502 Bad Proxy … did not recieve response from upstream server … could not read
    www.nextcloud.allenintech.com port 80."
    b. Sorry don’t have exact error message wording.
    c. Message came for …/updater/index.php

  3. Made changes
    a. to reverse proxy: ProxyPass and ProxyPassReverse
    b. to the Ubuntu nextcloud severs Virtural host container.

  4. Hit re try updater
    a. Failed at Downloading with the same error messaging
    b. Undone earlier changes from above

  5. Refreshed the browser.
    a. Pretty blue maintenance mode information box popped up
    b. Can not log out or get back to updater browser page.
    c. Have not closed the browser.

  6. I have checked files on the NextCloud server:
    a. Backup of existing data has been made,
    b. Version 10.0.2 zip has been downloaded
    c. config.php shows maintenance => true

  7. Conclusion / Guess / Analysis ?
    The auto updater from within the admin browsers:
    a. did not completed its tasks
    b. wrote and copied what seems to be appropriate
    c. did not unzip or install version 10.0.2
    d. left enough for the tasks to be completed manually.

  8. Question
    a. Any suggestions as to how to proceed?
    b. How would you suggest to finish the update from 10.0.1 to 10.0.2

  9. Finally
    a Goal: Update from 10.0.1 ->10.0.2 -> 11.0.0

Thanks!

This indicates that your network/proxy settings are somehow wrong. If you don’t want to spend too much time on this, just download the new version from nextcloud.com/changelog and do a manual upgrade.

Hi @tflidd,

The autoupdater seemed to have modified config.php. with two entries as show below.

(A) Should the entries be removed or modified?

‘maintenance’ => true,
‘updater.secret’ => ‘NOTTHEREALSECRETEl81N7keq8DuoMBUjPiknUSMqKuNqK’,);

Also added to the directory were: updater and updater-somehash.

(B) Are there any files that need to be removed before I begin the manual upgrade?

© Finally, is it advisable to upgrade from 10.0.1 to 11.0.0. Skipping 10.0.2?

Thanks!

(A) The maintenance mode is normal for the update procedure. It could be necessary to set this back to false in order to start the upgrade. You can keep it for the moment. The updater.secret is a password required to update via updater app. This is important for future updates you perhaps want to do with the updater app. You can keep that as well.

(B) For the manual upgrade you usually remove all files except for the data/ and the config/-folder.

© You can first upgrade to 10.0.2 (always the latest version of a release), then 11.0.0 (same procedure).

Thanks @tflidd Have a great day!

@tflidd ,

Successful upgrade from 10.0.1 -> 10.0.2!

Here is what to expect.

Web Updater

The attempt to use the web interface failed. Time was spend trying to resolve the failed web interface upgrade.

However, when clicking on the notification update bell with the red dot on it and then hovering over the item to be updated, the INCORRECT server is shown in the tool tip display.
In fact the INCORRECT server is actually the first server used in the INITIAL setup of config.php:

‘trusted_domains’=> array (0=> ‘first_server’, 1=>others, 2=>another) which is no longer used.

Now config.php is using ‘trusted_domains’=> array (0 => ‘new_server’,).

It appears the web updater is obtaining the (target) server (in this case first_server) from a memory location that is stuck with the INITIAL setup value (first_server) which in many cases is no longer used.

Manuel Updater

Manual Nextcloud Upgrade — Nextcloud 10 Server Administration Manual 10 documentation
https://docs.nextcloud.com/server/10/admin_manual/maintenance/manual_upgrade.html

Always start by making a fresh backup and disabling all 3rd party apps.

Put your server in maintenance mode. This prevents new logins, locks the sessions of logged-in users, and displays a status screen so users know what is happening. There are two ways to do this, and the preferred method is to use the occ command, which you must run as your HTTP user. This example is for Ubuntu Linux:

sudo -u www-data php occ maintenance:mode --on

The other way is by entering your config.php file and changing ‘maintenance’ => false, to ‘maintenance’ => true,.

With only maintenance:mode --on: a splash screen appeared with a update button when an attempt was made to login. With both maintenance locks set:
** maintenance:mode --on and maintenance’ => true, then logins are not allowed.**

Also, the android app is able to access the nextcloud server even with maintenance: mode --off and maintenance=>true

  1. Back up your existing Nextcloud Server database, data directory, and config.php file.
    (See Backing up Nextcloud.)

1a. Step 5 will be another back up for data/ and config.php. But another backup for data/ and
config outside the server would not hurt. Do it!

1b. Here is how to back up the database per the instructions. Please do this backup!
mysqldump --lock-tables -h [server] -u [username] -p[password] [db_name] > nextcloud-sqlbkp_date +"%Y%m%d".bak (There is NOT a space after the “+”) and backticks `

If everything goes well in step 10, the database backup will not be needed but. If something
goes wacky then restoring the database will be necessary

2.Download and unpack the latest Nextcloud Server release (Archive file) from
nextcloud.com/install/ into an empty directory outside of your current installation.

To unpack your new tarball, run: tar xjf nextcloud-[version].tar.bz2

3.Stop your Web server. For example:
Fedora: systemclt stop httpd
Ubuntu: systemctl stop apache2

4.Rename your current Nextcloud directory, for example nextcloud-old.
Very good idea.

5.Unpacking the new archive creates a new nextcloud directory populated with your new
server files. Copy this directory and its contents to the original location of your old server.
For example /var/www/, so that once again you have /var/www/nextcloud.
The original location of your old server will look like this
/var/www/
…nextcloud <— new version
…nextcloud-old <---- old version

6.Copy the config.php file from your old Nextcloud directory to your new Nextcloud directory.

7a. If you keep your data/ directory in your nextcloud/ directory, copy data/ from your old
Nextcloud
directory to your new nextcloud/ directory.

7b. If you keep it (data/) outside of nextcloud/ then you don’t have to do anything with it.

8a. If you are using 3rd party applications, look in your new nextcloud/apps/ directory to see if
they are there. If not, copy them from your old apps/ directory to your new one. Make sure the
directory permissions of your third party application directories are the same as for the other
ones.

8b. Make sure files have correct ownership (your location may be different than /var/www)
Fedora: chown -R apache:apache /var/www/nextcloud
Ubuntu: chown -R www-data:www-data /var/www/nextcloud

9.Restart your Web server.
Fedora: systemctl restart httpd
Ubuntu: systemctl restart apache2

10.Now launch the upgrade from the command line using occ, like this example on Ubuntu
Linux.

Make sure you are in /nextcloud location i.e /var/www/nextcloud. That is where occ is!

sudo -u www-data php occ upgrade

11.The upgrade operation takes a few minutes to a few hours, depending on the size of your installation. When it is finished you will see a success message, or an error message that will tell where it went wrong.

This manual upgrade went smooth. I plan to upgrade 10.0.2 -> 11.0.0 using these notes

10.0.2 -> 11.0.0 did not product the pretty blue folder icons next to files

Got the exact same 502 error while upgrading from 11.0.1 to 11.0.2 and then the updater stucks at step 5. The prior updates did run correctly as apps updates, no configuration change in the meantime.
Upgrading manually …

For NC 11 there is a new updater app. I would open a new topic or if it is clearly a bug directly report to the bugtracker.

This topic was automatically closed after 24 hours. New replies are no longer allowed.