nextcloud / server

☁️ Nextcloud server, a safe home for all your data
https://nextcloud.com
GNU Affero General Public License v3.0
26.6k stars 3.99k forks source link

[Bug]: Base table or view not found: 1932 Table 'owncloud.oc_textprocessing_tasks' doesn't exist in engine #43960

Closed GregorB54321 closed 5 months ago

GregorB54321 commented 6 months ago

⚠️ This issue respects the following points: ⚠️

Bug description

Trying to Upgrade Docker installation from nextcloud:27.0-apache to nextcloud:27.1-apache

nextcloud-instance    | Initializing nextcloud 27.1.6.2 ...
nextcloud-instance    | Upgrading nextcloud from 27.0.2.1 ...
nextcloud-instance    | Nextcloud is in maintenance mode, no apps are loaded.
nextcloud-instance    | Commands provided by apps are unavailable.
nextcloud-instance    | => Searching for scripts (*.sh) to run, located in the folder: /docker-entrypoint-hooks.d/pre-upgrade
nextcloud-instance    | Nextcloud or one of the apps require upgrade - only a limited number of commands are available
nextcloud-instance    | Setting log level to debug
nextcloud-instance    | You may use your browser or the occ upgrade command to do the upgrade
nextcloud-instance    | Updating database schema
nextcloud-instance    | Exception: Database error when running migration 28000Date20230803221055 for app core
nextcloud-instance    | An exception occurred while executing a query: SQLSTATE[42S02]: Base table or view not found: 1932 Table 'owncloud.oc_textprocessing_tasks' doesn't exist in engine
nextcloud-instance    | Update failed
nextcloud-instance    | Maintenance mode is kept active
nextcloud-instance    | Resetting log level
nextcloud-instance exited with code 5
nextcloud-instance    | => Searching for scripts (*.sh) to run, located in the folder: /docker-entrypoint-hooks.d/before-starting
nextcloud-instance    | AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.31.0.4. Set the 'ServerName' directive globally to suppress this message
nextcloud-instance    | AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.31.0.4. Set the 'ServerName' directive globally to suppress this message
nextcloud-instance    | [Sat Mar 02 22:35:34.047931 2024] [mpm_prefork:notice] [pid 1] AH00163: Apache/2.4.57 (Debian) PHP/8.2.16 configured -- resuming normal operations
nextcloud-instance    | [Sat Mar 02 22:35:34.048009 2024] [core:notice] [pid 1] AH00094: Command line: 'apache2 -D FOREGROUND'
nextcloud-instance    | 127.0.0.1 - - [02/Mar/2024:22:36:33 +0100] "GET /status.php HTTP/1.1" 200 1890 "-" "curl/7.88.1"
nextcloud-instance    | 127.0.0.1 - - [02/Mar/2024:22:37:33 +0100] "GET /status.php HTTP/1.1" 200 1880 "-" "curl/7.88.1"
nextcloud-instance    | 127.0.0.1 - - [02/Mar/2024:22:38:33 +0100] "GET /status.php HTTP/1.1" 200 1888 "-" "curl/7.88.1"
nextcloud-instance    | 127.0.0.1 - - [02/Mar/2024:22:39:34 +0100] "GET /status.php HTTP/1.1" 200 1884 "-" "curl/7.88.1"
nextcloud-instance    | 127.0.0.1 - - [02/Mar/2024:22:40:34 +0100] "GET /status.php HTTP/1.1" 200 1882 "-" "curl/7.88.1"

Steps to reproduce

  1. changing used image from 27.0 to 27.1 and restarting

Expected behavior

creates the table by itself or omits the table if not necessary

Installation method

Community Docker image

Nextcloud Server version

27

Operating system

Debian/Ubuntu

PHP engine version

None

Web server

Apache (supported)

Database engine version

MySQL

Is this bug present after an update or on a fresh install?

Updated from a MINOR version (ex. 22.1 to 22.2)

Are you using the Nextcloud Server Encryption module?

Encryption is Disabled

What user-backends are you using?

Configuration report

www-data@e757c47f8ab6:~/html$ ./occ config:list system
Nextcloud or one of the apps require upgrade - only a limited number of commands are available
You may use your browser or the occ upgrade command to do the upgrade
{
    "system": {
        "ServerName": "***",
        "htaccess.RewriteBase": "\/",
        "memcache.local": "\\OC\\Memcache\\APCu",
        "apps_paths": [
            {
                "path": "\/var\/www\/html\/apps",
                "url": "\/apps",
                "writable": false
            },
            {
                "path": "\/var\/www\/html\/custom_apps",
                "url": "\/custom_apps",
                "writable": true
            }
        ],
        "memcache.distributed": "\\OC\\Memcache\\Redis",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "password": "***REMOVED SENSITIVE VALUE***",
            "port": 6379
        },
        "mail_smtpmode": "smtp",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "465",
        "mail_smtpsecure": "ssl",
        "mail_smtpauth": true,
        "mail_smtpauthtype": "LOGIN",
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "localhost",
            "***",
            "***",
            "***",
            "***"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "27.0.2.1",
        "overwritehost": "***",
        "overwriteprotocol": "https",
        "overwritewebroot": "\/",
        "overwrite.cli.url": "***",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "3306",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "loglevel": 0,
        "maintenance": false,
        "encryption.legacy_format_support": false,
        "encryption.key_storage_migrated": false,
        "theme": "",
        "versions_retention_obligation": "auto",
        "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
        "data-fingerprint": "***"
    }
}

List of activated Apps

www-data@e757c47f8ab6:~/html$ ./occ app:list
Nextcloud or one of the apps require upgrade - only a limited number of commands are available
You may use your browser or the occ upgrade command to do the upgrade
Enabled:
  - activity: 2.19.0
  - bruteforcesettings: 2.7.0
  - calendar: 4.6.5
  - circles: 27.0.1
  - cloud_federation_api: 1.10.0
  - comments: 1.17.0
  - contactsinteraction: 1.8.0
  - dav: 1.27.0
  - drawio: 2.1.4
  - federatedfilesharing: 1.17.0
  - federation: 1.17.0
  - files: 1.22.0
  - files_external: 1.19.0
  - files_pdfviewer: 2.8.0
  - files_rightclick: 1.6.0
  - files_sharing: 1.19.0
  - files_trashbin: 1.17.0
  - files_versions: 1.20.0
  - firstrunwizard: 2.16.0
  - keeweb: 0.6.13
  - logreader: 2.12.0
  - lookup_server_connector: 1.15.0
  - nextcloud_announcements: 1.16.0
  - notes: 4.9.2
  - notifications: 2.15.0
  - oauth2: 1.15.1
  - password_policy: 1.17.0
  - phonetrack: 0.7.7
  - photos: 2.3.0
  - polls: 5.4.3
  - privacy: 1.11.0
  - provisioning_api: 1.17.0
  - qownnotesapi: 23.12.0
  - recommendations: 1.6.0
  - related_resources: 1.2.0
  - serverinfo: 1.17.0
  - settings: 1.9.0
  - support: 1.10.0
  - survey_client: 1.15.0
  - systemtags: 1.17.0
  - tasks: 0.15.0
  - text: 3.8.0
  - theming: 2.2.0
  - timemanager: 0.3.11
  - timetracker: 0.0.82
  - twofactor_backupcodes: 1.16.0
  - updatenotification: 1.17.0
  - user_status: 1.7.0
  - viewer: 2.1.0
  - weather_status: 1.7.0
  - workflowengine: 2.9.0
Disabled:
  - admin_audit: 1.17.0
  - dashboard: 7.7.0 (installed 7.0.0)
  - duplicatefinder: 1.1.4 (installed 1.1.4)
  - encryption: 2.15.0 (installed 1.3.0)
  - files_reminders: 1.0.0
  - sharebymail: 1.17.0 (installed 1.16.0)
  - sharerenamer: 3.2.0 (installed 3.2.0)
  - suspicious_login: 5.0.0
  - twofactor_totp: 9.0.0
  - user_ldap: 1.17.0

Nextcloud Signing status

No response

Nextcloud Logs

{"reqId":"1WlclFNKedzJboj8cgIZ","level":0,"time":"2024-03-02T21:31:18+00:00","remoteAddr":"172.19.0.1","user":"--","app":"webdav","method":"PROPFIND","url":"/remote.php/dav/files/gregor-tux/","message":"System is in maintenance mode.","userAgent":"Mozilla/5.0 (Android) Nextcloud-android/3.28.0","version":"27.0.2.1","exception":{"Exception":"OCA\\DAV\\Exception\\ServerMaintenanceMode","Message":"System is in maintenance mode.","Code":0,"Trace":[{"file":"/var/www/html/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"ch
eckMaintenanceMode","class":"OCA\\DAV\\Connector\\Sabre\\MaintenancePlugin","type":"->","args":[["Sabre\\HTTP\\Request"],["Sabre\\HTTP\\Response"]]},{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php","line":456,"function":"emit","class":"Sabre\\DAV\\Server","type":"->","args":["beforeMethod:PROPFIND",[["Sabre\\HTTP\\Request"],["Sabre\\HTTP\\Response"]]]},{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php","line":253,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->","args":[["Sabre\\HTTP\\Request"],["Sab
re\\HTTP\\Response"]]},{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php","line":321,"function":"start","class":"Sabre\\DAV\\Server","type":"->","args":[]},{"file":"/var/www/html/apps/dav/lib/Server.php","line":364,"function":"exec","class":"Sabre\\DAV\\Server","type":"->","args":[]},{"file":"/var/www/html/apps/dav/appinfo/v2/remote.php","line":35,"function":"exec","class":"OCA\\DAV\\Server","type":"->","args":[]},{"file":"/var/www/html/remote.php","line":172,"args":["/var/www/html/apps/dav/appinfo/v2/remote.php"],"function":"req
uire_once"}],"File":"/var/www/html/apps/dav/lib/Connector/Sabre/MaintenancePlugin.php","Line":86,"message":"System is in maintenance mode.","exception":{},"CustomMessage":"System is in maintenance mode."}}
{"reqId":"SaX6IpEHngZ6BfXNqmWl","level":0,"time":"2024-03-02T21:35:02+00:00","remoteAddr":"","user":"--","app":"cron","method":"","url":"/cron.php","message":"Update required, skipping cron","userAgent":"--","version":"27.0.2.1","data":{"app":"cron"}}
{"reqId":"vv0OV5tFgiANizHMr8Vl","level":1,"time":"2024-03-02T21:35:11+00:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"/occ","message":"\\OC\\Updater::setDebugLogLevel: Set log level to debug","userAgent":"--","version":"27.0.2.1","data":{"app":"updater"}}
{"reqId":"vv0OV5tFgiANizHMr8Vl","level":0,"time":"2024-03-02T21:35:11+00:00","remoteAddr":"","user":"--","app":"core","method":"","url":"/occ","message":"starting upgrade from 27.0.2.1 to 27.1.6.2","userAgent":"--","version":"27.0.2.1","data":{"app":"core"}}
{"reqId":"vv0OV5tFgiANizHMr8Vl","level":1,"time":"2024-03-02T21:35:11+00:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"/occ","message":"OC\\Repair\\Events\\RepairStepEvent: Repair step: Repair MySQL collation","userAgent":"--","version":"27.0.2.1","data":{"app":"updater"}}
{"reqId":"vv0OV5tFgiANizHMr8Vl","level":1,"time":"2024-03-02T21:35:13+00:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"/occ","message":"OC\\Repair\\Events\\RepairInfoEvent: Repair info: All tables already have the correct collation -> nothing to do","userAgent":"--","version":"27.0.2.1","data":{"app":"updater"}}
{"reqId":"vv0OV5tFgiANizHMr8Vl","level":1,"time":"2024-03-02T21:35:13+00:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"/occ","message":"OC\\Repair\\Events\\RepairStepEvent: Repair step: Repair SQLite autoincrement","userAgent":"--","version":"27.0.2.1","data":{"app":"updater"}}
{"reqId":"vv0OV5tFgiANizHMr8Vl","level":1,"time":"2024-03-02T21:35:13+00:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"/occ","message":"OC\\Repair\\Events\\RepairStepEvent: Repair step: Copy data from accounts table when migrating from ownCloud","userAgent":"--","version":"27.0.2.1","data":{"app":"updater"}}
{"reqId":"vv0OV5tFgiANizHMr8Vl","level":1,"time":"2024-03-02T21:35:16+00:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"/occ","message":"OC\\Repair\\Events\\RepairStepEvent: Repair step: Drop account terms table when migrating from ownCloud","userAgent":"--","version":"27.0.2.1","data":{"app":"updater"}}
{"reqId":"vv0OV5tFgiANizHMr8Vl","level":1,"time":"2024-03-02T21:35:16+00:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"/occ","message":"\\OC\\Updater::dbUpgradeBefore: Updating database schema","userAgent":"--","version":"27.0.2.1","data":{"app":"updater"}}
{"reqId":"vv0OV5tFgiANizHMr8Vl","level":3,"time":"2024-03-02T21:35:31+00:00","remoteAddr":"","user":"--","app":"no app in context","method":"","url":"/occ","message":"Database error when running migration 28000Date20230803221055 for app core\nAn exception occurred while executing a query: SQLSTATE[42S02]: Base table or view not found: 1932 Table 'owncloud.oc_textprocessing_tasks' doesn't exist in engine","userAgent":"--","version":"27.0.2.1","exception":{"Exception":"Exception","Message":"Database error when running migration 28000Date20230803221055 for app core\nAn exception occurred while executing a query: SQLSTATE[42S02]: Base table or view not found: 1932 Table 'owncloud.oc_textprocessing_tasks' doesn't exist in engine","Code":0,"Trace":[{"file":"/var/www/html/lib/private/Updater.php","line":321,"function":"migrate","class":"OC\\DB\\MigrationService","type":"->","args":[]},{"file":"/var/www/html/lib/private/Updater.php","line":260,"function":"doCoreUpgrade","class":"OC\\Updater","type":"->","args":[]},{"file":"/var/www/html/lib/private/Updater.php","line":139,"function":"doUpgrade","class":"OC\\Updater","type":"->","args":["27.1.6.2","27.0.2.1"]},{"file":"/var/www/html/core/Command/Upgrade.php","line":225,"function":"upgrade","class":"OC\\Updater","type":"->","args":[]},{"file":"/var/www/html/3rdparty/symfony/console/Command/Command.php","line":298,"function":"execute","class":"OC\\Core\\Command\\Upgrade","type":"->","args":[["Symfony\\Component\\Console\\Input\\ArgvInput"],["Symfony\\Component\\Console\\Output\\ConsoleOutput"]]},{"file":"/var/www/html/3rdparty/symfony/console/Application.php","line":1040,"function":"run","class":"Symfony\\Component\\Console\\Command\\Command","type":"->","args":[["Symfony\\Component\\Console\\Input\\ArgvInput"],["Symfony\\Component\\Console\\Output\\ConsoleOutput"]]},{"file":"/var/www/html/3rdparty/symfony/console/Application.php","line":301,"function":"doRunCommand","class":"Symfony\\Component\\Console\\Application","type":"->","args":[["OC\\Core\\Command\\Upgrade"],["Symfony\\Component\\Console\\Input\\ArgvInput"],["Symfony\\Component\\Console\\Output\\ConsoleOutput"]]},{"file":"/var/www/html/3rdparty/symfony/console/Application.php","line":171,"function":"doRun","class":"Symfony\\Component\\Console\\Application","type":"->","args":[["Symfony\\Component\\Console\\Input\\ArgvInput"],["Symfony\\Component\\Console\\Output\\ConsoleOutput"]]},{"file":"/var/www/html/lib/private/Console/Application.php","line":211,"function":"run","class":"Symfony\\Component\\Console\\Application","type":"->","args":[["Symfony\\Component\\Console\\Input\\ArgvInput"],["Symfony\\Component\\Console\\Output\\ConsoleOutput"]]},{"file":"/var/www/html/console.php","line":100,"function":"run","class":"OC\\Console\\Application","type":"->","args":[]},{"file":"/var/www/html/occ","line":11,"args":["/var/www/html/console.php"],"function":"require_once"}],"File":"/var/www/html/lib/private/DB/MigrationService.php","Line":422,"Previous":{"Exception":"Doctrine\\DBAL\\Exception\\DriverException","Message":"An exception occurred while executing a query: SQLSTATE[42S02]: Base table or view not found: 1932 Table 'owncloud.oc_textprocessing_tasks' doesn't exist in engine","Code":1932,"Trace":[{"file":"/var/www/html/3rdparty/doctrine/dbal/src/Connection.php","line":1814,"function":"convert","class":"Doctrine\\DBAL\\Driver\\API\\MySQL\\ExceptionConverter","type":"->","args":[["Doctrine\\DBAL\\Driver\\PDO\\Exception"],["Doctrine\\DBAL\\Query"]]},{"file":"/var/www/html/3rdparty/doctrine/dbal/src/Connection.php","line":1749,"function":"handleDriverException","class":"Doctrine\\DBAL\\Connection","type":"->","args":[["Doctrine\\DBAL\\Driver\\PDO\\Exception"],["Doctrine\\DBAL\\Query"]]},{"file":"/var/www/html/3rdparty/doctrine/dbal/src/Connection.php","line":1055,"function":"convertExceptionDuringQuery","class":"Doctrine\\DBAL\\Connection","type":"->","args":[["Doctrine\\DBAL\\Driver\\PDO\\Exception"],"CREATE INDEX tp_tasks_uid_appid_ident ON oc_textprocessing_tasks (user_id, app_id, identifier)",[],[]]},{"file":"/var/www/html/lib/private/DB/Connection.php","line":262,"function":"executeQuery","class":"Doctrine\\DBAL\\Connection","type":"->","args":["CREATE INDEX tp_tasks_uid_appid_ident ON oc_textprocessing_tasks (user_id, app_id, identifier)",[],[],null]},{"file":"/var/www/html/3rdparty/doctrine/dbal/src/Connection.php","line":1843,"function":"executeQuery","class":"OC\\DB\\Connection","type":"->","args":["CREATE INDEX tp_tasks_uid_appid_ident ON oc_textprocessing_tasks (user_id, app_id, identifier)"]},{"file":"/var/www/html/lib/private/DB/Migrator.php","line":162,"function":"query","class":"Doctrine\\DBAL\\Connection","type":"->","args":["CREATE INDEX tp_tasks_uid_appid_ident ON oc_textprocessing_tasks (user_id, app_id, identifier)"]},{"file":"/var/www/html/lib/private/DB/Migrator.php","line":68,"function":"applySchema","class":"OC\\DB\\Migrator","type":"->","args":[["Doctrine\\DBAL\\Schema\\Schema"]]},{"file":"/var/www/html/lib/private/DB/Connection.php","line":589,"function":"migrate","class":"OC\\DB\\Migrator","type":"->","args":[["Doctrine\\DBAL\\Schema\\Schema"]]},{"file":"/var/www/html/lib/private/DB/MigrationService.php","line":538,"function":"migrateToSchema","class":"OC\\DB\\Connection","type":"->","args":[["Doctrine\\DBAL\\Schema\\Schema"]]},{"file":"/var/www/html/lib/private/DB/MigrationService.php","line":418,"function":"executeStep","class":"OC\\DB\\MigrationService","type":"->","args":["28000Date20230803221055",false]},{"file":"/var/www/html/lib/private/Updater.php","line":321,"function":"migrate","class":"OC\\DB\\MigrationService","type":"->","args":[]},{"file":"/var/www/html/lib/private/Updater.php","line":260,"function":"doCoreUpgrade","class":"OC\\Updater","type":"->","args":[]},{"file":"/var/www/html/lib/private/Updater.php","line":139,"function":"doUpgrade","class":"OC\\Updater","type":"->","args":["27.1.6.2","27.0.2.1"]},{"file":"/var/www/html/core/Command/Upgrade.php","line":225,"function":"upgrade","class":"OC\\Updater","type":"->","args":[]},{"file":"/var/www/html/3rdparty/symfony/console/Command/Command.php","line":298,"function":"execute","class":"OC\\Core\\Command\\Upgrade","type":"->","args":[["Symfony\\Component\\Console\\Input\\ArgvInput"],["Symfony\\Component\\Console\\Output\\ConsoleOutput"]]},{"file":"/var/www/html/3rdparty/symfony/console/Application.php","line":1040,"function":"run","class":"Symfony\\Component\\Console\\Command\\Command","type":"->","args":[["Symfony\\Component\\Console\\Input\\ArgvInput"],["Symfony\\Component\\Console\\Output\\ConsoleOutput"]]},{"file":"/var/www/html/3rdparty/symfony/console/Application.php","line":301,"function":"doRunCommand","class":"Symfony\\Component\\Console\\Application","type":"->","args":[["OC\\Core\\Command\\Upgrade"],["Symfony\\Component\\Console\\Input\\ArgvInput"],["Symfony\\Component\\Console\\Output\\ConsoleOutput"]]},{"file":"/var/www/html/3rdparty/symfony/console/Application.php","line":171,"function":"doRun","class":"Symfony\\Component\\Console\\Application","type":"->","args":[["Symfony\\Component\\Console\\Input\\ArgvInput"],["Symfony\\Component\\Console\\Output\\ConsoleOutput"]]},{"file":"/var/www/html/lib/private/Console/Application.php","line":211,"function":"run","class":"Symfony\\Component\\Console\\Application","type":"->","args":[["Symfony\\Component\\Console\\Input\\ArgvInput"],["Symfony\\Component\\Console\\Output\\ConsoleOutput"]]},{"file":"/var/www/html/console.php","line":100,"function":"run","class":"OC\\Console\\Application","type":"->","args":[]},{"file":"/var/www/html/occ","line":11,"args":["/var/www/html/console.php"],"function":"require_once"}],"File":"/var/www/html/3rdparty/doctrine/dbal/src/Driver/API/MySQL/ExceptionConverter.php","Line":119,"Previous":{"Exception":"Doctrine\\DBAL\\Driver\\PDO\\Exception","Message":"SQLSTATE[42S02]: Base table or view not found: 1932 Table 'owncloud.oc_textprocessing_tasks' doesn't exist in engine","Code":1932,"Trace":[{"file":"/var/www/html/3rdparty/doctrine/dbal/src/Driver/PDO/Connection.php","line":77,"function":"new","class":"Doctrine\\DBAL\\Driver\\PDO\\Exception","type":"::","args":[["PDOException",["42S02",1932,"Table 'owncloud.oc_textprocessing_tasks' doesn't exist in engine"]]]},{"file":"/var/www/html/3rdparty/doctrine/dbal/src/Connection.php","line":1050,"function":"query","class":"Doctrine\\DBAL\\Driver\\PDO\\Connection","type":"->","args":["CREATE INDEX tp_tasks_uid_appid_ident ON oc_textprocessing_tasks (user_id, app_id, identifier)"]},{"file":"/var/www/html/lib/private/DB/Connection.php","line":262,"function":"executeQuery","class":"Doctrine\\DBAL\\Connection","type":"->","args":["CREATE INDEX tp_tasks_uid_appid_ident ON oc_textprocessing_tasks (user_id, app_id, identifier)",[],[],null]},{"file":"/var/www/html/3rdparty/doctrine/dbal/src/Connection.php","line":1843,"function":"executeQuery","class":"OC\\DB\\Connection","type":"->","args":["CREATE INDEX tp_tasks_uid_appid_ident ON oc_textprocessing_tasks (user_id, app_id, identifier)"]},{"file":"/var/www/html/lib/private/DB/Migrator.php","line":162,"function":"query","class":"Doctrine\\DBAL\\Connection","type":"->","args":["CREATE INDEX tp_tasks_uid_appid_ident ON oc_textprocessing_tasks (user_id, app_id, identifier)"]},{"file":"/var/www/html/lib/private/DB/Migrator.php","line":68,"function":"applySchema","class":"OC\\DB\\Migrator","type":"->","args":[["Doctrine\\DBAL\\Schema\\Schema"]]},{"file":"/var/www/html/lib/private/DB/Connection.php","line":589,"function":"migrate","class":"OC\\DB\\Migrator","type":"->","args":[["Doctrine\\DBAL\\Schema\\Schema"]]},{"file":"/var/www/html/lib/private/DB/MigrationService.php","line":538,"function":"migrateToSchema","class":"OC\\DB\\Connection","type":"->","args":[["Doctrine\\DBAL\\Schema\\Schema"]]},{"file":"/var/www/html/lib/private/DB/MigrationService.php","line":418,"function":"executeStep","class":"OC\\DB\\MigrationService","type":"->","args":["28000Date20230803221055",false]},{"file":"/var/www/html/lib/private/Updater.php","line":321,"function":"migrate","class":"OC\\DB\\MigrationService","type":"->","args":[]},{"file":"/var/www/html/lib/private/Updater.php","line":260,"function":"doCoreUpgrade","class":"OC\\Updater","type":"->","args":[]},{"file":"/var/www/html/lib/private/Updater.php","line":139,"function":"doUpgrade","class":"OC\\Updater","type":"->","args":["27.1.6.2","27.0.2.1"]},{"file":"/var/www/html/core/Command/Upgrade.php","line":225,"function":"upgrade","class":"OC\\Updater","type":"->","args":[]},{"file":"/var/www/html/3rdparty/symfony/console/Command/Command.php","line":298,"function":"execute","class":"OC\\Core\\Command\\Upgrade","type":"->","args":[["Symfony\\Component\\Console\\Input\\ArgvInput"],["Symfony\\Component\\Console\\Output\\ConsoleOutput"]]},{"file":"/var/www/html/3rdparty/symfony/console/Application.php","line":1040,"function":"run","class":"Symfony\\Component\\Console\\Command\\Command","type":"->","args":[["Symfony\\Component\\Console\\Input\\ArgvInput"],["Symfony\\Component\\Console\\Output\\ConsoleOutput"]]},{"file":"/var/www/html/3rdparty/symfony/console/Application.php","line":301,"function":"doRunCommand","class":"Symfony\\Component\\Console\\Application","type":"->","args":[["OC\\Core\\Command\\Upgrade"],["Symfony\\Component\\Console\\Input\\ArgvInput"],["Symfony\\Component\\Console\\Output\\ConsoleOutput"]]},{"file":"/var/www/html/3rdparty/symfony/console/Application.php","line":171,"function":"doRun","class":"Symfony\\Component\\Console\\Application","type":"->","args":[["Symfony\\Component\\Console\\Input\\ArgvInput"],["Symfony\\Component\\Console\\Output\\ConsoleOutput"]]},{"file":"/var/www/html/lib/private/Console/Application.php","line":211,"function":"run","class":"Symfony\\Component\\Console\\Application","type":"->","args":[["Symfony\\Component\\Console\\Input\\ArgvInput"],["Symfony\\Component\\Console\\Output\\ConsoleOutput"]]},{"file":"/var/www/html/console.php","line":100,"function":"run","class":"OC\\Console\\Application","type":"->","args":[]},{"file":"/var/www/html/occ","line":11,"args":["/var/www/html/console.php"],"function":"require_once"}],"File":"/var/www/html/3rdparty/doctrine/dbal/src/Driver/PDO/Exception.php","Line":30,"Previous":{"Exception":"PDOException","Message":"SQLSTATE[42S02]: Base table or view not found: 1932 Table 'owncloud.oc_textprocessing_tasks' doesn't exist in engine","Code":"42S02","Trace":[{"file":"/var/www/html/3rdparty/doctrine/dbal/src/Driver/PDO/Connection.php","line":72,"function":"query","class":"PDO","type":"->","args":["CREATE INDEX tp_tasks_uid_appid_ident ON oc_textprocessing_tasks (user_id, app_id, identifier)"]},{"file":"/var/www/html/3rdparty/doctrine/dbal/src/Connection.php","line":1050,"function":"query","class":"Doctrine\\DBAL\\Driver\\PDO\\Connection","type":"->","args":["CREATE INDEX tp_tasks_uid_appid_ident ON oc_textprocessing_tasks (user_id, app_id, identifier)"]},{"file":"/var/www/html/lib/private/DB/Connection.php","line":262,"function":"executeQuery","class":"Doctrine\\DBAL\\Connection","type":"->","args":["CREATE INDEX tp_tasks_uid_appid_ident ON oc_textprocessing_tasks (user_id, app_id, identifier)",[],[],null]},{"file":"/var/www/html/3rdparty/doctrine/dbal/src/Connection.php","line":1843,"function":"executeQuery","class":"OC\\DB\\Connection","type":"->","args":["CREATE INDEX tp_tasks_uid_appid_ident ON oc_textprocessing_tasks (user_id, app_id, identifier)"]},{"file":"/var/www/html/lib/private/DB/Migrator.php","line":162,"function":"query","class":"Doctrine\\DBAL\\Connection","type":"->","args":["CREATE INDEX tp_tasks_uid_appid_ident ON oc_textprocessing_tasks (user_id, app_id, identifier)"]},{"file":"/var/www/html/lib/private/DB/Migrator.php","line":68,"function":"applySchema","class":"OC\\DB\\Migrator","type":"->","args":[["Doctrine\\DBAL\\Schema\\Schema"]]},{"file":"/var/www/html/lib/private/DB/Connection.php","line":589,"function":"migrate","class":"OC\\DB\\Migrator","type":"->","args":[["Doctrine\\DBAL\\Schema\\Schema"]]},{"file":"/var/www/html/lib/private/DB/MigrationService.php","line":538,"function":"migrateToSchema","class":"OC\\DB\\Connection","type":"->","args":[["Doctrine\\DBAL\\Schema\\Schema"]]},{"file":"/var/www/html/lib/private/DB/MigrationService.php","line":418,"function":"executeStep","class":"OC\\DB\\MigrationService","type":"->","args":["28000Date20230803221055",false]},{"file":"/var/www/html/lib/private/Updater.php","line":321,"function":"migrate","class":"OC\\DB\\MigrationService","type":"->","args":[]},{"file":"/var/www/html/lib/private/Updater.php","line":260,"function":"doCoreUpgrade","class":"OC\\Updater","type":"->","args":[]},{"file":"/var/www/html/lib/private/Updater.php","line":139,"function":"doUpgrade","class":"OC\\Updater","type":"->","args":["27.1.6.2","27.0.2.1"]},{"file":"/var/www/html/core/Command/Upgrade.php","line":225,"function":"upgrade","class":"OC\\Updater","type":"->","args":[]},{"file":"/var/www/html/3rdparty/symfony/console/Command/Command.php","line":298,"function":"execute","class":"OC\\Core\\Command\\Upgrade","type":"->","args":[["Symfony\\Component\\Console\\Input\\ArgvInput"],["Symfony\\Component\\Console\\Output\\ConsoleOutput"]]},{"file":"/var/www/html/3rdparty/symfony/console/Application.php","line":1040,"function":"run","class":"Symfony\\Component\\Console\\Command\\Command","type":"->","args":[["Symfony\\Component\\Console\\Input\\ArgvInput"],["Symfony\\Component\\Console\\Output\\ConsoleOutput"]]},{"file":"/var/www/html/3rdparty/symfony/console/Application.php","line":301,"function":"doRunCommand","class":"Symfony\\Component\\Console\\Application","type":"->","args":[["OC\\Core\\Command\\Upgrade"],["Symfony\\Component\\Console\\Input\\ArgvInput"],["Symfony\\Component\\Console\\Output\\ConsoleOutput"]]},{"file":"/var/www/html/3rdparty/symfony/console/Application.php","line":171,"function":"doRun","class":"Symfony\\Component\\Console\\Application","type":"->","args":[["Symfony\\Component\\Console\\Input\\ArgvInput"],["Symfony\\Component\\Console\\Output\\ConsoleOutput"]]},{"file":"/var/www/html/lib/private/Console/Application.php","line":211,"function":"run","class":"Symfony\\Component\\Console\\Application","type":"->","args":[["Symfony\\Component\\Console\\Input\\ArgvInput"],["Symfony\\Component\\Console\\Output\\ConsoleOutput"]]},{"file":"/var/www/html/console.php","line":100,"function":"run","class":"OC\\Console\\Application","type":"->","args":[]},{"file":"/var/www/html/occ","line":11,"args":["/var/www/html/console.php"],"function":"require_once"}],"File":"/var/www/html/3rdparty/doctrine/dbal/src/Driver/PDO/Connection.php","Line":72}}},"message":"Database error when running migration 28000Date20230803221055 for app core\nAn exception occurred while executing a query: SQLSTATE[42S02]: Base table or view not found: 1932 Table 'owncloud.oc_textprocessing_tasks' doesn't exist in engine","exception":{},"CustomMessage":"Database error when running migration 28000Date20230803221055 for app core\nAn exception occurred while executing a query: SQLSTATE[42S02]: Base table or view not found: 1932 Table 'owncloud.oc_textprocessing_tasks' doesn't exist in engine"}}
{"reqId":"vv0OV5tFgiANizHMr8Vl","level":3,"time":"2024-03-02T21:35:31+00:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"/occ","message":"\\OC\\Updater::failure: Exception: Database error when running migration 28000Date20230803221055 for app core\nAn exception occurred while executing a query: SQLSTATE[42S02]: Base table or view not found: 1932 Table 'owncloud.oc_textprocessing_tasks' doesn't exist in engine","userAgent":"--","version":"27.0.2.1","data":{"app":"updater"}}
{"reqId":"vv0OV5tFgiANizHMr8Vl","level":3,"time":"2024-03-02T21:35:31+00:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"/occ","message":"\\OC\\Updater::updateEnd: Update failed","userAgent":"--","version":"27.0.2.1","data":{"app":"updater"}}
{"reqId":"vv0OV5tFgiANizHMr8Vl","level":1,"time":"2024-03-02T21:35:31+00:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"/occ","message":"\\OC\\Updater::maintenanceActive: Maintenance mode is kept active","userAgent":"--","version":"27.0.2.1","data":{"app":"updater"}}
{"reqId":"vv0OV5tFgiANizHMr8Vl","level":1,"time":"2024-03-02T21:35:31+00:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"/occ","message":"\\OC\\Updater::resetLogLevel: Reset log level to Debug(0)","userAgent":"--","version":"27.0.2.1","data":{"app":"updater"}}

Additional info

No response

joshtrichards commented 6 months ago

creates the table by itself or omits the table if not necessary

The migration failing in your environment only runs if that table already exists:

https://github.com/nextcloud/server/blob/b6edd4382ec3abe496ac7dedcbe5695a5b6e9c0d/core/Migrations/Version28000Date20230803221055.php#L49

And there is an earlier migration that creates the table if it doesn't exist:

https://github.com/nextcloud/server/blob/a58ed05f1d19d591a1ed384e87915db952c5f163/core/Migrations/Version28000Date20230728104802.php#L54-L55

Any chance you've attempted an update in the past to at least v27.1.0 of this environment, but then maybe rolled it back somehow?

Table 'owncloud.oc_textprocessing_tasks' doesn't exist in engine

This sounds to me like something is going on with your underlying database as stored on-disk. Any chance you've moved database servers or moved your database files around or done a restore at some point since v27.0 and v27.1 was released?

It might be interesting to see the output of NC_debug=true ./occ migrations:status core, but if it's a db restore/move issue it's outside the scope of Nextcloud's own migrations.

GregorB54321 commented 5 months ago

Hi Josh, I was sometime struggling with the upgrade procedures. I opened some tickets or got the solution in this way.

I rolled back always to a backup of the whole installation (DB+data+execs). Maybe up to 25. "rolling back" was more a copying the old data on top the newer data. This way may files not existing in backup could have survived in the "rolled back" environment. Migration to 26., 27.0 and 27.1 I deleted also all files that where not available in the backup. Used rsync -av --delete --progress /volume1/docker/#snapshot/SNAPSHOT-TIMESTAMP/container-data/nextcloud-* /volume1/docker/container-data/ to restore all containers from snapshot.

www-data@7e3dac9dd76e:~/html$ NC_debug=true ./occ migrations:status core
    >> App:                                                core
    >> Version Table Name:                                 oc_migrations
    >> Migrations Namespace:                               OC\Core\Migrations
    >> Migrations Directory:                               /var/www/html/core/Migrations
    >> Previous Version:                                   27000Date20230309104325
    >> Current Version:                                    27000Date20230309104802
    >> Next Version:                                       Already at latest migration step
    >> Latest Version:                                     27000Date20230309104802
    >> Executed Migrations:                                57
    >> Executed Unavailable Migrations:                    57
    >> Available Migrations:                               56
    >> New Migrations:                                     56
    >> Pending Migrations:                                 None
www-data@7e3dac9dd76e:~/html$ 

Would it be a solution to do the upgrade steps again one by one manually?

GregorB54321 commented 5 months ago

okay... In phpmyadmin I saw, that that table was "in use". Latest modification timestamp is 4month ago. unfortunately I dont have such an old backup. So I copied/backed the tables .frm & .ibd files up and dropped the table via sql. The origin *.ibd did not vanish and I removed it. so hopefully it is clean now so far.

Then I recreated that table with:

CREATE TABLE
  `owncloud`.`oc_textprocessing_tasks`
  (
    `id`           BIGINT(64) NOT NULL AUTO_INCREMENT        ,
    `type`         VARCHAR(255) NOT NULL                     ,
    `input`        TEXT NOT NULL                             ,
    `output`       TEXT NULL                                 ,
    `status`       INT(6) NULL DEFAULT '0'                   ,
    `user_id`      VARCHAR(64) NOT NULL                      ,
    `app_id`       VARCHAR(32) NOT NULL DEFAULT ''           ,
    `identifier`   VARCHAR(255) NOT NULL DEFAULT ''          ,
    `last_updated` INT(4) UNSIGNED NULL                      ,
    PRIMARY KEY (`id`)                                       ,
    INDEX `tp_tasks_id_index` (`id`)                         ,
    INDEX `tp_tasks_updated` (`last_updated`)                ,
    INDEX `tp_tasks_status_type_nonunique` (`status`,`type`) 
  )
  ENGINE = InnoDB;

compared the disfunctional-table-backups with the newly created ones (via hexdump): only few bytes changed, obviously the table was still empty before.

stopped the instance & db, took new snapshot and retried the upgrade to 27.1... Et voilá, upgrade was possible... :-)

Thank you Josh for pointing to the right direction!