Errors with upgrade from 28.0.3.2 to 28.0.4.1 docker

I had a bunch of errors while updating from 28.0.3.2 to 28.0.4.1 using docker image nextcloud:apache.

I was updating with docker-compose pull and docker-compose up -d --build. That would complete without any errors but leave Nextcloud in maintenance mode. I was able to fix that by switching from a custom build that added ffmpeg to the default image: nextcloud:apache.

Then when I went to my NextCloud instance it said it needed to update to Nextcloud 28.0.4 and listed the memories app. It was not clear to me if it was updating Nextcloud or the memories app or both.

That ended up giving me an error or two right on the page:

Repair warning: Failed to create filecache trigger (compatibility mode will be used): An exception occurred while executing a query: SQLSTATE[HY000]: General error: 1419 You do not have the SUPER privilege and binary logging is enabled (you might want to use the less safe log_bin_trust_function_creators variable)

Repair warning: ffmpeg binary could not be configured

So I took a look at the logs and found a bunch of errors and warnings. It seems most of them have to do with the database. I will past a few here for reference:

  1. starting upgrade from 28.0.3.2 to 28.0.4.1
  2. \OC\Updater::upgradeAppStoreApp: Update app “memories” from appstore
  3. Failed to create filecache trigger (compatibility mode will be used): An exception occurred while executing a query: SQLSTATE[HY000]: General error: 1419 You do not have the SUPER privilege and binary logging is enabled (you might want to use the less safe log_bin_trust_function_creators variable)
  4. Migrating values for parent from filecache
  5. Failed to copy parent values from filecache: An exception occurred while executing a query: SQLSTATE[08S01]: Communication link failure: 1053 Server shutdown in progress
  6. Please run occ memories:index -f
  7. Exception Database error when running migration 800000Date20240329060325 for app memories An exception occurred while executing a query: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away
  8. \OC\Updater::checkAppStoreAppBefore: Checking for update of app “previewgenerator” in appstore
  9. \OC\Updater::upgradeAppStoreApp: Update app “previewgenerator” from appstore
  10. Exception Failed to connect to the database: An exception occurred in the driver: SQLSTATE[HY000] [2002] Connection refused
  11. Exception Failed to connect to the database: An exception occurred in the driver: SQLSTATE[HY000] [2002] Connection refused
  12. OC\Repair\Events\RepairStepEvent: Repair step: Repair MySQL collation
  13. DbalException Failed to connect to the database: An exception occurred in the driver: SQLSTATE[HY000] [2002] Connection refused
  14. Exception while executing repair step Repair MySQL collation
  15. Redis::keys(): php_network_getaddresses: getaddrinfo for redis failed: Temporary failure in name resolution at /var/www/html/lib/private/Memcache/Redis.php#108 [this one repeats about 10 times]
  16. Redis::keys(): php_network_getaddresses: getaddrinfo for redis failed: Temporary failure in name resolution at /var/www/html/lib/private/Memcache/Redis.php#108
  17. OC\Repair\Events\RepairStepEvent: Repair step: Clean up abandoned apps
  18. Exception Failed to connect to the database: An exception occurred in the driver: SQLSTATE[HY000] [2002] Connection refused Exception while executing repair step Clean up abandoned apps
  19. OC\Repair\Events\RepairErrorEvent: Repair error: Failed to connect to the database: An exception occurred in the driver: SQLSTATE[HY000] [2002] Connection refused
  20. The above two errors repeat many times with other things in-between.

I am concerned about the update not having completed successfully.

1 Like

Your DB crashed during the migration (probably not enough memory)

Follow the steps here
https://memories.gallery/troubleshooting/#trigger-compatibility-mode

Then run occ memories:index -f to reindex.

3 Likes

Thank you so much for your help.

I am following the steps at Troubleshooting - Memories. I use docker compose so am not sure about adding the log_bin_trust_function_creators to the docker-compose.yml file. But based on some examples I added --log_bin_trust_function_creators=1 to the command line in the yml. Like this:

services:
  db:
    image: mariadb:10.5
    command: --transaction-isolation=READ-COMMITTED --log-bin=binlog --binlog-format=ROW --log_bin_trust_function_creators=1
    restart: always
    volumes:
      - db:/var/lib/mysql
      - /home/[...]/db-env.cnf:/app/db-env.cnf:ro
    environment:
      - MYSQL_ROOT_PASSWORD=[...]
      - MARIADB_AUTO_UPGRADE=1
      - MARIADB_DISABLE_UPGRADE_BACKUP=1
    env_file:
      - db.env

      [...]

I think that might have worked because I ran occ maintenance:repair both before and after and there was a little difference.

Before

  • Repair steps for Memories
    • External table schema seem up to date
    • WARNING: Failed to create filecache trigger (compatibility mode will be used): An exception occurred while executing a query: SQLSTATE[HY000]: General error: 1419 You do not have the SUPER privilege and binary logging is enabled (you might want to use the less safe log_bin_trust_function_creators variable)
    • exiftool binary is configured: /var/www/html/custom_apps/memories/bin-ext/exiftool-amd64-glibc
    • go-vod binary is configured: /var/www/html/custom_apps/memories/bin-ext/go-vod-amd64
    • WARNING: ffmpeg binary could not be configured

After

  • Repair steps for Memories
    • External table schema seem up to date
    • Recreated filecache trigger with: Doctrine\DBAL\Platforms\MariaDb1052Platform
    • exiftool binary is configured: /var/www/html/custom_apps/memories/bin-ext/exiftool-amd64-glibc
    • go-vod binary is configured: /var/www/html/custom_apps/memories/bin-ext/go-vod-amd64
    • WARNING: ffmpeg binary could not be configured
1 Like

I was able to run occ memories:index -f. I think as far as the memories app goes everything is back to normal.

Thanks for you help.

2 Likes

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.