Unable to activate usageStats plugin in OMP 3.3.0

Hi!

We run OJS and OMP 3.3.0 alongside each other on the same machine. The usageStats for OJS work as intended, but OMP does not produce any data. We only have one press in OMP.

  1. In both the press (Administration > Hosted Presses > SettingsWizard > Plugins) and the general plugin interface the Usage Statistics shows that is missing the “Enabled” checkmark, but the checkbox is inactive and can not be toggled.
  2. In the database it looks like the plugin is actually enabled:
MariaDB [omp]> SELECT * FROM plugin_settings WHERE plugin_settings.plugin_name = 'usagestatsplugin';
+------------------+------------+-------------------------+-------------------------------------------------------------------------------------------------------------------+--------------+
| plugin_name      | context_id | setting_name            | setting_value                                                                                                     | setting_type |
+------------------+------------+-------------------------+-------------------------------------------------------------------------------------------------------------------+--------------+
| usagestatsplugin |          0 | accessLogFileParseRegex | /^(?P<ip>\S+) \S+ \S+ \[(?P<date>.*?)\] "\S+ (?P<url>\S+).*?" (?P<returnCode>\S+) \S+ ".*?" "(?P<userAgent>.*?)"/ | string       |
| usagestatsplugin |          0 | chartType               | bar                                                                                                               | string       |
| usagestatsplugin |          0 | compressArchives        | 0                                                                                                                 | bool         |
| usagestatsplugin |          0 | createLogFiles          | 1                                                                                                                 | bool         |
| usagestatsplugin |          0 | dataPrivacyOption       | 0                                                                                                                 | bool         |
| usagestatsplugin |          0 | datasetMaxCount         | 4                                                                                                                 | string       |
| usagestatsplugin |          0 | enabled                 | 1                                                                                                                 | bool         |
| usagestatsplugin |          0 | optionalColumns         | ["city","region"]                                                                                                 | object       |
| usagestatsplugin |          0 | saltFilepath            |                                                                                                                   | string       |
| usagestatsplugin |          1 | chartType               | bar                                                                                                               | string       |
| usagestatsplugin |          1 | datasetMaxCount         | 4                                                                                                                 | string       |
| usagestatsplugin |          1 | displayStatistics       | 0                                                                                                                 | bool         |
+------------------+------------+-------------------------+-------------------------------------------------------------------------------------------------------------------+--------------+
12 rows in set (0.000 sec)
  1. The directory $FILES/usageStats/usageEventLogs/ for OMP is empty. The equivalent directory for OJS always contains logs for today and yesterday. All directories are owned by www-data.
  2. Both applications use the acron plugin.
  3. When I try to run the scheduled tasks by hand (like described here https://docs.pkp.sfu.ca/admin-guide/en/statistics#2-configure-a-server-side-cron-job). I get Invalid address: (From): root@localhost for OMP, OJS works fine.

Any ideas what the problem is or what I should check beyond the things above?

This error is triggered because the system tries to send an email which is invalid. Adding an echo to lib/pkp/classes/scheduledTask/ScheduledTaskHelper.inc.php gives me the email content it tries to send:

Your Open Monograph Press installation automatically executed and finished this task and you can download the log file here: https://< my domain >/index/admin/downloadScheduledTaskLogFile?file=Usagestatisticsfileloadertask-640b33870b0f9-20230310.log
Invalid address: (From): root@localhost

The log:

[2023-03-10 13:41:27] https://< my domain >/books
[2023-03-10 13:41:27] [Notice] Task process started.
[2023-03-10 13:41:27] [Warning] Usage statistics plugin is disabled. No log files processed.
[2023-03-10 13:41:27] [Notice] Task process stopped.

So this aligns with what I see in the plugins administrator interface, but not with the database.

Ok it seems running

php lib/pkp/tools/installPluginVersion.php plugins/generic/usageStats/version.xml

Fixed the issue. Now it shows as activated in the administration and event logs are being generated.

This topic was automatically closed after 2 days. New replies are no longer allowed.