OJS 3.3.0.10 PKP PN Bad Request Error

Description of issue or problem I’m having:
I have one journal in the PKP PN and I am trying to preserve a second journal in the PKP PN. However, the second journal is having trouble depositing at all. After I reset the deposit, I get a Bad Request error.

It looks like I am also getting the inProgress error described elsewhere as well for my first journal (see deposit 6 in my logs below).

Steps I took leading up to the issue:
Activated PKP PN on the new journal.
Agreed to terms and initiated deposit.

What I tried to resolve the issue:
Checked OJS is up to date. Checked PKP PN is working on my first journal. Checked logs.
I’ve tried resetting the deposits a few times and waiting a while but it doesn’t change anything.
I’ve found other threads that mention this error and one suggests that it could be due to a lack of HTTPS, but I have HTTPS set up (including between us and Cloudflare).

It doesn’t look like it’s having any problem packaging the deposits - it’s only when sending that it starts to have issues.

Application Version - e.g., OJS 3.1.2:
OJS 3.3.0.10
OS: CentOS
PHP: 7.4.29
Server: nginx/1.20.1 + php-fpm
Database: 5.5.5-10.3.34-MariaDB
PKP PN Plugin: v2.0.4.2

Additional information, such as screenshots and error log messages if applicable:
2022-05-03-PKP PN Bad Request

[2022-05-02 06:11:16] https://epistemehealth.com
[2022-05-02 06:11:16] [Notice] Task process started.
[2022-05-02 06:11:16] [Notice] PLN Depositor executeActions started
[2022-05-02 06:11:16] [Notice] Depositor processing for Neuroanatomy and Behaviour.
[2022-05-02 06:11:16] [Notice] Getting service document.
[2022-05-02 06:11:19] [Notice] Processing deposit status updates.
[2022-05-02 06:11:19] [Notice] Trying status update for 6 (Issue: 6) (Local Status: [Transferred], Processing Status: [Sent to LOCKSS], Lockss Status: [Unknown])
[2022-05-02 06:11:19] [Notice] Processing status got for 6 -> (deposited)
[2022-05-02 06:11:19] [Notice] Deposit 6 has unknown LOCKSS state inProgress
[2022-05-02 06:11:19] [Notice] Processing updated content.
[2022-05-02 06:11:19] [Notice] Processing new content.
[2022-05-02 06:11:19] [Notice] Packaging content for deposit.
[2022-05-02 06:11:19] [Notice] Sending deposits to the PKP PN.
[2022-05-02 06:11:19] [Notice] Depositor processing for Journal for Reproducibility in Neuroscience.
[2022-05-02 06:11:19] [Notice] Getting service document.
[2022-05-02 06:11:20] [Notice] Processing deposit status updates.
[2022-05-02 06:11:20] [Notice] Processing updated content.
[2022-05-02 06:11:20] [Notice] Processing new content.
[2022-05-02 06:11:20] [Notice] Packaging content for deposit.
[2022-05-02 06:11:20] [Notice] Trying package deposit 4 (Issue: 4) (Local Status: [New], Processing Status: [Unknown], Lockss Status: [Unknown])
[2022-05-02 06:11:21] [Notice] Packaging for deposit 4 succeeded
[2022-05-02 06:11:21] [Notice] Trying package deposit 5 (Issue: 5) (Local Status: [New], Processing Status: [Unknown], Lockss Status: [Unknown])
[2022-05-02 06:11:22] [Notice] Packaging for deposit 5 succeeded
[2022-05-02 06:11:22] [Notice] Sending deposits to the PKP PN.
[2022-05-02 06:11:22] [Notice] Trying transfer deposit 4 (Issue: 4) (Local Status: [Packaged], Processing Status: [Unknown], Lockss Status: [Unknown])
[2022-05-02 06:11:22] [Notice] Posting the Atom file to staging server for deposit 4 (Local Status: [Packaged], Processing Status: [Unknown], Lockss Status: [Unknown]) - (Url: [http://pkp-pln.lib.sfu.ca/api/sword/2.0/col-iri/54960F22-A02D-4480-97B7-374EA389EDDD], AtomPath: [/var/www/files/journals/4/pln/140E2B1C-D0F3-47E1-90EF-8B5A5BBABF4A/140E2B1C-D0F3-47E1-90EF-8B5A5BBABF4A.xml], Method: [PostFile])
[2022-05-02 06:11:24] [Notice] Posting the Atom file to staging server for deposit 4 failed (Error: [Client error: `POST http://pkp-pln.lib.sfu.ca/api/sword/2.0/col-iri/54960F22-A02D-4480-97B7-374EA389EDDD` resulted in a `400 Bad Request` response:
<?xml version="1.0" encoding="utf-8"?>
<sword:error xmlns="http://www.w3.org/2005/Atom"
       xmlns:sword="http://purl. (truncated...)
 - []])
[2022-05-02 06:11:24] [Notice] Network error Client error: `POST http://pkp-pln.lib.sfu.ca/api/sword/2.0/col-iri/54960F22-A02D-4480-97B7-374EA389EDDD` resulted in a `400 Bad Request` response:
<?xml version="1.0" encoding="utf-8"?>
<sword:error xmlns="http://www.w3.org/2005/Atom"
       xmlns:sword="http://purl. (truncated...)
 connecting to the PKP PN to send the deposit.
[2022-05-02 06:11:24] [Notice] Trying transfer deposit 5 (Issue: 5) (Local Status: [Packaged], Processing Status: [Unknown], Lockss Status: [Unknown])
[2022-05-02 06:11:24] [Notice] Posting the Atom file to staging server for deposit 5 (Local Status: [Packaged], Processing Status: [Unknown], Lockss Status: [Unknown]) - (Url: [http://pkp-pln.lib.sfu.ca/api/sword/2.0/col-iri/54960F22-A02D-4480-97B7-374EA389EDDD], AtomPath: [/var/www/files/journals/4/pln/E71FFA89-C1E2-44CA-9FE5-D9AA5AA813F4/E71FFA89-C1E2-44CA-9FE5-D9AA5AA813F4.xml], Method: [PostFile])
[2022-05-02 06:11:24] [Notice] Posting the Atom file to staging server for deposit 5 failed (Error: [Client error: `POST http://pkp-pln.lib.sfu.ca/api/sword/2.0/col-iri/54960F22-A02D-4480-97B7-374EA389EDDD` resulted in a `400 Bad Request` response:
<?xml version="1.0" encoding="utf-8"?>
<sword:error xmlns="http://www.w3.org/2005/Atom"
       xmlns:sword="http://purl. (truncated...)
 - []])
[2022-05-02 06:11:24] [Notice] Network error Client error: `POST http://pkp-pln.lib.sfu.ca/api/sword/2.0/col-iri/54960F22-A02D-4480-97B7-374EA389EDDD` resulted in a `400 Bad Request` response:
<?xml version="1.0" encoding="utf-8"?>
<sword:error xmlns="http://www.w3.org/2005/Atom"
       xmlns:sword="http://purl. (truncated...)
 connecting to the PKP PN to send the deposit.
[2022-05-02 06:11:24] [Notice] Task process stopped.

Hi @shaun!

Thanks for the information, from the log snippet you’ve shared I can confirm the deposit is being sent to the staging server, then one of the validations is failing and returning an error (which was unfortunately stripped off), I’ll try to investigate it better tomorrow. Can you please share the contents of the file “/var/www/files/journals/4/pln/140E2B1C-D0F3-47E1-90EF-8B5A5BBABF4A/140E2B1C-D0F3-47E1-90EF-8B5A5BBABF4A.xml”?

Best,
Jonas

Hi @jonasraoni

Thanks for looking into this. here are the contents of the xml file:

<?xml version="1.0" encoding="utf-8"?>
<entry xmlns="http://www.w3.org/2005/Atom" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:pkp="http://pkp.sfu.ca/SWORD"><email><![CDATA[contact@epistemehealth.com]]></email><title><![CDATA[Journal for Reproducibility in Neuroscience]]></title><pkp:journal_url><![CDATA[https://epistemehealth.com/index.php/jrn]]></pkp:journal_url><pkp:publisherName><![CDATA[Episteme Health Inc.]]></pkp:publisherName><pkp:publisherUrl><![CDATA[]]></pkp:publisherUrl><pkp:issn><![CDATA[2670-3815]]></pkp:issn><id><![CDATA[urn:uuid:140E2B1C-D0F3-47E1-90EF-8B5A5BBABF4A]]></id><updated><![CDATA[2022-05-01 18:28:20]]></updated><pkp:content size="2023" volume="1" issue="" pubdate="2022-03-12" ojsVersion="3.3.0.10" checksumType="SHA-1" checksumValue="97acaecdb7076f42b919ad1202bbc7fa3ac01567"><![CDATA[https://epistemehealth.com/index.php/jrn/pln/deposits/140E2B1C-D0F3-47E1-90EF-8B5A5BBABF4A]]></pkp:content><pkp:license><pkp:openAccessPolicy><![CDATA[This journal provides immediate open access to its content on the principle that making research freely available to the public supports a greater global exchange of knowledge.]]></pkp:openAccessPolicy><pkp:licenseURL><![CDATA[]]></pkp:licenseURL><pkp:publishingMode>Open</pkp:publishingMode><pkp:copyrightNotice><![CDATA[<p>In order to publish we ask for a <a href="https://epistemehealth.com/index.php/nab/libraryFiles/downloadPublic/9">non-exclusive license to publish</a>. Copyright in the work is retained by authors (or their employers or funders depending applicable contractual or legal arrangements).</p>
<p>The publisher, Episteme Health Inc., recommends that authors choose the Creative Commons Attribution 4.0 International License because it provides broad reuse rights that meet the requirements of most employers and funders. However, authors may also choose the Creative Commons Attribution-ShareAlike 4.0 International License, which is Plan S-compliant. For more information, see our <a href="https://about.epistemehealth.com/policy/copyright-fair-dealing/">Copyright and Fair Dealing Policy</a>.</p>
<p><strong>Author Licensing Assertions and the Rights Retention Strategy</strong></p>
<p>Some funders are requiring or encouraging authors to insert a licensing assertion, such as the <a href="https://www.coalition-s.org/rights-retention-strategy/">Rights Retention Strategy (RRS)</a> statement, into the body of their manuscript. However, licensing assertions that are not consistent with publishing agreements can create legal risk for authors, institutions, and end users (<a href="https://doi.org/10.1629/uksg.556">Khoo, 2021</a>). Authors who wish to make specific licensing assertions in their manuscripts therefore have the following options.</p>
<ol>
<li>Remove the licensing assertion from the body of the manuscript. Since authors retain copyright and we offer choice of license, authors can simply inform us of their preferences.</li>
<li>Move the licensing assertion to the copyright statement. If authors are required to include specific language, we can include it in the copyright statement to ensure that there is clear, consistent, and complete information.</li>
<li>Retain the licensing assertion, but accept the addition of the following publisher's note.<br />"<strong>Publisher's Note:</strong> Author licensing assertions may not be reliable if they conflict with the contractual arrangements with the publisher. Before relying on a licensing assertion that conflicts with a work's copyright information, readers should seek professional advice."</li>
</ol>]]></pkp:copyrightNotice><pkp:copyrightBasis><![CDATA[]]></pkp:copyrightBasis><pkp:copyrightHolder><![CDATA[]]></pkp:copyrightHolder></pkp:license></entry>

Hi!

I just checked and I saw there are 2 journals registered in the PKP PN from your domain:

  • https:/​/​epistemehealth.com/​index.php/​nab: Seems to be functional
  • https:/​/​epistemehealth.com/​index.php/​jrn: Looks like the terms were not accepted.

So you’ll probably have to access the plugin settings through the /jrn journal and accept the terms in order to make things work, and ensure the journal has an ISSN.

Also, I saw you’re under a Cloudflare firewall, hopefully it’s not blocking the PKP PN server, that could probably raise some issues.

Best,
Jonas

I managed to reset a deposit for nab that was completed a couple of weeks ago without any trouble.

But with jrn, I have accepted terms and the ISSN is showing up in the XML. I’ve also not previously had problems being behind Cloudflare over the past few years and I don’t see anything getting blocked from Canada in the past week…

JRN-accepted

Given that all URLs of the journal are under a login protection, I believe this must be blocking the process, as the server will attempt to access some URLs on your end (e.g. https://epistemehealth.com/index.php/nab/gateway/plugin/PLNGatewayPlugin)

I’ll check with someone if it’s required to have a public journal in order to join the PKP PN, I didn’t see this information in the agreement nor the requirements… If not, I’ll create an issue to handle this situation.

So for now, you can disable the login protection (at least to check if it works), or wait me to confirm if it’s a bug and provide a fix.

Best,
Jonas

I just confirmed it should be working fine with non-public journals, so I created an issue in GitHub to handle this issue: [Plugin][PLN] Enable external access to the plugin URLs for private journals · Issue #7914 · pkp/pkp-lib · GitHub.

Best,
Jonas

Thanks @jonasraoni

I’ve disabled the login and reset the deposits. I’ll let you know how it goes in a day or two once it’s processed.

Hi @jonasraoni

Can confirm that the private journal was what was causing the problem. Making the issues public and resetting the deposit worked. They are now showing as complete.

Thanks for your help

Thanks for all the information! I’ve already solved the problem, so once the code gets merged, you should be able to just update the plugin and everything should probably work :grin:

Best,
Jonas