Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Cron job borks due to Backup incompatability #45769

Closed
5 of 8 tasks
kekePower opened this issue Jun 10, 2024 · 4 comments
Closed
5 of 8 tasks

[Bug]: Cron job borks due to Backup incompatability #45769

kekePower opened this issue Jun 10, 2024 · 4 comments
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap 29-feedback bug

Comments

@kekePower
Copy link

⚠️ This issue respects the following points: ⚠️

Bug description

php -f /var/www/nextcloud/cron.php
Error: Class "OC\BackgroundJob\TimedJob" not found in /var/www/nextcloud/apps/backup/lib/Cron/Backup.php:48
Stack trace:
#0 /var/www/nextcloud/lib/composer/composer/ClassLoader.php(576): include()
#1 /var/www/nextcloud/lib/composer/composer/ClassLoader.php(427): Composer\Autoload\{closure}()
#2 [internal function]: Composer\Autoload\ClassLoader->loadClass()
#3 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(126): ReflectionClass->__construct()
#4 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(146): OC\AppFramework\Utility\SimpleContainer->resolve()
#5 /var/www/nextcloud/lib/private/AppFramework/DependencyInjection/DIContainer.php(470): OC\AppFramework\Utility\SimpleContainer->query()
#6 /var/www/nextcloud/lib/private/ServerContainer.php(155): OC\AppFramework\DependencyInjection\DIContainer->queryNoFallback()
#7 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(64): OC\ServerContainer->query()
#8 /var/www/nextcloud/lib/public/Server.php(55): OC\AppFramework\Utility\SimpleContainer->get()
#9 /var/www/nextcloud/lib/private/BackgroundJob/JobList.php(326): OCP\Server::get()
#10 /var/www/nextcloud/lib/private/BackgroundJob/JobList.php(235): OC\BackgroundJob\JobList->buildJob()
#11 /var/www/nextcloud/cron.php(163): OC\BackgroundJob\JobList->getNext()
#12 {main}

Steps to reproduce

  1. Upgrade from 28.0.6 to 29.0.2
  2. Run cron.php as same user as webserver
  3. Crash

Expected behavior

After I disabled Backup, the cron.php script runs as expected.

Installation method

Community Manual installation with Archive

Nextcloud Server version

29

Operating system

Other

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?

  • Default user-backend (database)
  • LDAP/ Active Directory
  • SSO - SAML
  • Other

Configuration report

{
    "system": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "10.0.0.4",
            "10.0.0.97",
            "nc.mujeresenmenopausia.com",
            "mujeresenmenopausia.ddns.net"
        ],
        "0": true,
        "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "29.0.2.2",
        "overwrite.cli.url": "https:\/\/nc.mujeresenmenopausia.com\/",
        "overwritehost": "nc.mujeresenmenopausia.com",
        "overwritewebroot": "",
        "overwriteprotocol": "https",
        "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,
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "memcache.local": "\\OC\\Memcache\\Redis",
        "memcache.distributed": "\\OC\\Memcache\\Redis",
        "filelocking.enabled": "true",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 0,
            "dbindex": 0,
            "timeout": 1.5
        },
        "app_install_overwrite": [
            "workflow_media_converter",
            "imageconverter",
            "talked",
            "documentserver_community",
            "files_mindmap",
            "backup",
            "mail_roundcube",
            "carnet",
            "appointments",
            "pandoc",
            "files_zip",
            "files_rightclick",
            "piwik"
        ],
        "enabledPreviewProviders": [
            "OC\\Preview\\MP3",
            "OC\\Preview\\TXT",
            "OC\\Preview\\MarkDown",
            "OC\\Preview\\OpenDocument",
            "OC\\Preview\\Krita",
            "OC\\Preview\\Imaginary"
        ],
        "preview_imaginary_url": "***REMOVED SENSITIVE VALUE***",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpmode": "smtp",
        "mail_sendmailmode": "smtp",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "465",
        "mail_smtpsecure": "ssl",
        "mail_smtpauth": 1,
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "htaccess.RewriteBase": "\/",
        "maintenance": false,
        "has_rebuilt_cache": true,
        "theme": "",
        "loglevel": 2,
        "simpleSignUpLink.shown": false,
        "default_phone_region": "NO",
        "default_timezone": "Europe\/Oslo",
        "logo_url": "https:\/\/nc.mujeresenmenopausia.com\/",
        "maintenance_window_start": 1
    }
}

List of activated Apps

Enabled:
  - announcementcenter: 6.8.1
  - appointments: 2.1.3
  - calendar: 4.7.6
  - circles: 29.0.0-dev
  - cloud_federation_api: 1.12.0
  - comments: 1.19.0
  - contacts: 6.0.0
  - contactsinteraction: 1.10.0
  - cpanelmailsync: 0.1.7
  - dashboard: 7.9.0
  - dav: 1.30.1
  - deck: 1.13.0
  - external: 5.4.0
  - federatedfilesharing: 1.19.0
  - files: 2.1.0
  - files_downloadlimit: 2.0.0
  - files_external: 1.21.0
  - files_mindmap: 0.0.30
  - files_pdfviewer: 2.10.0
  - files_reminders: 1.2.0
  - files_sharing: 1.21.0
  - files_trashbin: 1.19.0
  - files_versions: 1.22.0
  - files_zip: 1.5.0
  - groupfolders: 17.0.1
  - imageconverter: 2.0.2
  - integration_google: 2.2.0
  - integration_openai: 2.0.1
  - integration_youtube: 0.2.1
  - logreader: 2.14.0
  - lookup_server_connector: 1.17.0
  - notes: 4.10.0
  - notifications: 2.17.0
  - oauth2: 1.17.0
  - onlyoffice: 9.2.2
  - pandoc: 0.7.0
  - password_policy: 1.19.0
  - photos: 2.5.0
  - piwik: 0.12.0
  - polls: 7.1.0
  - privacy: 1.13.0
  - provisioning_api: 1.19.0
  - recommendations: 2.1.0
  - related_resources: 1.4.0
  - serverinfo: 1.19.0
  - settings: 1.12.0
  - sharebymail: 1.19.0
  - snappymail: 2.36.3
  - spreed: 19.0.1
  - systemtags: 1.19.0
  - tasks: 0.16.0
  - text: 3.10.0
  - theming: 2.4.0
  - twofactor_backupcodes: 1.18.0
  - unroundedcorners: 1.1.3
  - user_status: 1.9.0
  - viewer: 2.3.0
  - weather_status: 1.9.0
  - workflow_media_converter: 1.11.7
  - workflow_pdf_converter: 1.14.0
  - workflowengine: 2.11.0
Disabled:
  - activity: 2.21.1 (installed 2.18.0)
  - admin_audit: 1.19.0
  - backup: 1.4.0 (installed 1.4.0)
  - bruteforcesettings: 2.9.0
  - encryption: 2.17.0
  - federation: 1.19.0 (installed 1.16.0)
  - firstrunwizard: 2.18.0 (installed 2.15.0)
  - nextcloud_announcements: 1.18.0 (installed 1.15.0)
  - support: 1.12.0 (installed 1.9.0)
  - survey_client: 1.17.0 (installed 1.14.0)
  - suspicious_login: 7.0.0
  - talked: 0.5.0 (installed 0.5.0)
  - twofactor_totp: 11.0.0-dev
  - updatenotification: 1.19.1 (installed 1.16.0)
  - user_ldap: 1.20.0

Nextcloud Signing status

No errors have been found.

Nextcloud Logs

# cat /srv/nextcloud/data/nextcloud.log | wc -l
62882

Additional info

No response

@kekePower kekePower added 0. Needs triage Pending check for reproducibility or if it fits our roadmap bug labels Jun 10, 2024
@joshtrichards
Copy link
Member

joshtrichards commented Jun 10, 2024

Per the app store, the backup app isn't released yet for v29.

This looks to be because you force enabled the backup app:

"app_install_overwrite":   [ 
    "workflow_media_converter",
    "imageconverter",
    "talked",
    "documentserver_community",
    "files_mindmap",
    "backup",
    "mail_roundcube",
    "carnet",
    "appointments",
    "pandoc",
    "files_zip",
    "files_rightclick",
    "piwik" 
], 

You appear to have a number of apps force enabled. This overrides compatibility checks for apps with different versions of Server.

You may wish to follow nextcloud/backup#663 for v29 support.

@joshtrichards joshtrichards closed this as not planned Won't fix, can't repro, duplicate, stale Jun 10, 2024
@HammyHavoc
Copy link

Per the app store, the backup app isn't released yet for v29.

This looks to be because you force enabled the backup app:

"app_install_overwrite":   [ 
    "workflow_media_converter",
    "imageconverter",
    "talked",
    "documentserver_community",
    "files_mindmap",
    "backup",
    "mail_roundcube",
    "carnet",
    "appointments",
    "pandoc",
    "files_zip",
    "files_rightclick",
    "piwik" 
], 

You appear to have a number of apps force enabled. This overrides compatibility checks for apps with different versions of Server.

You may wish to follow nextcloud/backup#663 for v29 support.

Do you feel that a backup facility should be incorporated into Nextcloud as a default app in the OOBE? It seems absurd to me that something as critical as backups would fail between version upgrades in 2024. Functional and reliable backups are the bare minimum for something targeting enterprise, IMO.

@joshtrichards
Copy link
Member

I'm honestly not sure. I prefer to do all my backups at the infrastructure and db level outside of Nextcloud Server itself. And AIO comes with its own backup mechanism. Everyone has different backup requirements. It's an interesting question.

@Be-Mann
Copy link

Be-Mann commented Jul 4, 2024

I can only agree, backup should be a basic function. If you want to solve this differently, it is sufficient if it can be deactivated. The fact that the AIO uses BorgBackup is good, why not add this as a standard feature in the backup app and make it a basic function?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap 29-feedback bug
Projects
None yet
Development

No branches or pull requests

5 participants