OJS 3.3.0.8 PKP PLN errors

We have installed PKP PLN plugin and the plugin seemed fine. However, after checking the uploads to the network it was stuck on pending. After more inspection we figured that the problem is in the bagit implementation and the plugin adds the root directory to the file directory name, hence it cannot make the zip files.

We could not find any solutions online but we fixed this problem by changing some parts of the code that are responsible of making the zip file. However, now we are facing a new problem and need your help in this regard.
There are 2 different errors : harvest-error and bag-error. I cannot find any errors in the PHP error logs.
The following is being shown on the plugin’s page:

image

and the latest scheduled task log is as follows:

[2022-06-07 07:34:35] [ملاحظة] Trying status update for 1 (Issue: 2) (Local Status: [منقولة], Processing Status: [مجهول], Lockss Status: [مجهول])
[2022-06-07 07:34:35] [ملاحظة] Processing status got for 1 -> (harvest-error)
[2022-06-07 07:34:35] [ملاحظة] Deposit 1 has unknown processing state harvest-error
[2022-06-07 07:34:36] [ملاحظة] Trying status update for 2 (Issue: 7) (Local Status: [منقولة], Processing Status: [مجهول], Lockss Status: [مجهول])
[2022-06-07 07:34:36] [ملاحظة] Processing status got for 2 -> (harvest-error)
[2022-06-07 07:34:36] [ملاحظة] Deposit 2 has unknown processing state harvest-error
[2022-06-07 07:34:37] [ملاحظة] Trying status update for 3 (Issue: 8) (Local Status: [منقولة], Processing Status: [مجهول], Lockss Status: [مجهول])
[2022-06-07 07:34:37] [ملاحظة] Processing status got for 3 -> (harvest-error)
[2022-06-07 07:34:37] [ملاحظة] Deposit 3 has unknown processing state harvest-error
[2022-06-07 07:34:38] [ملاحظة] Trying status update for 4 (Issue: 9) (Local Status: [منقولة], Processing Status: [مجهول], Lockss Status: [مجهول])
[2022-06-07 07:34:38] [ملاحظة] Processing status got for 4 -> (bag-error)
[2022-06-07 07:34:38] [ملاحظة] Deposit 4 has unknown processing state bag-error
[2022-06-07 07:34:38] [ملاحظة] Trying status update for 5 (Issue: 10) (Local Status: [منقولة], Processing Status: [مجهول], Lockss Status: [مجهول])
[2022-06-07 07:34:39] [ملاحظة] Processing status got for 5 -> (bag-error)
[2022-06-07 07:34:39] [ملاحظة] Deposit 5 has unknown processing state bag-error
[2022-06-07 07:34:40] [ملاحظة] Trying status update for 6 (Issue: 11) (Local Status: [منقولة], Processing Status: [مجهول], Lockss Status: [مجهول])
[2022-06-07 07:34:40] [ملاحظة] Processing status got for 6 -> (bag-error)
[2022-06-07 07:34:40] [ملاحظة] Deposit 6 has unknown processing state bag-error
[2022-06-07 07:34:40] [ملاحظة] Trying status update for 7 (Issue: 12) (Local Status: [منقولة], Processing Status: [مجهول], Lockss Status: [مجهول])
[2022-06-07 07:34:41] [ملاحظة] Processing status got for 7 -> (bag-error)
[2022-06-07 07:34:41] [ملاحظة] Deposit 7 has unknown processing state bag-error
[2022-06-07 07:34:41] [ملاحظة] Trying status update for 8 (Issue: 17) (Local Status: [منقولة], Processing Status: [مجهول], Lockss Status: [مجهول])
[2022-06-07 07:34:42] [ملاحظة] Processing status got for 8 -> (harvest-error)
[2022-06-07 07:34:42] [ملاحظة] Deposit 8 has unknown processing state harvest-error
[2022-06-07 07:34:42] [ملاحظة] Trying status update for 9 (Issue: 22) (Local Status: [منقولة], Processing Status: [مجهول], Lockss Status: [مجهول])
[2022-06-07 07:34:43] [ملاحظة] Processing status got for 9 -> (harvest-error)
[2022-06-07 07:34:43] [ملاحظة] Deposit 9 has unknown processing state harvest-error
[2022-06-07 07:34:43] [ملاحظة] Trying status update for 10 (Issue: 23) (Local Status: [منقولة], Processing Status: [مجهول], Lockss Status: [مجهول])
[2022-06-07 07:34:44] [ملاحظة] Processing status got for 10 -> (bag-error)
[2022-06-07 07:34:44] [ملاحظة] Deposit 10 has unknown processing state bag-error
[2022-06-07 07:34:44] [ملاحظة] Trying status update for 11 (Issue: 26) (Local Status: [منقولة], Processing Status: [مجهول], Lockss Status: [مجهول])
[2022-06-07 07:34:45] [ملاحظة] Processing status got for 11 -> (harvest-error)
[2022-06-07 07:34:45] [ملاحظة] Deposit 11 has unknown processing state harvest-error
[2022-06-07 07:34:45] [ملاحظة] Trying status update for 12 (Issue: 28) (Local Status: [منقولة], Processing Status: [مجهول], Lockss Status: [مجهول])
[2022-06-07 07:34:46] [ملاحظة] Processing status got for 12 -> (bag-error)
[2022-06-07 07:34:46] [ملاحظة] Deposit 12 has unknown processing state bag-error
[2022-06-07 07:34:46] [ملاحظة] Trying status update for 13 (Issue: 29) (Local Status: [منقولة], Processing Status: [مجهول], Lockss Status: [مجهول])
[2022-06-07 07:34:47] [ملاحظة] Processing status got for 13 -> (bag-error)
[2022-06-07 07:34:47] [ملاحظة] Deposit 13 has unknown processing state bag-error
[2022-06-07 07:34:47] [ملاحظة] Trying status update for 14 (Issue: 31) (Local Status: [منقولة], Processing Status: [مجهول], Lockss Status: [مجهول])
[2022-06-07 07:34:48] [ملاحظة] Processing status got for 14 -> (bag-error)
[2022-06-07 07:34:48] [ملاحظة] Deposit 14 has unknown processing state bag-error

Your help is highly appreciated. :smiley:

Hi @GoudaO!

Are you using the latest version of the plugin, just curious because other people have been using it and didn’t have such issues.

Can you tell me the journal URL? I’ll check what’s happening from our side.

  • The “harvest-error” happens when the server fails to retrieve the issue from you, there might be N reasons.
  • The “bag-error” is normally related to a failure in the checksum validation of the BagIt file.

Best,
Jonas

Hi @jonasraoni !

Thank you for your prompt response!
Yes we are using the latest version of the plugin. We tried to install the plugin using the two methods mentioned in Github (from plugin panel in OJS and building it from source). Currently we are using the one that is provided by the plugin panel.

I think I found another post here that had the same root directory problem but no solution was found. The link for the post is here

The main URL is https://spu.sharjah.ac.ae and we actually have 3 journals the one shown here is https://spu.sharjah.ac.ae/index.php/HSS

Please let me know if there is anything else that I can provide.

Thanks for the link, I’ve been reviewing/solving older issues related to the PKP PN, but I still didn’t reach this one :slight_smile:

About your deposits:

  • harvest-error: One failure happened because your server didn’t send a response, for the others the server sent less data than expected. Looks like it was a temporary issue, I restarted one deposit and it worked fine (but failed in the bag validation)
  • bag-error: Something failed in the validation, I’ll investigate (maybe tomorrow).

Best,
Jonas

Hi GoudaO

“- If an issue fails to be packaged, it may be useful to try and export the issue
from the native import/export plugin. Possible export problems may cause the
PLN Plugin to fail to send the failed content, and the native import/export
plugin may display some hints on why the failure occured.”

Did you try to do that for an issue? It may be that metadata is missing. Mostly it is a problem of “faulty” author names - every author must have a first name, if there are publications without authors (yes, this exists), a dummy author must be specified.

Hi @mpbraendle,

Thank you very much for your reply. I did not know that this can be a problem.

However, I have exported one of the issues and verified that all metadata are compete and I have re-imported it in the journal and no problems the system validated it and imported the issue successfully. Unfortunately it did not solve the bag problem.

You could try to reset one of the issues in the PKP PN plugin (click the triangle left to the issue, then reset). Then you would have to wait until next morning and check the status of the issue again. The PKP PN deposit needs some patience (especially if there are 307 issues as in our journal).

Hi!

@mpbraendle The reset isn’t going to help, there’s an issue in the bag validation, so if you reset, it will end up in the same situation.

@GoudaO In order to ensure your updates to the code didn’t break the bag (and perhaps to debug/fix), please check it against this package: GitHub - whikloj/BagItTools: A PHP BagIt library
The usage is simple, there’s a validate() method (also looks like there’s support for usage through the command line).

Best,
Jonas

1 Like

@GoudaO Just to confirm, I’ve tried to validate one of the bags and it failed, so there’s something wrong there (unless the library is broken).

Best,
Jonas

Hi @jonasraoni I have tried the validate method as mentioned in the GitHub, and the following error was produced in php error log.

[10-Jun-2022 21:49:19 Europe/Berlin] PHP Warning:  require_once(*OJS path*\plugins\generic\pln\vendor\whikloj\bagittools\bin/../vendor/autoload.php): failed to open stream: No such file or directory in *OJS path*\plugins\generic\pln\vendor\whikloj\bagittools\bin\console on line 3
[10-Jun-2022 21:49:19 Europe/Berlin] PHP Fatal error:  require_once(): Failed opening required '*OJS path*\plugins\generic\pln\vendor\whikloj\bagittools\bin/../vendor/autoload.php' (include_path='C:\xampp\php\PEAR') in *OJS path*\plugins\generic\pln\vendor\whikloj\bagittools\bin\console on line 3

so I modified the require once to be directed to the correct path.

"from"
require_once __DIR__ . '/../vendor/autoload.php';
"to"
require_once __DIR__ . '/../../../../vendor/autoload.php';

however it produced a new error

[10-Jun-2022 22:03:49 Europe/Berlin] PHP Fatal error:  Uncaught Error: Class 'Symfony\Component\Console\Application' not found in *OJS path*\plugins\generic\pln\vendor\whikloj\bagittools\bin\console:8
Stack trace:
#0 {main}
  thrown in *OJS path*\plugins\generic\pln\vendor\whikloj\bagittools\bin\console on line 8

We are sure that this is the same problem we had before changing the code to get bagittools working. So, if we are able to fix this one, we can revert the changes that we did in the first place.

We think that the whole problem is generated from the fact that we are using XAMPP on Windows server.
Please let me know what I should do next.

Thanks a lot for your help.

@GoudaO I think there’s a big possibility to be something related to Windows (the other post you’ve linked also happened under Windows), so I’ve created an issue in GitHub to investigate it: Possible problem to generate deposits on Windows · Issue #26 · pkp/pln · GitHub.

For now there’s nothing you can do, besides waiting for me or attempting to fix by yourself, I’ll leave this topic opened and I’ll come back with news later :slight_smile:

Best,
Jonas

FYI I’ve started taking a look on this issue, and I can confirm the package really doesn’t work properly under Windows.
I’ll check if it’s complex to fix :slight_smile:

Update: I’ve fixed the issues I had with the package in my Windows environment, and submitted a fix for the author here: Path issues on a Windows environment · Issue #45 · whikloj/BagItTools · GitHub

Best,
Jonas

Hi!

My fixes to the BagItTools have been merged, so it should work under Windows. I’ve created pull requests to update the plugin here: Problem to generate deposits on Windows · Issue #26 · pkp/pln · GitHub

I’m not sure when we’ll release a new version for the plugin gallery, so until there, a temporary fix is to download the code with the fixes and install it using the instructions from the file README.md.

I fully indicate to just wait for a plugin update from the plugin gallery, unless you’re in a hurry to get the content preserved (e.g. if your journal is going to be closed).

Best,
Jonas