We are trying to implement the Dataverse plugin for our 188.8.131.52, but it constantly throws the “Unable to connect to Dataverse” error message.
This is the repository we want to connect to:
https://repositoriopesquisas.ibict.br/ (it automatically directs to https://repositoriopesquisas.ibict.br/dvn/)
I have credentials to that repository.
How can I debug this?
I tried logs, but nothing is registered in Apache that is helpful.
What is the exact error message you’re getting? I don’t see any “Unable to connect to Dataverse” message in the English locale files.
Public Knowledge Project Team
This is the translation key
The English exact wording is “Can’t connect to Dataverse”
That message comes from the
_getServiceDocument function in
plugins/generic/dataverse/classes/form/DataverseAuthForm.inc.php – I’d suggest tracking through that function and potentially adding
error_log debug statements in order to figure out what the service is returning that OJS is not expecting.
Public Knowledge Project Team
Does Dataverse require HTTPS on OJS to work?
Does it require the latest Dataverse version as well?
No, it doesn’t require either of these things.
To try isolating your problem without having to dig into OJS, can you try connecting to the Harvard Dataverse instead? It’s possible that redirects are somehow working in a strange way with your own Dataverse site, preventing you from reading the service document when making the initial connection.
The only “strange” thing that happens in our local Dataverse (https://repositoriopesquisas.ibict.br/) is that it redirects to https://repositoriopesquisas.ibict.br/dvn/. However, I just created an account at Harvard’s Dataverse, created my own Dataverse for the journal and the same problem happens.
Nothing gets logged in apache, but I think it’s somehow related to our network, or proxy settings.
OK – it’s helpful to know that it’s definitely on the OJS side. If you want to send me credentials for connecting to your Dataverse I’ll see if I can duplicate with a fresh install of OJS 2.4.8.
FYI – I just verified I’m able to connect to the Dataverse dev sandbox at http://dev1.dataverse.org with a fresh OJS install, so I can say for sure that we haven’t accidentally broken this plugin upstream as it seems to work fine in a stock configuration
To test with our OJS, that URL is enough?
I registered with that Dev Dataverse, but can’t create any.
Yes, I’d say that if you can’t connect to that Dataverse after registering, the issue is likely on your OJS(/server) side.
Is there anything I can set up in order to debug?
Here’s the config…
Now with the error message:
As Alec said, at that point you’re probably stuck a) trying to isolate whatever might be strange in your server environment (you could try it on a fresh VM elsewhere as I’ve just done) or b) adding debug lines to OJS.
Have you tried connecting with an API token rather than a username? You can register one from the admin panel of that Dataverse site (or any Dataverse 4.x site).
How does that work?
Where do I add the API Token?
If you look at the helper text on the plugin configuration page of OJS, you can use it in lieu of a username and omit the password.
It connected to Harvard’s Dataverse.
Now I need to now how to create a token on our Dataverse.
It may not be supported in the version of Dataverse you’re running (I don’t think it’s available in 3.x), and for whatever reason, username + password authentication doesn’t appear to be working for you. I admittedly haven’t tested that in a while so it’s possible that may not work as reliably as it should upstream (in either Dataverse or OJS). I’m afraid you might be on your own for investigating issues in username + password auth, though.
In the meantime, I’m glad you’ve got this working in at least this limited capacity!
Using the API Token may pose problems?
What are its limitations?
Nope – there are no limitations, other than that it may not be available in 3.x releases of Dataverse.
Now that this is working, where can I get some assistance on section policies and author guidelines for this?
This is all pretty new to me…