Nextcloud version (eg, 12.0.2): 16.0.8
Operating system and version (eg, Ubuntu 17.04): NixOS 19.09
Apache or nginx version (eg, Apache 2.4.25): Nginx 1.16.1
PHP version (eg, 7.1): 7.3.13
The issue you are facing:
According to web interface the cronjob is not running for a couple of hours.
Logs by systemd shows that it is started every 10 minutes but has errors (see below).
This started when I was still on 16.0.7, I then updated to 16.0.8 with no change.
From the timing I believe that the desktop client was syncing files when the error started. Synchronization has finished in the mean time. Apart from the cron issue, everything seems to be fine.
I want to fix this error, so the cron job is running again.
Feb 01 22:16:51 myserver systemd[1]: Starting nextcloud-cron.service...
Feb 01 22:16:51 myserver Nextcloud[3437]: {PHP} Undefined property: OCA\Maps\BackgroundJob\UpdatePhotoByFileJob::$root at /srv/xxx//store-apps/maps/lib/BackgroundJob/UpdatePhotoByFileJob.php#43
Feb 01 22:16:51 myserver Nextcloud[3437]: {cron} {"Exception":"Error","Message":"Call to a member function getUserFolder() on null","Code":0,"Trace":[{"file":"\/nix\/store\/65qfqw4wwda1vim59l22c7vmawi1dkdm-nextcloud-16.0.7\/lib\/public\/BackgroundJob\/Job.php","line":77,"function":"run","class":"OCA\\Maps\\BackgroundJob\\UpdatePhotoByFileJob","type":"->","args":[{"fileId":126863,"userId":"xxx"}]},{"file":"\/nix\/store\/65qfqw4wwda1vim59l22c7vmawi1dkdm-nextcloud-16.0.7\/lib\/public\/BackgroundJob\/QueuedJob.php","line":46,"function":"execute","class":"OCP\\BackgroundJob\\Job","type":"->","args":[{"__class__":"OC\\BackgroundJob\\JobList"},{"__class__":"OC\\Log"}]},{"file":"\/nix\/store\/65qfqw4wwda1vim59l22c7vmawi1dkdm-nextcloud-16.0.7\/cron.php","line":123,"function":"execute","class":"OCP\\BackgroundJob\\QueuedJob","type":"->","args":[{"__class__":"OC\\BackgroundJob\\JobList"},{"__class__":"OC\\Log"}]}],"File":"\/srv\/xxx\/store-apps\/maps\/lib\/BackgroundJob\/UpdatePhotoByFileJob.php","Line":43,"CustomMessage":"--"}
Feb 01 22:16:51 myserver systemd[1]: nextcloud-cron.service: Succeeded.
Feb 01 22:16:51 myserver systemd[1]: Started nextcloud-cron.service.
Feb 01 22:26:53 myserver systemd[1]: Starting nextcloud-cron.service...
Feb 01 22:26:53 myserver Nextcloud[5007]: {PHP} Undefined property: OCA\Maps\BackgroundJob\UpdatePhotoByFileJob::$root at /srv/xxx//store-apps/maps/lib/BackgroundJob/UpdatePhotoByFileJob.php#43
Feb 01 22:26:53 myserver Nextcloud[5007]: {cron} {"Exception":"Error","Message":"Call to a member function getUserFolder() on null","Code":0,"Trace":[{"file":"\/nix\/store\/3dvvw2zsazdh0y9rby01aibpjdz2adfj-nextcloud-16.0.8\/lib\/public\/BackgroundJob\/Job.php","line":77,"function":"run","class":"OCA\\Maps\\BackgroundJob\\UpdatePhotoByFileJob","type":"->","args":[{"fileId":126864,"userId":"xxx"}]},{"file":"\/nix\/store\/3dvvw2zsazdh0y9rby01aibpjdz2adfj-nextcloud-16.0.8\/lib\/public\/BackgroundJob\/QueuedJob.php","line":46,"function":"execute","class":"OCP\\BackgroundJob\\Job","type":"->","args":[{"__class__":"OC\\BackgroundJob\\JobList"},{"__class__":"OC\\Log"}]},{"file":"\/nix\/store\/3dvvw2zsazdh0y9rby01aibpjdz2adfj-nextcloud-16.0.8\/cron.php","line":123,"function":"execute","class":"OCP\\BackgroundJob\\QueuedJob","type":"->","args":[{"__class__":"OC\\BackgroundJob\\JobList"},{"__class__":"OC\\Log"}]}],"File":"\/srv\/xxx\/store-apps\/maps\/lib\/BackgroundJob\/UpdatePhotoByFileJob.php","Line":43,"CustomMessage":"--"}
Feb 01 22:26:53 myserver systemd[1]: nextcloud-cron.service: Succeeded.
Feb 01 22:26:53 myserver systemd[1]: Started nextcloud-cron.service.
Is this the first time you’ve seen this error? (Y/N): Today is the first time, the error repeats on every cron run since a couple of hours.
Steps to replicate it:
- Unknown step
- Rerun the cron job.
The output of your Nextcloud log in Admin > Logging:
Log is empty, everything appears to be fine (translated from german)
The output of your config.php file in /path/to/nextcloud
(make sure you remove any identifiable information!):
<?php
$CONFIG = array (
'apps_paths' =>
array (
0 =>
array (
'path' => '/srv/xxx/apps',
'url' => '/apps',
'writable' => false,
),
1 =>
array (
'path' => '/srv/xxx/store-apps',
'url' => '/store-apps',
'writable' => true,
),
),
'datadirectory' => '/srv/xxx/data',
'skeletondirectory' => '',
'memcache.local' => '\\OC\\Memcache\\APCu',
'log_type' => 'syslog',
'log_level' => '2',
'dbname' => 'nextcloud',
'dbhost' => 'localhost',
'dbuser' => 'nextcloud',
'dbtype' => 'sqlite',
'passwordsalt' => 'xxx',
'secret' => 'xxx',
'version' => '16.0.8.1',
'overwrite.cli.url' => 'http://localhost',
'installed' => true,
'instanceid' => 'xxx',
'maintenance' => false,
'theme' => '',
'loglevel' => 2,
'mail_smtpmode' => 'sendmail',
'mail_sendmailmode' => 'pipe',
'mail_from_address' => 'nextcloud',
'mail_domain' => 'xxx',
'trusted_domains' =>
array (
0 => 'xxx',
),
'updater.secret' => 'xxx',
);
The output of your Apache/nginx/system log in /var/log/____
:
I don’t think it’s relevant for cron, I’ll provide it if relevant.