After making a full backup of my server, I decided it was time to make the plunge and update my home NextCloud server from version 20 to version 21. I like to wait a week or two (or sometimes longer) to make sure that other’s don’t start complaining about any major issue before making the switch. It’s nice to be cutting edge, but not when you cut your own fingers! I also like to make a full server backup before doing major revisions. I’m fine with going from xx.01 to xx.02 minor revisions, but for major changes I perform a backup first.

That said, all went smoothly in the updater script. However, when I went to the dashboard, I saw these notices:

    A background job is pending that checks for user imported SSL certificates. Please check back later.

    Your installation has no default phone region set. This is required to validate phone numbers in the profile settings without a country code. To allow numbers without a country code, please add "default_phone_region" with the respective ISO 3166-1 code ↗ of the region to your config file.

    The database is missing some indexes. Due to the fact that adding indexes on big tables could take some time they were not added automatically. By running "occ db:add-missing-indices" those missing indexes could be added manually while the instance keeps running. Once the indexes are added queries to those tables are usually much faster.
        Missing index "fs_size" in table "oc_filecache".

The first wasn’t really an issue, just waiting a bit will solve that one, but the other two required intervention. So, to fix the first, I looked it up online and got a helpful tidbit on how to fix it. Unfortunately, the official article pointed to the wrong place for my installation’s config file, so I had to add this line to /var/www/nextcloud/config/config.php:

  'default_phone_region' => 'US',

That was easy enough. Then I moved onto the next issue. I’ve had to run this command before, but it didn’t work this time around:

root@alaskalinuxuser-PowerEdge-R520:/home/alaskalinuxuser# cd /var/www/nextcloud && sudo -u www-data php occ db:add-missing-indices
An unhandled exception has been thrown:
OC\HintException: [0]: Memcache \OC\Memcache\APCu not available for local cache (Is the matching PHP module installed and enabled?)
root@alaskalinuxuser-PowerEdge-R520:/var/www/nextcloud# 

That’s odd. I did some web searching and found the answer from an issue posted about it in Nextcloud’s github. First, I had to add this line to /etc/php/7.4/mods-available/apcu.ini:

apc.enable_cli=1

Then I restarted the service with:

# systemctl restart php7.4-fpm

Now running the same command yielded much better results:

root@alaskalinuxuser-PowerEdge-R520:/var/www/nextcloud# cd /var/www/nextcloud && sudo -u www-data php occ db:add-missing-indices
Check indices of the share table.
Check indices of the filecache table.
Adding additional size index to the filecache table, this can take some time...
Filecache table updated successfully.
Check indices of the twofactor_providers table.
Check indices of the login_flow_v2 table.
Check indices of the whats_new table.
Check indices of the cards table.
Check indices of the cards_properties table.
Check indices of the calendarobjects_props table.
Check indices of the schedulingobjects table.
Check indices of the oc_properties table.
root@alaskalinuxuser-PowerEdge-R520:/var/www/nextcloud#

And there we go! Praise God, it even worked when I was done! I like it when the issues are easy fixes. It also helps waiting a few weeks after a big release to see what other people did to solve their problems with the upgrade.

Linux – keep it simple.

Leave a Reply

Your email address will not be published. Required fields are marked *