Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions conf/docker-aio/configure_doi.bash
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,8 @@ if [ ! -z "${doi_baseurl}" ]; then
doi_baseurl_esc=`echo ${doi_baseurl} | sed -e 's/:/\\:/'`
bin/asadmin create-jvm-options "\"-Ddoi.baseurlstring=${doi_baseurl_esc}\""
fi
if [ ! -z "${doi_mdcbaseurl}" ]; then
bin/asadmin delete-jvm-options "-Ddoi.mdcbaseurlstring=https\://api.test.datacite.org"
doi_mdcbaseurl_esc=`echo ${doi_mdcbaseurl} | sed -e 's/:/\\:/'`
bin/asadmin create-jvm-options "\"-Ddoi.mdcbaseurlstring=${doi_mdcbaseurl_esc}\""
fi
8 changes: 7 additions & 1 deletion doc/sphinx-guides/source/admin/make-data-count.rst
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,12 @@ Enable Logging for Make Data Count

To make Dataverse log dataset usage (views and downloads) for Make Data Count, you must set the ``:MDCLogPath`` database setting. See :ref:`MDCLogPath` for details.

If you wish to start logging in advance of setting up other components, or wish to log without display MDC metrics for any other reason, you can set the optional ``:DisplayMDCMetrics`` database setting to false. See :ref:`DisplayMDCMetrics` for details.

After you have your first day of logs, you can process them the next day.

Enable or Disable Display of Make Data Count Metrics
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

By default, when MDC logging is enabled (when ``:MDCLogPath`` is set), Dataverse will display MDC metrics instead of it's internal (legacy) metrics. You can avoid this (e.g. to collect MDC metrics for some period of time before starting to display them) by setting ``:DisplayMDCMetrics`` to false.

Expand Down Expand Up @@ -133,11 +135,15 @@ Once you are satisfied with your testing, you should contact support@datacite.or
- Views ("investigations" in COUNTER)
- Downloads ("requests" in COUNTER)

.. _MDC-updateCitationsForDataset:

Configuring Dataverse for Make Data Count Citations
---------------------------------------------------

Please note: as explained in the note above about limitations, this feature is not available to installations of Dataverse that use Handles.

To configure Dataverse to pull citations from the test vs. production DataCite server see :ref:`doi.mdcbaseurlstring` in the Installation Guide.

Please note that in the curl example, Bash environment variables are used with the idea that you can set a few environment variables and copy and paste the examples as is. For example, "$DOI" could become "doi:10.5072/FK2/BL2IBM" by issuing the following export command from Bash:

``export DOI="doi:10.5072/FK2/BL2IBM"``
Expand Down
25 changes: 23 additions & 2 deletions doc/sphinx-guides/source/admin/troubleshooting.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,28 @@ A User Needs Their Account to Be Converted From Institutional (Shibboleth), ORCI

See :ref:`converting-shibboleth-users-to-local` and :ref:`converting-oauth-users-to-local`.

.. _troubleshooting-glassfish:

Glassfish
---------

``server.log`` is the main place to look when you encounter problems. Hopefully an error message has been logged. If there's a stack trace, it may be of interest to developers, especially they can trace line numbers back to a tagged version.
.. _glassfish-log:

Finding the Glassfish Log File
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

``/usr/local/glassfish4/glassfish/domains/domain1/logs/server.log`` is the main place to look when you encounter problems (assuming you installed Glassfish in the default directory). Hopefully an error message has been logged. If there's a stack trace, it may be of interest to developers, especially they can trace line numbers back to a tagged version or commit. Send more of the stack trace (the entire file if possible) to developers who can help (see "Getting Help", below) and be sure to say which version of Dataverse you are running.

.. _increase-glassfish-logging:

Increasing Glassfish Logging
~~~~~~~~~~~~~~~~~~~~~~~~~~~~

For debugging purposes, you may find it helpful to increase logging levels as mentioned in the :doc:`/developers/debugging` section of the Developer Guide.
For debugging purposes, you may find it helpful to temporarily increase logging levels. Here's an example of increasing logging for the Java class behind the "datasets" API endpoints:

``./asadmin set-log-levels edu.harvard.iq.dataverse.api.Datasets=FINE``

For more on setting log levels, see the :doc:`/developers/debugging` section of the Developer Guide.

Our guides focus on using the command line to manage Glassfish but you might be interested in an admin GUI at http://localhost:4848

Expand Down Expand Up @@ -100,3 +116,8 @@ Many Files with a File Type of "Unknown", "Application", or "Binary"
--------------------------------------------------------------------

From the home page of a Dataverse installation you can get a count of files by file type by clicking "Files" and then scrolling down to "File Type". If you see a lot of files that are "Unknown", "Application", or "Binary" you can have Dataverse attempt to redetect the file type by using the :ref:`Redetect File Type <redetect-file-type>` API endpoint.

Getting Help
------------

If the troubleshooting advice above didn't help, contact any of the support channels mentioned in the :ref:`support` section of the Installation Guide.
25 changes: 25 additions & 0 deletions doc/sphinx-guides/source/installation/config.rst
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ Here are the configuration options for DOIs:
- :ref:`doi.baseurlstring`
- :ref:`doi.username`
- :ref:`doi.password`
- :ref:`doi.mdcbaseurlstring`

**Database Settings:**

Expand Down Expand Up @@ -956,6 +957,30 @@ See also these related database settings below:
- :ref:`:Authority`
- :ref:`:Shoulder`

.. _doi.mdcbaseurlstring:

doi.mdcbaseurlstring
++++++++++++++++++++

This configuration option affects the ``updateCitationsForDataset`` API endpoint documented under :ref:`MDC-updateCitationsForDataset` in the Admin Guide.

As of this writing, "https://api.datacite.org" (DataCite) and "https://api.test.datacite.org" (DataCite Testing) are the main valid values.

Out of the box, Dataverse is configured to use a test DataCite MDC base URL string. You can delete it like this:

``./asadmin delete-jvm-options '-Ddoi.mdcbaseurlstring=https\://api.test.datacite.org'``

Then, to switch to production DataCite, you can issue the following command:

``./asadmin create-jvm-options '-Ddoi.mdcbaseurlstring=https\://api.datacite.org'``

For backward compatibility, if this option is not defined, the default used is "https\://api.datacite.org:.

See also these related database settings below:

- :ref:`:MDCLogPath`
- :ref:`:DisplayMDCMetrics`

.. _doi.username:

doi.username
Expand Down
5 changes: 5 additions & 0 deletions scripts/installer/glassfish-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
# DOI_USERNAME
# DOI_PASSWORD
# DOI_BASEURL
# DOI_MDCBASEURL
#
# other local configuration:
# HOST_ADDRESS
Expand Down Expand Up @@ -88,6 +89,10 @@ function preliminary_setup()
./asadmin $ASADMIN_OPTS create-jvm-options '\-Ddoi.password=${ALIAS=doi_password_alias}'
./asadmin $ASADMIN_OPTS create-jvm-options "\-Ddoi.baseurlstring=$DOI_BASEURL_ESC"

# jvm-options use colons as separators, escape as literal
DOI_MDCBASEURL_ESC=`echo $DOI_MDCBASEURL | sed -e 's/:/\\\:/'`
./asadmin $ASADMIN_OPTS create-jvm-options "\-Ddoi.mdcbaseurlstring=$DOI_MDCBASEURL_ESC"

./asadmin $ASADMIN_OPTS create-jvm-options "-Ddataverse.timerServer=true"
# enable comet support
./asadmin $ASADMIN_OPTS set server-config.network-config.protocols.protocol.http-listener-1.http.comet-support-enabled="true"
Expand Down
14 changes: 10 additions & 4 deletions scripts/installer/install
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@ else

'DOI_USERNAME',
'DOI_PASSWORD',
'DOI_BASEURL'
'DOI_BASEURL',
'DOI_MDCBASEURL'

);
}
Expand Down Expand Up @@ -114,6 +115,7 @@ my %CONFIG_DEFAULTS = (
'DOI_USERNAME', 'dataciteuser',
'DOI_PASSWORD', 'datacitepassword',
'DOI_BASEURL', 'https://mds.test.datacite.org',
'DOI_MDCBASEURL', 'https://api.test.datacite.org',

);

Expand All @@ -140,7 +142,8 @@ my %CONFIG_PROMPTS = (

'DOI_USERNAME', 'Datacite username',
'DOI_PASSWORD', 'Datacite password',
'DOI_BASEURL', 'Datacite URL'
'DOI_BASEURL', 'Datacite URL',
'DOI_MDCBASEURL', 'Datacite MakeDataCount URL'

);

Expand Down Expand Up @@ -168,7 +171,8 @@ my %CONFIG_COMMENTS = (

'DOI_USERNAME', 'DataCite or EZID username. Only necessary for publishing / minting DOIs.',
'DOI_PASSWORD', 'DataCite or EZID account password.',
'DOI_BASEURL', 'DataCite or EZID URL. Probably https://mds.datacite.org'
'DOI_BASEURL', 'DataCite or EZID URL. Probably https://mds.datacite.org',
'DOI_MDCBASEURL', 'DataCite Make Data Count API base URL. Probably https://api.datacite.org'

);

Expand Down Expand Up @@ -1097,7 +1101,9 @@ sub run_asadmin_script {
$ENV{'RSERVE_PORT'} = $CONFIG_DEFAULTS{'RSERVE_PORT'};
$ENV{'RSERVE_USER'} = $CONFIG_DEFAULTS{'RSERVE_USER'};
$ENV{'RSERVE_PASS'} = $CONFIG_DEFAULTS{'RSERVE_PASSWORD'};

$ENV{'DOI_BASEURL'} = $CONFIG_DEFAULTS{'DOI_BASEURL'};
$ENV{'DOI_MDCBASEURL'} = $CONFIG_DEFAULTS{'DOI_MDCBASEURL'};

$ENV{'HOST_ADDRESS'} = $CONFIG_DEFAULTS{'HOST_DNS_ADDRESS'};

my ($mail_server_host, $mail_server_port) = split (":", $CONFIG_DEFAULTS{'MAIL_SERVER'});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,13 @@ public Response updateCitationsForDataset(@PathParam("id") String id) throws Mal
// DataCite wants "doi=", not "doi:".
String authorityPlusIdentifier = persistentId.replaceFirst("doi:", "");
// curl https://api.datacite.org/events?doi=10.7910/dvn/hqzoob&source=crossref
URL url = new URL("https://api.datacite.org/events?doi=" + authorityPlusIdentifier + "&source=crossref");
String baseUrl = System.getProperty("doi.mdcbaseurlstring");
if(null==baseUrl) {
//Backward compatible default to the production server
baseUrl="https://api.datacite.org";
}
URL url = new URL(baseUrl + "/events?doi=" + authorityPlusIdentifier + "&source=crossref");
logger.fine("Requesting citations from " + url);
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setRequestMethod("GET");
int status = connection.getResponseCode();
Expand Down