nextcloud / server

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

[Bug]: Upgrade to 28.0.2 failed #43343

Closed HelmutMayer closed 9 months ago

HelmutMayer commented 9 months ago

⚠️ This issue respects the following points: ⚠️

Bug description

Upgrade function failed and asked me to report the following to the Nexcloud forum:

Update to 28.0.2

Exception: Database error when running migration 28000Date20230906104802 for app core Index name "phonetrack_deviceid_index" for table "oc_phonetrack_points" collides with the constraint on table "oc_phonetrack_points_20220924". Detailed logs

Preparing update

Set log level to debug

Turned on maintenance mode

Repair step: Repair MySQL collation

Repair info: All tables already have the correct collation -> nothing to do

Repair step: Copy data from accounts table when migrating from ownCloud

Repair step: Drop account terms table when migrating from ownCloud

Updating database schema

Exception: Database error when running migration 28000Date20230906104802 for app core Index name "phonetrack_deviceid_index" for table "oc_phonetrack_points" collides with the constraint on table "oc_phonetrack_points_20220924".

Steps to reproduce

  1. Run upgrade from interface from Nextcloud 27
  2. Turn off maintenance mode and complete upgrade
  3. Upgrade fails

Expected behavior

Upgrade suceeds and interface returns to the new dashbaord

Installation method

Community Manual installation with Archive

Nextcloud Server version

27

Operating system

Debian/Ubuntu

PHP engine version

PHP 8.2

Web server

Apache (supported)

Database engine version

MariaDB

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

Upgraded to a MAJOR version (ex. 22 to 23)

Are you using the Nextcloud Server Encryption module?

Encryption is Disabled

What user-backends are you using?

Configuration report

PHP Warning:  Module "apcu" is already loaded in Unknown on line 0
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": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "nc.foreversorted.com",
            "193.114.128.164",
            "nc.mayermastery.com"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "overwrite.cli.url": "https:\/\/nc.foreversorted.com",
        "dbtype": "mysql",
        "version": "27.1.6.2",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "maintenance": true,
        "theme": "",
        "mail_smtpmode": "smtp",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "ldapIgnoreNamingRules": false,
        "ldapProviderFactory": "\\OCA\\User_LDAP\\LDAPProviderFactory",
        "updater.release.channel": "stable",
        "mysql.utf8mb4": true,
        "app_install_overwrite": [
            "calendar",
            "external",
            "mindmaps",
            "ocsms",
            "mail",
            "spreed",
            "carnet",
            "foreversorted",
            "files_accesscontrol",
            "audioplayer_sonos",
            "documentserver_community"
        ],
        "activity_expire_days": 14,
        "auth.bruteforce.protection.enabled": true,
        "blacklisted_files": [
            ".htaccess",
            "Thumbs.db",
            "thumbs.db"
        ],
        "cron_log": true,
        "enable_previews": true,
        "enabledPreviewProviders": [
            "OC\\Preview\\PNG",
            "OC\\Preview\\JPEG",
            "OC\\Preview\\GIF",
            "OC\\Preview\\BMP",
            "OC\\Preview\\XBitmap",
            "OC\\Preview\\Movie",
            "OC\\Preview\\PDF",
            "OC\\Preview\\MP3",
            "OC\\Preview\\TXT",
            "OC\\Preview\\MarkDown"
        ],
        "filesystem_check_changes": 1,
        "filelocking.enabled": "true",
        "htaccess.RewriteBase": "\/",
        "integrity.check.disabled": false,
        "knowledgebaseenabled": false,
        "logfile": "\/home\/shared\/nc\/nextcloud.log",
        "loglevel": 0,
        "logtimezone": "Australia\/Sydney",
        "log_rotate_size": 104857600,
        "memcache.local": "\\OC\\Memcache\\APCu",
        "overwriteprotocol": "https",
        "preview_max_x": 1024,
        "preview_max_y": 768,
        "preview_max_scale_factor": 1,
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 0,
            "timeout": 0
        },
        "quota_include_external_storage": false,
        "share_folder": "\/Shares",
        "skeletondirectory": "",
        "trashbin_retention_obligation": "auto, 7",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_sendmailmode": "smtp",
        "mail_smtpport": "25",
        "default_phone_region": "AU",
        "has_rebuilt_cache": true,
        "updater.secret": "***REMOVED SENSITIVE VALUE***"
    }
}
PHP Warning:  Module "apcu" is already loaded in Unknown on line 0
Console has to be executed with the user that owns the file config/config.php
Current user id: 0
Owner id of config.php: 33
Try adding 'sudo -u #33' to the beginning of the command (without the single quotes)
If running with 'docker exec' try adding the option '-u 33' to the docker command (without the single quotes)
-bash: ./occ: Permission denied

List of activated Apps

php occ app:list
./occ app:list
PHP Warning:  Module "apcu" is already loaded in Unknown on line 0
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
  - admin_audit: 1.17.0
  - calendar: 4.6.4
  - cloud_federation_api: 1.10.0
  - contacts: 5.5.1
  - contactsinteraction: 1.8.0
  - dashboard: 7.7.0
  - dav: 1.27.0
  - deck: 1.11.3
  - federatedfilesharing: 1.17.0
  - federation: 1.17.0
  - files: 1.22.0
  - files_accesscontrol: 1.17.1
  - files_external: 1.19.0
  - files_pdfviewer: 2.8.0
  - files_reminders: 1.0.0
  - files_sharing: 1.19.0
  - files_trashbin: 1.17.0
  - files_versions: 1.20.0
  - firstrunwizard: 2.16.0
  - foreversorted: 0.0.1
  - logreader: 2.12.0
  - lookup_server_connector: 1.15.0
  - mail: 3.5.5
  - maps: 1.2.0
  - nextcloud_announcements: 1.16.0
  - notifications: 2.15.0
  - oauth2: 1.15.2
  - onlyoffice: 8.2.4
  - password_policy: 1.17.0
  - phonetrack: 0.7.7
  - photos: 2.3.0
  - privacy: 1.11.0
  - provisioning_api: 1.17.0
  - recommendations: 1.6.0
  - related_resources: 1.2.0
  - serverinfo: 1.17.0
  - settings: 1.9.0
  - sharebymail: 1.17.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
  - 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:
  - audioplayer_sonos: 1.3.0 (installed 1.3.0)
  - bruteforcesettings: 2.8.0
  - carnet: 0.25.2 (installed 0.25.2)
  - circles: 28.0.0-dev (installed 22.1.1)
  - comments: 1.18.0 (installed 1.17.0)
  - documentserver_community: 0.1.13 (installed 0.1.13)
  - encryption: 2.16.0
  - external: 5.2.1 (installed 5.2.1)
  - files_mindmap: 0.0.30 (installed 0.0.30)
  - groupfolders: 15.3.4 (installed 15.3.4)
  - ldap_write_support: 1.9.0 (installed 1.6.0)
  - libresign: 7.1.1 (installed 7.1.1)
  - notes: 4.9.2 (installed 4.9.2)
  - ocsms: 2.2.0 (installed 2.2.0)
  - spreed: 17.1.5 (installed 17.1.5)
  - suspicious_login: 6.0.0
  - twofactor_totp: 10.0.0-beta.2
  - user_ldap: 1.19.0 (installed 1.12.0)
PHP Warning:  Module "apcu" is already loaded in Unknown on line 0
Console has to be executed with the user that owns the file config/config.php
Current user id: 0
Owner id of config.php: 33
Try adding 'sudo -u #33' to the beginning of the command (without the single quotes)
If running with 'docker exec' try adding the option '-u 33' to the docker command (without the single quotes)
-bash: ./occ: Permission denied

Nextcloud Signing status

Won't let me

Nextcloud Logs

root@homewww:/home/shared/webpages/nextcloud/html/data# cat nextcloud.log
{"reqId":"KfBewGNsB70e73iZDLvp","level":3,"time":"2017-11-17T05:39:10+00:00","remoteAddr":"172.20.8.30","user":"--","app":"appstoreFetcher","method":"POST","url":"\/index.php","message":"Exception: {\"Exception\":\"GuzzleHttp\\\\Exception\\\\ConnectException\",\"Message\":\"cURL error 28: Operation timed out after 9997 milliseconds with 180224 out of 755524 bytes received\",\"Code\":0,\"Trace\":\"#0 \\\/home\\\/shared\\\/webpages\\\/nextcloud\\\/html\\\/3rdparty\\\/guzzlehttp\\\/guzzle\\\/src\\\/RequestFsm.php(104): GuzzleHttp\\\\Exception\\\\RequestException::wrapException(Object(GuzzleHttp\\\\Message\\\\Request), Object(GuzzleHttp\\\\Ring\\\\Exception\\\\ConnectException))\\n#1 \\\/home\\\/shared\\\/webpages\\\/nextcloud\\\/html\\\/3rdparty\\\/guzzlehttp\\\/guzzle\\\/src\\\/RequestFsm.php(132): GuzzleHttp\\\\RequestFsm->__invoke(Object(GuzzleHttp\\\\Transaction))\\n#2 \\\/home\\\/shared\\\/webpages\\\/nextcloud\\\/html\\\/3rdparty\\\/react\\\/promise\\\/src\\\/FulfilledPromise.php(25): GuzzleHttp\\\\RequestFsm->GuzzleHttp\\\\{closure}(Array)\\n#3 \\\/home\\\/shared\\\/webpages\\\/nextcloud\\\/html\\\/3rdparty\\\/guzzlehttp\\\/ringphp\\\/src\\\/Future\\\/CompletedFutureValue.php(55): React\\\\Promise\\\\FulfilledPromise->then(Object(Closure), NULL, NULL)\\n#4 \\\/home\\\/shared\\\/webpages\\\/nextcloud\\\/html\\\/3rdparty\\\/guzzlehttp\\\/guzzle\\\/src\\\/Message\\\/FutureResponse.php(43): GuzzleHttp\\\\Ring\\\\Future\\\\CompletedFutureValue->then(Object(Closure), NULL, NULL)\\n#5 \\\/home\\\/shared\\\/webpages\\\/nextcloud\\\/html\\\/3rdparty\\\/guzzlehttp\\\/guzzle\\\/src\\\/RequestFsm.php(135): GuzzleHttp\\\\Message\\\\FutureResponse::proxy(Object(GuzzleHttp\\\\Ring\\\\Future\\\\CompletedFutureArray), Object(Closure))\\n#6 \\\/home\\\/shared\\\/webpages\\\/nextcloud\\\/html\\\/3rdparty\\\/guzzlehttp\\\/guzzle\\\/src\\\/Client.php(165): GuzzleHttp\\\\RequestFsm->__invoke(Object(GuzzleHttp\\\\Transaction))\\n#7 \\\/home\\\/shared\\\/webpages\\\/nextcloud\\\/html\\\/3rdparty\\\/guzzlehttp\\\/guzzle\\\/src\\\/Client.php(125): GuzzleHttp\\\\Client->send(Object(GuzzleHttp\\\\Message\\\\Request))\\n#8 \\\/home\\\/shared\\\/webpages\\\/nextcloud\\\/html\\\/lib\\\/private\\\/Http\\\/Client\\\/Client.php(138): GuzzleHttp\\\\Client->get('https:\\\/\\\/apps.ne...', Array)\\n#9 \\\/home\\\/shared\\\/webpages\\\/nextcloud\\\/html\\\/lib\\\/private\\\/App\\\/AppStore\\\/Fetcher\\\/Fetcher.php(99): OC\\\\Http\\\\Client\\\\Client->get('https:\\\/\\\/apps.ne...', Array)\\n#10 \\\/home\\\/shared\\\/webpages\\\/nextcloud\\\/html\\\/lib\\\/private\\\/App\\\/AppStore\\\/Fetcher\\\/AppFetcher.php(66): OC\\\\App\\\\AppStore\\\\Fetcher\\\\Fetcher->fetch('', '')\\n#11 \\\/home\\\/shared\\\/webpages\\\/nextcloud\\\/html\\\/lib\\\/private\\\/App\\\/AppStore\\\/Fetcher\\\/Fetcher.php(162): OC\\\\App\\\\AppStore\\\\Fetcher\\\\AppFetcher->fetch('', '')\\n#12 \\\/home\\\/shared\\\/webpages\\\/nextcloud\\\/html\\\/lib\\\/private\\\/Installer.php(216): OC\\\\App\\\\AppStore\\\\Fetcher\\\\Fetcher->get()\\n#13 \\\/home\\\/shared\\\/webpages\\\/nextcloud\\\/html\\\/lib\\\/private\\\/Installer.php(468): OC\\\\Installer->downloadApp('bruteforcesetti...')\\n#14 \\\/home\\\/shared\\\/webpages\\\/nextcloud\\\/html\\\/lib\\\/private\\\/Setup.php(382): OC\\\\Installer->installAppBundle(Object(OC\\\\App\\\\AppStore\\\\Bundles\\\\CoreBundle))\\n#15 \\\/home\\\/shared\\\/webpages\\\/nextcloud\\\/html\\\/core\\\/Controller\\\/SetupController.php(65): OC\\\\Setup->install(Array)\\n#16 \\\/home\\\/shared\\\/webpages\\\/nextcloud\\\/html\\\/lib\\\/base.php(951): OC\\\\Core\\\\Controller\\\\SetupController->run(Array)\\n#17 \\\/home\\\/shared\\\/webpages\\\/nextcloud\\\/html\\\/index.php(48): OC::handleRequest()\\n#18 {main}\",\"File\":\"\\\/home\\\/shared\\\/webpages\\\/nextcloud\\\/html\\\/3rdparty\\\/guzzlehttp\\\/guzzle\\\/src\\\/Exception\\\/RequestException.php\",\"Line\":49}","userAgent":"Mozilla\/5.0 (Windows NT 10.0; Win64; x64; rv:56.0) Gecko\/20100101 Firefox\/56.0","version":"12.0.3.3"}
root@homewww:/home/shared/webpages/nextcloud/html/data#

Additional info

No response

solracsf commented 9 months ago

Duplicate of https://github.com/nextcloud/server/issues/41253