Upgradation from 2.3.7 to 2.4.6 but the view counter is not working it's 0

I followed the steps outlined in the upgrade and all OK! The only problem are the VIEWS that appear to “0”. Is not migrated … I can help.

I leave the results before: :confundido:

and after:

Can you help me ??? thanks

Hi @susana,

See this link: https://pkp.sfu.ca/wiki/index.php?title=PKP_Statistics_Framework#Note_for_Upgraders

Alec Smecher
Public Knowledge Project Team

Hola asmecher

Realicé todos los pasos que aparecen en el enlace que me enviaste y siguen las vistas en “0”
Estoy migrando mi OJS desde la versión 2.3.7 a la 2.4.3

  • El archivo config.ini.php (base_url = “http://localhost/ojs243”)
  • Activado “create log files” y “statistics generic plugins”
  • Permisos “OK”

No tengo muy claro cual comando debo correr:
1 OJS log files php tools/runScheduledTasks.php plugins/generic/usageStats/scheduledTasks.xml
2 OJS log files with automated staging process php tools/runScheduledTasks.php plugins/generic/usageStats/scheduledTasksAutoStage.xml
3 External log files php tools/runScheduledTasks.php plugins/generic/usageStats/scheduledTasksExternalLogFiles.xml

Utilicé el comando 3 pero sin resultados.
Copie el acces.log de apache en la carpeta “stage” y luego corrí php tools/runScheduledTasks.php plugins/generic/usageStats/scheduledTasksExternalLogFiles.xml pero no tuve ningún resultado

Me puedes ayudar con este problema…
Mil Gracias confuso:

@susana, if you are importing your Apache logs into OJS, you will need the third command, scheduledTasksExternalLogFiles.xml. I suspect that running the command is not working because your base_url in config.inc.php does not match what is being recorded in the Apache log. See:

Buenos Días ctgraham

Revisé y todo esta bien.

Ejecute tools/runScheduledTasks.php plugins/generic/usageStats/scheduledTasksExternalLogFiles.xml
El log de apache pasa a la carpeta “/usageStats/processing/” lo malo es que está dentro de la carpeta “/usageStats/processing” desde anoche y no termina de procesar. Revisé la carpeta “reject” y no hay nada allí.

El log que estoy tratando de procesar pesa 2.5 mb.

Te anexo una parte de los log que estoy tratando de procesar: - - [22/Nov/2015:02:54:13 -0500] “GET /ojs/index.php/actualinvestigacion/article/download/3052/2968 HTTP/1.1” 404 541 “-” “Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)” - - [22/Nov/2015:02:55:28 -0500] “GET / HTTP/1.1” 200 454 “-” “Mozilla/5.0 (compatible; Baiduspider/2.0; +http://www.baidu.com/search/spider.html)” - - [22/Nov/2015:02:57:17 -0500] “GET /ojs/index.php/creando/user/%5C/%5C/www.camdenabudis.net%5C/passwordtest%5C/rayban-sunglasses.html HTTP/1.1” 404 559 “-” “Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)” - - [22/Nov/2015:03:01:04 -0500] “GET /ojs/index.php/memoriasula/user/%5C/%5C/www.scholarware.com HTTP/1.1” 404 536 “-” “Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)” - - [22/Nov/2015:03:04:51 -0500] “GET /ojs/index.php/biomedicina/user/%5C/%5C/www.katespadehandbagsoutletzone.com HTTP/1.1” 404 548 “-” “Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)” - - [22/Nov/2015:03:07:29 -0500] “GET /ojs/index.php/cienciaeingenieria/article/view/278/0 HTTP/1.1” 404 533 “-” “Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)” - - [22/Nov/2015:03:08:38 -0500] “GET /ojs/index.php/sapienza/user/%5C%22http:%5C/%5C/www.nikeshoesmen.in.net%5C%22 HTTP/1.1” 404 550 “-” “Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)” - - [22/Nov/2015:03:12:25 -0500] “GET /ojs/index.php/actualidadcontable/user/%5C%22http:%5C/%5C/www.bestplacenacutici1980.xpg.com.br%5C/kak-vzyat-kredit-v-kazahtelekome-dlya-ego-sotrudnikov.html%5C%22 HTTP/1.1” 404 614 “-” “Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)”

Necesito ayuda cry:

If no usageStats scheduled task is currently running, you can manually move the file from the “processing” folder to the “stage” folder in order to reprocess the file.

Reviewing “/var/mail/root” I found this error :
Subject: La tarea no ha generado =?UTF-8?B?bmluZ8O6biByZWdpc3Ryby4gLSA1NjY4OGZk?= =?UTF-8?B?YWQ2ZWQwIC0gRXJyb3I=?=
X-PHP-Originating-Script: 0:String.inc.php

Is it for this reason that the statistics do not process?
What do I do in this case?

Help me!! pensive:

Maybe. It is hard to tell because it looks like there is a bad translation in:

This should be the name of the process, but it looks like an error message.

Have you copied the full email message from root’s mail?

Hi How Are you?

Write the command:
php tools / runScheduledTasks.php plugins / generic / usageStats / scheduledTasksExternalLogFiles.xml

Then send me the following email:

From: root root@migraojs.saber.ula.ve
Message-Id: 201512101400.tBAE0Kg3016642@migraojs.saber.ula.ve
To: “SABER - ULA” info@saber.ula.ve
Subject: La tarea no ha generado =?UTF-8?B?bmluZ8O6biByZWdpc3Ryby4gLSA1NjY5ODU3?= =?UTF-8?B?NDcwMDhlIC0gRXJyb3I=?=
X-PHP-Originating-Script: 0:String.inc.php
Content-Type: text/plain; charset=“utf-8”
X-Mailer: Public Knowledge Project Suite v2
Date: Thu, 10 Dec 2015 09:00:20 -0500

Then the apache log appears in the folder “reject”

Help me please!

If the apache log file gets moved to “reject”, there should be associated body text with that message that describes the actual error. What you are seeing at this point look like email headers. Is email going off-server at this point? Did in**@*****.ula.ve receive a message?

No entiendo esa parte :frowning:

Poniendo a un lado el mensaje de correo.

Al escribir el comando
php tools / runScheduledTasks.php plugins / generic / usageStats / scheduledTasksExternalLogFiles.xml

El log de apache pasa de la carpeta “stage” a la carpeta “reject”

Me puedes ayudar con ésto…

When the apache log moves from “stage” to “reject”, an error has occurred. The error message is sent via email to the Site Administrator.

I think that you have found the email headers for this error message. The error message itself should be in the email body.

Hi ctgraham

Aun sigo teniendo problemas para procesar los log de Apache.

Para realizar este proceso de migración de versión, realicé una copia del OJS y la Base de Datos en producción y lo copié en otra máquina para hacer las pruebas. Obviamente estoy trabajando con otra IP y otro nombre de host.
Sera éste un problema para migrar las estadísticas?

Para procesar los log de Apache de los años 2013-2014-2015, hago una copia de los que están en el servidor de producción y los copio en la carpeta stage para luego procesarlos. Es correcto lo que estoy haciendo?

Gracias por tu apoyo

It sounds like you are on the right path, @susana.

The hostname and IP of your development machine shouldn’t matter, as long as the base url in config.inc.php is the same as the production base url. It needs to be the same so that it can be matched in the Apache logs.

Let us know what version of OJS you are using, and what error messages you see.

Hola ctgraham

The log is processed well. Thank you

While the logs are precesaron, galleys view “0”: cry:
Can you help me?

Hi @susana,

OJS 2.4.3 is already getting old, and a lot of bug fixes related to statistics processing were introduced in the later versions. If you can’t upgrade, at least take a look at the recommended patches page for 2.4.3: https://pkp.sfu.ca/wiki/index.php?title=OJS_2.4.3_Recommended_Patches

But I would highly recommend to upgrade to the latest version.

In any case, let us know if this information helped.


Good morning.
Upgrade wing version 2.4.8. I can not process apache logs since the return to the reject folder.
I checked the url_base… permission …
Can you help me.

This email came to /var/mail/root when it finishes processing the logs

From MAILER-DAEMON Thu Feb 18 11:13:26 2016
Received: from localhost (localhost)
by migraojs.saber.ula.ve (8.14.4/8.14.4/Debian-4) id u1IGDQKH007822;
Thu, 18 Feb 2016 11:13:26 -0500
Date: Thu, 18 Feb 2016 11:13:26 -0500
From: Mail Delivery Subsystem
Message-Id: 201602181613.u1IGDQKH007822@migraojs.saber.ula.ve
To: root@migraojs.saber.ula.ve
MIME-Version: 1.0
Content-Type: multipart/report; report-type=delivery-status;
Subject: Returned mail: see transcript for details
Auto-Submitted: auto-generated (failure)

This is a MIME-encapsulated message


The original message was received at Thu, 18 Feb 2016 11:13:24 -0500
from localhost.localdomain []

----- The following addresses had permanent fatal errors -----
(reason: 553 5.1.8 info@saber.ula.ve… Domain of sender address root@migraojs.saber.ula.ve does not exist)

----- Transcript of session follows -----
… while talking to mail.saber.ula.ve.:

<<< 553 5.1.8 info@saber.ula.ve… Domain of sender address root@migraojs.saber.ula.ve does not exist
550 5.1.1 info@saber.ula.ve… User unknown
<<< 503 5.0.0 Need RCPT (recipient)

Content-Type: message/delivery-status

Reporting-MTA: dns; migraojs.saber.ula.ve
Received-From-MTA: DNS; localhost.localdomain
Arrival-Date: Thu, 18 Feb 2016 11:13:24 -0500

Final-Recipient: RFC822; info@saber.ula.ve
Action: failed
Status: 5.1.8
Remote-MTA: DNS; mail.saber.ula.ve
Diagnostic-Code: SMTP; 553 5.1.8 info@saber.ula.ve… Domain of sender address root@migraojs.saber.ula.ve does not exist
Last-Attempt-Date: Thu, 18 Feb 2016 11:13:26 -0500

Content-Type: text/rfc822-headers

Return-Path: root@migraojs.saber.ula.ve
Received: from migraojs.saber.ula.ve (localhost.localdomain [])
by migraojs.saber.ula.ve (8.14.4/8.14.4/Debian-4) with ESMTP id u1IGDOKH007820
for info@saber.ula.ve; Thu, 18 Feb 2016 11:13:24 -0500
Received: (from root@localhost)
by migraojs.saber.ula.ve (8.14.4/8.14.4/Submit) id u1IGDO08007819;
Thu, 18 Feb 2016 11:13:24 -0500
From: root root@migraojs.saber.ula.ve
Message-Id: 201602181613.u1IGDO08007819@migraojs.saber.ula.ve
To: “SABER - ULA” info@saber.ula.ve
Subject: =?UTF-8?B?RXN0YWTDrXN0aWNhcyBkZSB1c28gZGUgbGEgdGFyZWEgZGUgc3ViaWRhIGRl?= =?UTF-8?B?IGZpY2hlcm9zIC0gNTZjNWVkNDBlZjQxOCAtIEVycm9y?=
X-PHP-Originating-Script: 1000:String.inc.php
Content-Type: text/plain; charset=“utf-8”
X-Mailer: Public Knowledge Project Suite v2
Date: Thu, 18 Feb 2016 11:13:24 -0500



If the logs are being sent to the reject folder, the Primary Contact should be receiving an email with a reference to an error log describing the reason for the rejected processing.

With 2.4.8, this error log could also be found in your files directory, under “scheduledTaskLogs” folder.

[2016-02-18 11:32:47] [Advertencia] La linea 2799 del fichero /var/www/ojs248/files/usageStats/processing/20150201-access.log contiene una url a la que no se le puede eliminar la url base de origen.