Forums | Mahara Community
Support
/
Mahara Cron Failing
24 October 2023, 23:01
Hi All
Having an issue getting our cron to start running again. Im not entirely sure when it stopped working but i can't get it running at the moment. The dataroot folder for my mahara instance is outside the file/htdocs folder and its owned by www-data.
Becaused the cron fails there is an entry in the config table so i usually have to run the following command:
SELECT * FROM config WHERE field LIKE '\_%';
Then delete the entries and that lets me try running the cron again when i delete the entries and run the cron manually using the command: "php /srv/www/mahara/htdocs/lib/cron.php"
I get this wall of error text thrown at me and im not sure where to go next any advise or help id be most grateful:
root@mahara-server:/srv/www/mahara/htdocs# php /srv/www/mahara/htdocs/lib/cron.php
[INF] ce (lib/cron.php:55) ---------- cron running Tue, 24 Oct 2023 10:23:15 +0100 ----------
[INF] ce (lib/cron.php:215) Skipping: No need to run user_login_tries_to_zero
[INF] ce (lib/cron.php:193) Running core cron portfolio_auto_copy
[INF] ce (lib/cron.php:193) Running core cron check_imap_for_bounces
[INF] ce (lib/cron.php:193) Running core cron export_process_queue
[WAR] ce (lib/pieforms/pieform.php:1847) Undefined array key "REMOTE_ADDR"
Call stack (most recent first):
root@mahara-server:/srv/www/mahara/htdocs# php /srv/www/mahara/htdocs/lib/cron.php
[INF] ce (lib/cron.php:55) ---------- cron running Tue, 24 Oct 2023 10:23:15 +0100 ----------
[INF] ce (lib/cron.php:215) Skipping: No need to run user_login_tries_to_zero
[INF] ce (lib/cron.php:193) Running core cron portfolio_auto_copy
[INF] ce (lib/cron.php:193) Running core cron check_imap_for_bounces
[INF] ce (lib/cron.php:193) Running core cron export_process_queue
[WAR] ce (lib/pieforms/pieform.php:1847) Undefined array key "REMOTE_ADDR"
Call stack (most recent first):
* log_message(string(size 33), integer, true, true, string(size 47), integer) at /srv/www/mahara/htdocs/lib/errors.php:514
* error(integer, string(size 33), string(size 47), integer) at /srv/www/mahara/htdocs/lib/pieforms/pieform.php:1847
* Pieform::get_ip() at /srv/www/mahara/htdocs/lib/pieforms/pieform.php:1831
* Pieform->hash_fieldnames() at /srv/www/mahara/htdocs/lib/pieforms/pieform.php:309
* Pieform->__construct(array(size 13)) at /srv/www/mahara/htdocs/lib/pieforms/pieform.php:159
* Pieform::process(array(size 13)) at /srv/www/mahara/htdocs/lib/mahara.php:5787
* pieform(array(size 13)) at /srv/www/mahara/htdocs/artefact/annotation/lib.php:1159
* ArtefactTypeAnnotationfeedback::get_annotation_feedback_for_view(object(ArtefactTypeAnnotation), object(View), string(size 5), true, false) at /srv/www/mahara/htdocs/artefact/annotation/blocktype/annotation/lib.php:138
* PluginBlocktypeAnnotation::render_instance(object(BlockInstance), false, false) at /srv/www/mahara/htdocs/blocktype/lib.php:144
* PluginBlocktype::render_instance_export(object(BlockInstance), false, false, string(size 4)) at /srv/www/mahara/htdocs/lib/mahara.php:1943
* call_static_method(string(size 25), string(size 22), object(BlockInstance), false, false, string(size 4)) at /srv/www/mahara/htdocs/blocktype/lib.php:1780
* BlockInstance->render_viewing(string(size 4), false) at /srv/www/mahara/htdocs/lib/view.php:2322
* View->get_blocks(false, string(size 4)) at /srv/www/mahara/htdocs/export/html/lib.php:606
* PluginExportHtml->dump_view_export_data() at /srv/www/mahara/htdocs/export/html/lib.php:273
* PluginExportHtml->export() at /srv/www/mahara/htdocs/export/lib.php:1118
* PluginExportAll->export(false) at /srv/www/mahara/htdocs/export/lib.php:760
* export_process_queue() at /srv/www/mahara/htdocs/lib/cron.php:201
[WAR] ce (lib/pieforms/pieform.php:1847) Undefined array key "REMOTE_ADDR"
Call stack (most recent first):
* log_message(string(size 33), integer, true, true, string(size 47), integer) at /srv/www/mahara/htdocs/lib/errors.php:514
* error(integer, string(size 33), string(size 47), integer) at /srv/www/mahara/htdocs/lib/pieforms/pieform.php:1847
* Pieform::get_ip() at /srv/www/mahara/htdocs/lib/pieforms/pieform.php:1831
* Pieform->hash_fieldnames() at /srv/www/mahara/htdocs/lib/pieforms/pieform.php:309
* Pieform->__construct(array(size 13)) at /srv/www/mahara/htdocs/lib/pieforms/pieform.php:159
* Pieform::process(array(size 13)) at /srv/www/mahara/htdocs/lib/mahara.php:5787
* pieform(array(size 13)) at /srv/www/mahara/htdocs/artefact/annotation/lib.php:1159
* ArtefactTypeAnnotationfeedback::get_annotation_feedback_for_view(object(ArtefactTypeAnnotation), object(View), string(size 5), true, false) at /srv/www/mahara/htdocs/artefact/annotation/blocktype/annotation/lib.php:138
* PluginBlocktypeAnnotation::render_instance(object(BlockInstance), false, false) at /srv/www/mahara/htdocs/blocktype/lib.php:144
* PluginBlocktype::render_instance_export(object(BlockInstance), false, false, string(size 4)) at /srv/www/mahara/htdocs/lib/mahara.php:1943
* call_static_method(string(size 25), string(size 22), object(BlockInstance), false, false, string(size 4)) at /srv/www/mahara/htdocs/blocktype/lib.php:1780
* BlockInstance->render_viewing(string(size 4), false) at /srv/www/mahara/htdocs/lib/view.php:2322
* View->get_blocks(false, string(size 4)) at /srv/www/mahara/htdocs/export/html/lib.php:606
* PluginExportHtml->dump_view_export_data() at /srv/www/mahara/htdocs/export/html/lib.php:273
* PluginExportHtml->export() at /srv/www/mahara/htdocs/export/lib.php:1118
* PluginExportAll->export(false) at /srv/www/mahara/htdocs/export/lib.php:760
* export_process_queue() at /srv/www/mahara/htdocs/lib/cron.php:201
[WAR] ce (lib/pieforms/pieform.php:1847) Undefined array key "REMOTE_ADDR"
Call stack (most recent first):
* log_message(string(size 33), integer, true, true, string(size 47), integer) at /srv/www/mahara/htdocs/lib/errors.php:514
* error(integer, string(size 33), string(size 47), integer) at /srv/www/mahara/htdocs/lib/pieforms/pieform.php:1847
* Pieform::get_ip() at /srv/www/mahara/htdocs/lib/pieforms/pieform.php:1831
* Pieform->hash_fieldnames() at /srv/www/mahara/htdocs/lib/pieforms/pieform.php:309
* Pieform->__construct(array(size 13)) at /srv/www/mahara/htdocs/lib/pieforms/pieform.php:159
* Pieform::process(array(size 13)) at /srv/www/mahara/htdocs/lib/mahara.php:5787
* pieform(array(size 13)) at /srv/www/mahara/htdocs/artefact/annotation/lib.php:1159
* ArtefactTypeAnnotationfeedback::get_annotation_feedback_for_view(object(ArtefactTypeAnnotation), object(View), string(size 5), true, false) at /srv/www/mahara/htdocs/artefact/annotation/blocktype/annotation/lib.php:138
* PluginBlocktypeAnnotation::render_instance(object(BlockInstance), false, false) at /srv/www/mahara/htdocs/blocktype/lib.php:144
* PluginBlocktype::render_instance_export(object(BlockInstance), false, false, string(size 4)) at /srv/www/mahara/htdocs/lib/mahara.php:1943
* call_static_method(string(size 25), string(size 22), object(BlockInstance), false, false, string(size 4)) at /srv/www/mahara/htdocs/blocktype/lib.php:1780
* BlockInstance->render_viewing(string(size 4), false) at /srv/www/mahara/htdocs/lib/view.php:2322
* View->get_blocks(false, string(size 4)) at /srv/www/mahara/htdocs/export/html/lib.php:606
* PluginExportHtml->dump_view_export_data() at /srv/www/mahara/htdocs/export/html/lib.php:273
* PluginExportHtml->export() at /srv/www/mahara/htdocs/export/lib.php:1118
* PluginExportAll->export(false) at /srv/www/mahara/htdocs/export/lib.php:760
* export_process_queue() at /srv/www/mahara/htdocs/lib/cron.php:201
[WAR] ce (lib/pieforms/pieform.php:1847) Undefined array key "REMOTE_ADDR"
Call stack (most recent first):
* log_message(string(size 33), integer, true, true, string(size 47), integer) at /srv/www/mahara/htdocs/lib/errors.php:514
* error(integer, string(size 33), string(size 47), integer) at /srv/www/mahara/htdocs/lib/pieforms/pieform.php:1847
* Pieform::get_ip() at /srv/www/mahara/htdocs/lib/pieforms/pieform.php:1831
* Pieform->hash_fieldnames() at /srv/www/mahara/htdocs/lib/pieforms/pieform.php:309
* Pieform->__construct(array(size 13)) at /srv/www/mahara/htdocs/lib/pieforms/pieform.php:159
* Pieform::process(array(size 13)) at /srv/www/mahara/htdocs/lib/mahara.php:5787
* pieform(array(size 13)) at /srv/www/mahara/htdocs/artefact/annotation/lib.php:1159
* ArtefactTypeAnnotationfeedback::get_annotation_feedback_for_view(object(ArtefactTypeAnnotation), object(View), string(size 5), true, false) at /srv/www/mahara/htdocs/artefact/annotation/blocktype/annotation/lib.php:138
* PluginBlocktypeAnnotation::render_instance(object(BlockInstance), false, false) at /srv/www/mahara/htdocs/blocktype/lib.php:144
* PluginBlocktype::render_instance_export(object(BlockInstance), false, false, string(size 4)) at /srv/www/mahara/htdocs/lib/mahara.php:1943
* call_static_method(string(size 25), string(size 22), object(BlockInstance), false, false, string(size 4)) at /srv/www/mahara/htdocs/blocktype/lib.php:1780
* BlockInstance->render_viewing(string(size 4), false) at /srv/www/mahara/htdocs/lib/view.php:2322
* View->get_blocks(false, string(size 4)) at /srv/www/mahara/htdocs/export/html/lib.php:606
* PluginExportHtml->dump_view_export_data() at /srv/www/mahara/htdocs/export/html/lib.php:273
* PluginExportHtml->export() at /srv/www/mahara/htdocs/export/lib.php:1118
* PluginExportAll->export(false) at /srv/www/mahara/htdocs/export/lib.php:760
* export_process_queue() at /srv/www/mahara/htdocs/lib/cron.php:201
[WAR] ce (lib/pieforms/pieform.php:1847) Undefined array key "REMOTE_ADDR"
Call stack (most recent first):
* log_message(string(size 33), integer, true, true, string(size 47), integer) at /srv/www/mahara/htdocs/lib/errors.php:514
* error(integer, string(size 33), string(size 47), integer) at /srv/www/mahara/htdocs/lib/pieforms/pieform.php:1847
* Pieform::get_ip() at /srv/www/mahara/htdocs/lib/pieforms/pieform.php:1831
* Pieform->hash_fieldnames() at /srv/www/mahara/htdocs/lib/pieforms/pieform.php:309
* Pieform->__construct(array(size 13)) at /srv/www/mahara/htdocs/lib/pieforms/pieform.php:159
* Pieform::process(array(size 13)) at /srv/www/mahara/htdocs/lib/mahara.php:5787
* pieform(array(size 13)) at /srv/www/mahara/htdocs/artefact/annotation/lib.php:1159
* ArtefactTypeAnnotationfeedback::get_annotation_feedback_for_view(object(ArtefactTypeAnnotation), object(View), string(size 5), true, false) at /srv/www/mahara/htdocs/artefact/annotation/blocktype/annotation/lib.php:138
* PluginBlocktypeAnnotation::render_instance(object(BlockInstance), false, false) at /srv/www/mahara/htdocs/blocktype/lib.php:144
* PluginBlocktype::render_instance_export(object(BlockInstance), false, false, string(size 4)) at /srv/www/mahara/htdocs/lib/mahara.php:1943
* call_static_method(string(size 25), string(size 22), object(BlockInstance), false, false, string(size 4)) at /srv/www/mahara/htdocs/blocktype/lib.php:1780
* BlockInstance->render_viewing(string(size 4), false) at /srv/www/mahara/htdocs/lib/view.php:2322
* View->get_blocks(false, string(size 4)) at /srv/www/mahara/htdocs/export/leap/lib.php:403
* PluginExportLeap->export_views() at /srv/www/mahara/htdocs/export/leap/lib.php:185
* PluginExportLeap->export() at /srv/www/mahara/htdocs/export/lib.php:1125
* PluginExportAll->export(false) at /srv/www/mahara/htdocs/export/lib.php:760
* export_process_queue() at /srv/www/mahara/htdocs/lib/cron.php:201
[WAR] ce (lib/pieforms/pieform.php:1847) Undefined array key "REMOTE_ADDR"
Call stack (most recent first):
* log_message(string(size 33), integer, true, true, string(size 47), integer) at /srv/www/mahara/htdocs/lib/errors.php:514
* error(integer, string(size 33), string(size 47), integer) at /srv/www/mahara/htdocs/lib/pieforms/pieform.php:1847
* Pieform::get_ip() at /srv/www/mahara/htdocs/lib/pieforms/pieform.php:1831
* Pieform->hash_fieldnames() at /srv/www/mahara/htdocs/lib/pieforms/pieform.php:309
* Pieform->__construct(array(size 13)) at /srv/www/mahara/htdocs/lib/pieforms/pieform.php:159
* Pieform::process(array(size 13)) at /srv/www/mahara/htdocs/lib/mahara.php:5787
* pieform(array(size 13)) at /srv/www/mahara/htdocs/artefact/annotation/lib.php:1159
* ArtefactTypeAnnotationfeedback::get_annotation_feedback_for_view(object(ArtefactTypeAnnotation), object(View), string(size 5), true, false) at /srv/www/mahara/htdocs/artefact/annotation/blocktype/annotation/lib.php:138
* PluginBlocktypeAnnotation::render_instance(object(BlockInstance), false, false) at /srv/www/mahara/htdocs/blocktype/lib.php:144
* PluginBlocktype::render_instance_export(object(BlockInstance), false, false, string(size 4)) at /srv/www/mahara/htdocs/lib/mahara.php:1943
* call_static_method(string(size 25), string(size 22), object(BlockInstance), false, false, string(size 4)) at /srv/www/mahara/htdocs/blocktype/lib.php:1780
* BlockInstance->render_viewing(string(size 4), false) at /srv/www/mahara/htdocs/lib/view.php:2322
* View->get_blocks(false, string(size 4)) at /srv/www/mahara/htdocs/export/leap/lib.php:403
* PluginExportLeap->export_views() at /srv/www/mahara/htdocs/export/leap/lib.php:185
* PluginExportLeap->export() at /srv/www/mahara/htdocs/export/lib.php:1125
* PluginExportAll->export(false) at /srv/www/mahara/htdocs/export/lib.php:760
* export_process_queue() at /srv/www/mahara/htdocs/lib/cron.php:201
[WAR] ce (lib/pieforms/pieform.php:1847) Undefined array key "REMOTE_ADDR"
Call stack (most recent first):
* log_message(string(size 33), integer, true, true, string(size 47), integer) at /srv/www/mahara/htdocs/lib/errors.php:514
* error(integer, string(size 33), string(size 47), integer) at /srv/www/mahara/htdocs/lib/pieforms/pieform.php:1847
* Pieform::get_ip() at /srv/www/mahara/htdocs/lib/pieforms/pieform.php:1831
* Pieform->hash_fieldnames() at /srv/www/mahara/htdocs/lib/pieforms/pieform.php:309
* Pieform->__construct(array(size 13)) at /srv/www/mahara/htdocs/lib/pieforms/pieform.php:159
* Pieform::process(array(size 13)) at /srv/www/mahara/htdocs/lib/mahara.php:5787
* pieform(array(size 13)) at /srv/www/mahara/htdocs/artefact/annotation/lib.php:1159
* ArtefactTypeAnnotationfeedback::get_annotation_feedback_for_view(object(ArtefactTypeAnnotation), object(View), string(size 5), true, false) at /srv/www/mahara/htdocs/artefact/annotation/blocktype/annotation/lib.php:138
* PluginBlocktypeAnnotation::render_instance(object(BlockInstance), false, false) at /srv/www/mahara/htdocs/blocktype/lib.php:144
* PluginBlocktype::render_instance_export(object(BlockInstance), false, false, string(size 4)) at /srv/www/mahara/htdocs/lib/mahara.php:1943
* call_static_method(string(size 25), string(size 22), object(BlockInstance), false, false, string(size 4)) at /srv/www/mahara/htdocs/blocktype/lib.php:1780
* BlockInstance->render_viewing(string(size 4), false) at /srv/www/mahara/htdocs/lib/view.php:2322
* View->get_blocks(false, string(size 4)) at /srv/www/mahara/htdocs/export/leap/lib.php:403
* PluginExportLeap->export_views() at /srv/www/mahara/htdocs/export/leap/lib.php:185
* PluginExportLeap->export() at /srv/www/mahara/htdocs/export/lib.php:1125
* PluginExportAll->export(false) at /srv/www/mahara/htdocs/export/lib.php:760
* export_process_queue() at /srv/www/mahara/htdocs/lib/cron.php:201
[WAR] ce (lib/pieforms/pieform.php:1847) Undefined array key "REMOTE_ADDR"
Call stack (most recent first):
* log_message(string(size 33), integer, true, true, string(size 47), integer) at /srv/www/mahara/htdocs/lib/errors.php:514
* error(integer, string(size 33), string(size 47), integer) at /srv/www/mahara/htdocs/lib/pieforms/pieform.php:1847
* Pieform::get_ip() at /srv/www/mahara/htdocs/lib/pieforms/pieform.php:1831
* Pieform->hash_fieldnames() at /srv/www/mahara/htdocs/lib/pieforms/pieform.php:309
* Pieform->__construct(array(size 13)) at /srv/www/mahara/htdocs/lib/pieforms/pieform.php:159
* Pieform::process(array(size 13)) at /srv/www/mahara/htdocs/lib/mahara.php:5787
* pieform(array(size 13)) at /srv/www/mahara/htdocs/artefact/annotation/lib.php:1159
* ArtefactTypeAnnotationfeedback::get_annotation_feedback_for_view(object(ArtefactTypeAnnotation), object(View), string(size 5), true, false) at /srv/www/mahara/htdocs/artefact/annotation/blocktype/annotation/lib.php:138
* PluginBlocktypeAnnotation::render_instance(object(BlockInstance), false, false) at /srv/www/mahara/htdocs/blocktype/lib.php:144
* PluginBlocktype::render_instance_export(object(BlockInstance), false, false, string(size 4)) at /srv/www/mahara/htdocs/lib/mahara.php:1943
* call_static_method(string(size 25), string(size 22), object(BlockInstance), false, false, string(size 4)) at /srv/www/mahara/htdocs/blocktype/lib.php:1780
* BlockInstance->render_viewing(string(size 4), false) at /srv/www/mahara/htdocs/lib/view.php:2322
* View->get_blocks(false, string(size 4)) at /srv/www/mahara/htdocs/export/leap/lib.php:403
* PluginExportLeap->export_views() at /srv/www/mahara/htdocs/export/leap/lib.php:185
* PluginExportLeap->export() at /srv/www/mahara/htdocs/export/lib.php:1125
* PluginExportAll->export(false) at /srv/www/mahara/htdocs/export/lib.php:760
* export_process_queue() at /srv/www/mahara/htdocs/lib/cron.php:201
[WAR] ce (lib/errors.php:529) [TypeError]: get_class(): Argument #1 ($object) must be of type object, string given at /srv/www/mahara/htdocs/module/submissions/src/Tools/SubmissionTools.php:651
Call stack (most recent first):
* exception() at Unknown:0
A nonrecoverable error occurred. This probably means you have encountered a bug in the system
root@mahara-server:/srv/www/mahara/htdocs#
25 October 2023, 1:28
Actually i think i have this sorted. Looks to be a linux Server issue.
One folder in dataroot (exports) kept getting root permissions along with how i was calling the cron.php in /etc/crontab I had to make sure the dataroot folder definatly had the www-data permissions this time then i changed how i was calling the cron.php in the /etc/crontab and i think its working now.
just leaving this here in case someone else has the same issues it might help someone else down the line