Usage Statistics File Loader Error

Hi,
I received this log file in the email. Can anyone help me understand these errors:

[2023-08-05 13:32:49] https://journal.seisense.com
[2023-08-05 13:32:49] [Notice] Task process started.
[2023-08-05 13:32:49] [Error] Skipped log file usage_events_20230731.log because statistics from that month have already been calculated. To recalculate statistics for a previous month, you must restore all of that month’s log files and use the CLI tool to reprocess statistics.
[2023-08-05 13:32:49] [Error] Invalid log entry at line 177 in the log file usage_events_20230804.log: Issue galley ID is not an integer.
[2023-08-05 13:32:49] [Error] Invalid log entry at line 340 in the log file usage_events_20230804.log: Issue galley ID is not an integer.
[2023-08-05 13:32:49] [Notice] The background job that will process the log file /home/seisense/ojsdata/usageStats/processing/usage_events_20230804.log and store the statistics data has been dispatched.
[2023-08-05 13:32:49] [Notice] File /home/seisense/ojsdata/usageStats/processing/usage_events_20230804.log was processed and archived.
[2023-08-05 13:32:50] [Error] Skipped log file usage_events_20230730.log because statistics from that month have already been calculated. To recalculate statistics for a previous month, you must restore all of that month’s log files and use the CLI tool to reprocess statistics.
[2023-08-05 13:32:50] [Notice] Task process stopped.

OJS: 3.4.0.1
PHP: 8.1

Regards
seisense

Hi,
Like everyday, I received usage stats log details in the email:

[2023-08-06 13:35:42] https://journal.seisense.com
[2023-08-06 13:35:42] [Notice] Task process started.
[2023-08-06 13:35:42] [Error] Skipped log file usage_events_20230731.log because statistics from that month have already been calculated. To recalculate statistics for a previous month, you must restore all of that month’s log files and use the CLI tool to reprocess statistics.
[2023-08-06 13:35:42] [Error] Skipped log file usage_events_20230730.log because statistics from that month have already been calculated. To recalculate statistics for a previous month, you must restore all of that month’s log files and use the CLI tool to reprocess statistics.
[2023-08-06 13:35:43] [Error] Invalid log entry at line 180 in the log file usage_events_20230805.log: Issue galley ID is not an integer.
[2023-08-06 13:35:43] [Error] Invalid log entry at line 199 in the log file usage_events_20230805.log: Issue galley ID is not an integer.
[2023-08-06 13:35:44] [Error] Invalid log entry at line 200 in the log file usage_events_20230805.log: Issue galley ID is not an integer.
[2023-08-06 13:35:44] [Error] Invalid log entry at line 614 in the log file usage_events_20230805.log: Issue galley ID is not an integer.
[2023-08-06 13:35:44] [Error] Invalid log entry at line 615 in the log file usage_events_20230805.log: Issue galley ID is not an integer.
[2023-08-06 13:35:45] [Notice] The background job that will process the log file /home/seisense/ojsdata/usageStats/processing/usage_events_20230805.log and store the statistics data has been dispatched.
[2023-08-06 13:35:45] [Notice] File /home/seisense/ojsdata/usageStats/processing/usage_events_20230805.log was processed and archived.
[2023-08-06 13:35:45] [Notice] Task process stopped.

I carefully, reviewed errors at line 199, 200, 614 and 615 in usage_events_20230805.log file and noticed that all these are related to “assocType”:261".
I have copied the line no 614 and 615 from log file for the experts here on the forum and if this can further help in investigating the issue.

{“time”:“2023-08-05 16:52:06”,“ip”:“ef5a6bdfec15c4627ae51245931912a23d5ed6c06233db566fe42f7759dbd19e”,“userAgent”:“Turnitin (https://bit.ly/2UvnfoQ)”,“canonicalUrl”:“https://journal.seisense.com/jom/issue/download/6/7”,“assocType”:261,“contextId”:1,“submissionId”:null,“representationId”:null,“submissionFileId”:null,“fileType”:null,“country”:null,“region”:null,“city”:null,“institutionIds”:,“version”:“3.4.0.1”,“issueId”:6,“issueGalleyId”:“7”}
{“time”:“2023-08-05 16:52:07”,“ip”:“ef5a6bdfec15c4627ae51245931912a23d5ed6c06233db566fe42f7759dbd19e”,“userAgent”:“Turnitin (https://bit.ly/2UvnfoQ)”,“canonicalUrl”:“https://journal.seisense.com/jom/issue/download/8/5”,“assocType”:261,“contextId”:1,“submissionId”:null,“representationId”:null,“submissionFileId”:null,“fileType”:null,“country”:null,“region”:null,“city”:null,“institutionIds”:,“version”:“3.4.0.1”,“issueId”:8,“issueGalleyId”:“5”}

Thanks
seisense

Hi,
And yet another intersting fact:
Error in the usage stats log file (reported above) at line 199, 200 and 614 is about Volume no 2 and issue no 1 in my journal where I have uploaded the Complete issue galley.
Similarly, error at line no 615 is about Volume no 2 issue no 3 where again I have uploaded the complete issue galley.

(* there are only a few issues where we had uploaded the complete issue galley as a requirement of one of the indexing bodies, later we stopped uploading complete issues)

Why these complete issue galley files are causing error and what is the solution. I ll be counting on your help.
Thanks
seisense

Hi,
I dont have the following two days log files in usagestats folder. But everyday CRON job is trying to find these files to run and then sending me error log file in email. Please suggest how can i skip these two files as these are not available.

[2023-08-08 13:36:42] [Error] Skipped log file usage_events_20230731.log because statistics from that month have already been calculated. To recalculate statistics for a previous month, you must restore all of that month’s log files and use the CLI tool to reprocess statistics.
[2023-08-08 13:36:42] [Error] Skipped log file usage_events_20230730.log because statistics from that month have already been calculated. To recalculate statistics for a previous month, you must restore all of that month’s log files and use the CLI tool to reprocess statistics.
[2023-08-08 13:36:42] [Notice] Task process stopped.

OJS: 3.4.0.1
PHP: 8.1

Thanks
seisense

Hello @seisense

Can you find those files under ‘files_dir’/usageStats/stage/ directory?
Moving them out of that folder should stop the crontab job failing to process them…

1 Like