nextcloud / server

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

[Bug]: Manual upgrade to 28.0.6.1 prompts this error #45504

Closed ncheng89 closed 5 months ago

ncheng89 commented 5 months ago

⚠️ This issue respects the following points: ⚠️

Bug description

Downgrading is not supported and is likely to cause unpredictable issues (from 28.0.6.1 to 28.0.5.1)

Steps to reproduce

from 28.0.6.1 to 28.0.5.1

Expected behavior

Manual upgrade to 28.0.6.1 prompts this error. I did not downgrade but upgrade. Why does this prompt appear? How should I solve it?

Installation method

Community Manual installation with Archive

Nextcloud Server version

28

Operating system

RHEL/CentOS

PHP engine version

PHP 8.2

Web server

Nginx

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?

None

What user-backends are you using?

Configuration report

{
    "system": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "***.com",
        ],
        "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "28.0.6.1",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "default_language": "zh_CN",
        "default_locale": "zh",
        "default_phone_region": "CN",
        "default_timezone": "Asia\/Shanghai",
        "memcache.local": "\\OC\\Memcache\\Redis",
        "memcache.distributed": "\\OC\\Memcache\\Redis",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "preview_ffmpeg_path": "\/usr\/bin\/ffmpeg",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 6379,
            "timeout": 0,
            "read_timeout": 0
        },
        "enabledPreviewProviders": [
            "OC\\Preview\\PNG",
            "OC\\Preview\\JPEG",
            "OC\\Preview\\GIF",
            "OC\\Preview\\HEIC",
            "OC\\Preview\\BMP",
            "OC\\Preview\\XBitmap",
            "OC\\Preview\\MP4",
            "OC\\Preview\\AVI",
            "OC\\Preview\\MarkDown",
            "OC\\Preview\\Movie",
            "OC\\Preview\\PDF",
            "OC\\Preview\\Photoshop"
        ],
        "loglevel": 2,
        "maintenance": false,
        "mail_smtpmode": "smtp",
        "mail_sendmailmode": "smtp",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpauth": 1,
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpsecure": "ssl",
        "mail_smtpport": "465",
        "theme": "",
        "app_install_overwrite": [
            "onlyoffice"
        ],
        "maintenance_window_start": 1
    }
}

List of activated Apps

Enabled:
  - activity: 2.20.0
  - admin_audit: 1.18.0
  - circles: 28.0.0
  - cloud_federation_api: 1.11.0
  - comments: 1.18.0
  - contactsinteraction: 1.9.0
  - dav: 1.29.1
  - federatedfilesharing: 1.18.0
  - federation: 1.18.0
  - files: 2.0.0
  - files_external: 1.20.0
  - files_pdfviewer: 2.9.0
  - files_reminders: 1.1.0
  - files_sharing: 1.20.0
  - files_trashbin: 1.18.0
  - files_versions: 1.21.0
  - firstrunwizard: 2.17.0
  - logreader: 2.13.0
  - lookup_server_connector: 1.16.0
  - nextcloud_announcements: 1.17.0
  - notifications: 2.16.0
  - oauth2: 1.16.3
  - password_policy: 1.18.0
  - photos: 2.4.0
  - privacy: 1.12.0
  - provisioning_api: 1.18.0
  - recommendations: 2.0.0
  - related_resources: 1.3.0
  - serverinfo: 1.18.0
  - settings: 1.10.1
  - sharebymail: 1.18.0
  - support: 1.11.1
  - survey_client: 1.16.0
  - systemtags: 1.18.0
  - text: 3.9.1
  - theming: 2.3.0
  - twofactor_backupcodes: 1.17.0
  - updatenotification: 1.18.0
  - user_status: 1.8.1
  - viewer: 2.2.0
  - weather_status: 1.8.0
  - workflowengine: 2.10.0
Disabled:
  - bruteforcesettings: 2.8.0 (installed 2.2.0)
  - dashboard: 7.8.0 (installed 7.0.0)
  - encryption: 2.16.0
  - suspicious_login: 6.0.0
  - twofactor_totp: 10.0.0-beta.2
  - user_ldap: 1.19.0

Nextcloud Signing status

No response

Nextcloud Logs

No response

Additional info

No response

ncheng89 commented 5 months ago

I manually cleared the redis cache, and it seems that normal access can be restored. It should be the redis cache that caused the error in the version number. I upgraded the version using the command line, but the redis cache was not updated after the upgrade, causing this error.

joshtrichards commented 5 months ago

Any chance you restarted FPM as well and that that was actually what resolved it? I don't believe the version info ever gets cached in Redis (or any of the configured memcache's). I'd expect this would be a PHP opcache validate/re-validate matter. i.e. See #45490

ncheng89 commented 5 months ago

Indeed, after I cleared the redis cache, I restarted nginx and php-fpm, and then tried refreshing the page again and everything returned to normal.

joshtrichards commented 5 months ago

Out of curiosity what are your PHP config values for:

opcache.validate_timestamps opcache.revalidate_freq

Are they non-default?

ncheng89 commented 5 months ago

1716860912201 This is my configuration, do you think there is anything that needs to be optimized? @joshtrichards

kesselb commented 5 months ago

Why did you set opcache.validate_timestamp = 0 and do you understand the implications?

Tip: https://docs.nextcloud.com/server/latest/admin_manual/installation/server_tuning.html#enable-php-opcache

ncheng89 commented 5 months ago

opcache.validate_timestamps=0 Of course, it is recommended to disable timestamp validation in production environments and update the cache by restarting the PHP service. I restarted the php-fpm service after upgrading.

skjnldsv commented 5 months ago

So, closing? Thanks for investigating @ncheng89 :)