Not yet another .ocdata / cron issue!

Nextcloud 24.0.1
ubuntu 20.04.4
php 7.4 php-fpm
nginx 1.21.6
apache2 2.4.53
hestia panel 1.5.15

The issue you are facing: in Settings/Overview

  • It was not possible to execute the cron job via CLI. The following technical errors have appeared:
    • Votre répertoire des données n’est pas valide. Assurez-vous que le répertoire de données contient un fichier “.ocdata” à sa racine.
  • Last background job execution ran 4 days ago. Something seems wrong. Check the background job settings :arrow_upper_right:.

output of your config.php file:

<?php
$CONFIG = array (
  'instanceid' => 'oc...',
  'passwordsalt' => '...',
  'secret' => '...',
  'trusted_domains' => 
  array (
    0 => 'lab.land.com',
  ),
  'datadirectory' => '/home/httpuser/web/lab.land.com/public_html/data',
  'dbtype' => 'mysql',
  'version' => '24.0.1.1',
  'overwrite.cli.url' => 'https://lab.land.com',
  'dbname' => 'prod_bdd',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'cc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'prod_manager',
  'dbpassword' => '...',
  'installed' => true,
  'app_install_overwrite' => 
  array (
    0 => 'browser_warning',
    1 => 'defaultgroup',
    2 => 'nextbackup',
    3 => 'admin_notifications',
    4 => 'files_trackdownloads',
    5 => 'external',
    6 => 'files_texteditor',
  ),
  'maintenance' => false,
  'enable_previews' => false,
  'theme' => '',
  'default_phone_region' => 'FR',
  'loglevel' => 1,
  'mail_smtpmode' => 'smtp',
  'mail_smtpsecure' => 'tls',
  'mail_sendmailmode' => 'smtp',
  'mail_from_address' => 'lab',
  'mail_domain' => 'land.com',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_smtpauth' => 1,
  'mail_smtphost' => 'mail.land.com',
  'mail_smtpport' => '587',
  'mail_smtpname' => 'lab@land.com',
  'mail_smtppassword' => '...',
);

The output of your Apache/nginx/system log in /var/log/____:
I can’t locate these, can you precise please ?

Output errors in nextcloud.log in /var/www/ or as admin user in top right menu, filtering for errors. Use a pastebin service if necessary.

Info no app in context Deprecated event type for OCP\IDBConnection::CHECK_MISSING_COLUMNS: Symfony\Component\EventDispatcher\GenericEvent is used 2022-06-08T23:19:36+0200
Info no app in context Deprecated event type for OCP\IDBConnection::CHECK_MISSING_INDEXES: Symfony\Component\EventDispatcher\GenericEvent is used 2022-06-08T23:19:35+0200
Info no app in context Deprecated event type for OCP\IDBConnection::CHECK_MISSING_PRIMARY_KEYS: Symfony\Component\EventDispatcher\GenericEvent is used 2022-06-08T23:19:35+0200
Info no app in context Deprecated event type for OCP\IDBConnection::CHECK_MISSING_COLUMNS: Symfony\Component\EventDispatcher\GenericEvent is used 2022-06-08T23:18:14+0200
Info no app in context Deprecated event type for OCP\IDBConnection::CHECK_MISSING_INDEXES: Symfony\Component\EventDispatcher\GenericEvent is used 2022-06-08T23:18:14+0200
Info no app in context Deprecated event type for OCP\IDBConnection::CHECK_MISSING_PRIMARY_KEYS: Symfony\Component\EventDispatcher\GenericEvent is used 2022-06-08T23:18:13+0200
Info no app in context Deprecated event type for OCP\IDBConnection::CHECK_MISSING_COLUMNS: Symfony\Component\EventDispatcher\GenericEvent is used 2022-06-08T22:32:31+0200
Info no app in context Deprecated event type for OCP\IDBConnection::CHECK_MISSING_INDEXES: Symfony\Component\EventDispatcher\GenericEvent is used 2022-06-08T22:32:31+0200
Info no app in context Deprecated event type for OCP\IDBConnection::CHECK_MISSING_PRIMARY_KEYS: Symfony\Component\EventDispatcher\GenericEvent is used 2022-06-08T22:32:30+0200
Info no app in context Deprecated event type for OCP\IDBConnection::CHECK_MISSING_COLUMNS: Symfony\Component\EventDispatcher\GenericEvent is used 2022-06-08T22:27:38+0200
Info no app in context Deprecated event type for OCP\IDBConnection::CHECK_MISSING_INDEXES: Symfony\Component\EventDispatcher\GenericEvent is used 2022-06-08T22:27:38+0200
Info no app in context Deprecated event type for OCP\IDBConnection::CHECK_MISSING_PRIMARY_KEYS: Symfony\Component\EventDispatcher\GenericEvent is used 2022-06-08T22:27:38+0200
Info no app in context Deprecated event type for OCP\IDBConnection::CHECK_MISSING_COLUMNS: Symfony\Component\EventDispatcher\GenericEvent is used 2022-06-08T22:08:13+0200
Info no app in context Deprecated event type for OCP\IDBConnection::CHECK_MISSING_INDEXES: Symfony\Component\EventDispatcher\GenericEvent is used 2022-06-08T22:08:13+0200
Info no app in context Deprecated event type for OCP\IDBConnection::CHECK_MISSING_PRIMARY_KEYS: Symfony\Component\EventDispatcher\GenericEvent is used 2022-06-08T22:08:13+0200
Info no app in context Deprecated event type for OCP\IDBConnection::CHECK_MISSING_COLUMNS: Symfony\Component\EventDispatcher\GenericEvent is used 2022-06-08T21:54:16+0200
Info no app in context Deprecated event type for OCP\IDBConnection::CHECK_MISSING_INDEXES: Symfony\Component\EventDispatcher\GenericEvent is used 2022-06-08T21:54:16+0200
Info no app in context Deprecated event type for OCP\IDBConnection::CHECK_MISSING_PRIMARY_KEYS: Symfony\Component\EventDispatcher\GenericEvent is used 2022-06-08T21:54:16+0200
Info no app in context Deprecated event type for OCP\IDBConnection::CHECK_MISSING_COLUMNS: Symfony\Component\EventDispatcher\GenericEvent is used 2022-06-08T21:49:39+0200
Info no app in context Deprecated event type for OCP\IDBConnection::CHECK_MISSING_INDEXES: Symfony\Component\EventDispatcher\GenericEvent is used 2022-06-08T21:49:39+0200
Info no app in context Deprecated event type for OCP\IDBConnection::CHECK_MISSING_PRIMARY_KEYS: Symfony\Component\EventDispatcher\GenericEvent is used 2022-06-08T21:49:39+0200
Info no app in context Deprecated event type for OCP\IDBConnection::CHECK_MISSING_COLUMNS: Symfony\Component\EventDispatcher\GenericEvent is used 2022-06-08T21:48:27+0200
Info no app in context Deprecated event type for OCP\IDBConnection::CHECK_MISSING_INDEXES: Symfony\Component\EventDispatcher\GenericEvent is used 2022-06-08T21:48:27+0200
Info no app in context Deprecated event type for OCP\IDBConnection::CHECK_MISSING_PRIMARY_KEYS: Symfony\Component\EventDispatcher\GenericEvent is used 2022-06-08T21:48:27+0200
Info no app in context Deprecated event type for OCP\IDBConnection::CHECK_MISSING_COLUMNS: Symfony\Component\EventDispatcher\GenericEvent is used 2022-06-08T21:48:03+0200
Info no app in context Deprecated event type for OCP\IDBConnection::CHECK_MISSING_INDEXES: Symfony\Component\EventDispatcher\GenericEvent is used 2022-06-08T21:48:03+0200
Info no app in context Deprecated event type for OCP\IDBConnection::CHECK_MISSING_PRIMARY_KEYS: Symfony\Component\EventDispatcher\GenericEvent is used 2022-06-08T21:48:02+0200
Info files_lock [notice] unlocking file – {fileLock:{}} 2022-06-08T21:46:55+0200
Info no app in context Deprecated event type for OCP\IDBConnection::CHECK_MISSING_COLUMNS: Symfony\Component\EventDispatcher\GenericEvent is used 2022-06-08T21:46:10+0200
Info no app in context Deprecated event type for OCP\IDBConnection::CHECK_MISSING_INDEXES: Symfony\Component\EventDispatcher\GenericEvent is used 2022-06-08T21:46:10+0200
Info no app in context Deprecated event type for OCP\IDBConnection::CHECK_MISSING_PRIMARY_KEYS: Symfony\Component\EventDispatcher\GenericEvent is used 2022-06-08T21:46:09+0200
Info no app in context Symfony\Component\Routing\Exception\RouteNotFoundException: Unable to generate a URL for the named route settings.Help.help as such route does not exist. 2022-06-08T21:39:03+0200
Info no app in context Symfony\Component\Routing\Exception\RouteNotFoundException: Unable to generate a URL for the named route theming.Theming.getImage as such route does not exist. 2022-06-08T21:39:03+0200
Info no app in context Deprecated event type for OCP\IDBConnection::CHECK_MISSING_COLUMNS: Symfony\Component\EventDispatcher\GenericEvent is used 2022-06-08T21:34:52+0200
Info no app in context Deprecated event type for OCP\IDBConnection::CHECK_MISSING_INDEXES: Symfony\Component\EventDispatcher\GenericEvent is used 2022-06-08T21:34:51+0200
Info no app in context Deprecated event type for OCP\IDBConnection::CHECK_MISSING_PRIMARY_KEYS: Symfony\Component\EventDispatcher\GenericEvent is used 2022-06-08T21:34:51+0200
Info no app in context Deprecated event type for OCP\IDBConnection::CHECK_MISSING_COLUMNS: Symfony\Component\EventDispatcher\GenericEvent is used 2022-06-08T21:34:03+0200
Info no app in context Deprecated event type for OCP\IDBConnection::CHECK_MISSING_INDEXES: Symfony\Component\EventDispatcher\GenericEvent is used 2022-06-08T21:34:03+0200
Info no app in context Deprecated event type for OCP\IDBConnection::CHECK_MISSING_PRIMARY_KEYS: Symfony\Component\EventDispatcher\GenericEvent is used 2022-06-08T21:34:02+0200
Info no app in context Symfony\Component\Routing\Exception\RouteNotFoundException: Unable to generate a URL for the named route settings.Help.help as such route does not exist. 2022-06-08T21:33:54+0200
Info no app in context Symfony\Component\Routing\Exception\RouteNotFoundException: Unable to generate a URL for the named route theming.Theming.getImage as such route does not exist. 2022-06-08T21:33:54+0200
Info no app in context Deprecated event type for OCP\IDBConnection::CHECK_MISSING_COLUMNS: Symfony\Component\EventDispatcher\GenericEvent is used 2022-06-08T21:33:15+0200
Info no app in context Deprecated event type for OCP\IDBConnection::CHECK_MISSING_INDEXES: Symfony\Component\EventDispatcher\GenericEvent is used 2022-06-08T21:33:15+0200
Info no app in context Deprecated event type for OCP\IDBConnection::CHECK_MISSING_PRIMARY_KEYS: Symfony\Component\EventDispatcher\GenericEvent is used 2022-06-08T21:33:14+0200
Info files_lock [notice] locking file – {fileLock:{id:0,uri:,userId:text,displayName:null,fileId:4638,token:files_lock/440f6f6e-8445-46f5-be5b-e85acee1d0a6,eta:-1,creation:1654715842,type:1}} 2022-06-08T21:17:22+0200
Info no app in context Deprecated event type for OCA\Files::loadAdditionalScripts: Symfony\Component\EventDispatcher\GenericEvent is used 2022-06-08T21:16:49+0200
Info no app in context Deprecated event type for OCA\Files::loadAdditionalScripts: Symfony\Component\EventDispatcher\GenericEvent is used 2022-06-08T21:16:49+0200
Info no app in context Deprecated event type for OCA\Files::loadAdditionalScripts: Symfony\Component\EventDispatcher\GenericEvent is used 2022-06-08T21:16:49+0200
Info no app in context Deprecated event type for OCA\Files::loadAdditionalScripts: Symfony\Component\EventDispatcher\GenericEvent is used 2022-06-08T21:16:49+0200
Info no app in context Deprecated event type for OCA\Files::loadAdditionalScripts: Symfony\Component\EventDispatcher\GenericEvent is used 2022-06-08T21:16:49+0200



I've tried many different settings in the cron job. For now it is:
php -f /web/lab.land.com/public_html/next2024/cron.php

.ocdata is in the data folder, every folder is owned by httpuser
    0 -rw-r--r--  1 prod prod        0 May 30 18:10 .ocdata

Is the cron job running as the unix user of the webserver?

i’m not sure about that
the cron job is set in hestia cp
but a command like

$ sudo crontab -u hestia user -l

gives a proper answer
I can’t find out what should be the correct command for the cron though, amongst many articles …

php
php-cli
-f ~/web/collab.koraland.net/public_html/next2024/cron.php
-f /web/collab.koraland.net/public_html/next2024/cron.php

add apc.enable_cli=1 in /etc/php/7.4/mods-available/apcu.ini
or just add it at the end of the cron command

what if the cron problem comes from the .ocadata problem in the 1st place?