nextcloud / server

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

[Bug]: 24.0.8 cron.php Not updating 'lastcron' value to database #35781

Closed 0ranki closed 1 year ago

0ranki commented 1 year ago

⚠️ This issue respects the following points: ⚠️

Bug description

After update from 24.0.7 to 24.0.8, cron.php does not seem to be updating the value of lastcron to the oc_appconfig table. This results in admin->overview page showing the warning about last background job execution.

Not sure if helpful, but I added an echo $config->getAppValue('core', 'lastcron'); to cron.php before and after the respective setAppValue() call to debug the issue, and before the setAppValue call the timestamp stays the same (time before NC 24.0.8 update). Printing the value after the setAppValue call shows the updated timestamp, but the entry in the database stays the same.

Steps to reproduce

  1. Update to 24.0.8
  2. Have cronjob running (and apparently succeeding)
  3. Navigate to Settings -> Admin -> Overview
  4. Warning stays there

Expected behavior

No warning on Settings -> Admin -> Overview page when cronjob is correctly set.

Installation method

Community Docker image

Operating system

Debian/Ubuntu

PHP engine version

PHP 8.0

Web server

Apache (supported)

Database engine version

PostgreSQL

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

Updated from a minor version (ex. 22.2.3 to 22.2.4)

Are you using the Nextcloud Server Encryption module?

None

What user-backends are you using?

Configuration report

{
    "system": {
        "htaccess.RewriteBase": "\/",
        "filelocking.enabled": true,
        "memcache.local": "\\OC\\Memcache\\APCu",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "memcache.distributed": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "password": "***REMOVED SENSITIVE VALUE***",
            "port": 6379
        },
        "apps_paths": [
            {
                "path": "\/var\/www\/html\/apps",
                "url": "\/apps",
                "writable": false
            },
            {
                "path": "\/var\/www\/html\/custom_apps",
                "url": "\/custom_apps",
                "writable": true
            }
        ],
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "***REMOVED SENSITIVE VALUE***",
            "***REMOVED SENSITIVE VALUE***"
        ],
        "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "pgsql",
        "version": "24.0.8.2",
        "overwrite.cli.url": "https:\/\/cloud.oranki.net\/",
        "overwriteprotocol": "https",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "enable_previews": true,
        "enabledPreviewProviders": [
            "OC\\Preview\\Image",
            "OC\\Preview\\Photoshop",
            "OC\\Preview\\TIFF",
            "OC\\Preview\\SVG",
            "OC\\Preview\\Font",
            "OC\\Preview\\MP3",
            "OC\\Preview\\Movie",
            "OC\\Preview\\MKV",
            "OC\\Preview\\MP4",
            "OC\\Preview\\AVI"
        ],
        "maintenance": false,
        "loglevel": 2,
        "default_phone_region": "FI",
        "allow_local_remote_servers": true,
        "app_install_overwrite": [
            "files_external_onedrive",
            "files_external_gdrive",
            "files_external_dropbox",
            "vibeetoee"
        ],
        "mail_smtpmode": "smtp",
        "mail_sendmailmode": "smtp",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpauthtype": "LOGIN",
        "mail_smtpport": "465",
        "updater.release.channel": "stable",
        "theme": "",
        "mail_smtpauth": 1,
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpsecure": "ssl",
        "mysql.utf8mb4": true,
        "data-fingerprint": "faf8da02e95478dc65f06694b2edece0"
    }
}

List of activated Apps

Enabled:
  - activity: 2.16.0
  - admin_audit: 1.14.0
  - calendar: 3.5.2
  - cloud_federation_api: 1.7.0
  - contacts: 4.2.2
  - contactsinteraction: 1.5.0
  - dav: 1.22.0
  - extract: 1.3.5
  - federatedfilesharing: 1.14.0
  - files: 1.19.0
  - files_antivirus: 4.0.1
  - files_external: 1.16.1
  - files_pdfviewer: 2.5.0
  - files_rightclick: 1.3.0
  - files_sharing: 1.16.2
  - files_trashbin: 1.14.0
  - files_versions: 1.17.0
  - files_videoplayer: 1.13.0
  - firstrunwizard: 2.13.0
  - logreader: 2.9.0
  - lookup_server_connector: 1.12.0
  - notes: 4.5.1
  - notifications: 2.12.1
  - oauth2: 1.12.0
  - password_policy: 1.14.0
  - photos: 1.6.0
  - privacy: 1.8.0
  - provisioning_api: 1.14.0
  - recommendations: 1.3.0
  - serverinfo: 1.14.0
  - settings: 1.6.0
  - sharebymail: 1.14.0
  - text: 3.5.1
  - theming: 1.15.0
  - twofactor_backupcodes: 1.13.0
  - twofactor_totp: 6.4.1
  - updatenotification: 1.14.0
  - viewer: 1.8.0
  - workflowengine: 2.6.0

Nextcloud Signing status

No errors have been found

Nextcloud Logs

No response

Additional info

No response

szaimen commented 1 year ago

Hi, as this is very likely a configuration issue and I cannot reproduce the issue, please ask in https://help.nextcloud.com to get help

0ranki commented 1 year ago

Probably wasn't related to Nextcloud, but for some reason there was some sort of corruption in the Postgres DB. SQL dump and restore of the NC database fixed the issue.