DSpace 7.2.1 - Solr Statistics Not Working

1,377 views
Skip to first unread message

Mike Schouten

unread,
Jun 8, 2022, 10:06:27 PM6/8/22
to DSpace Technical Support
Salutations!

I'm still trying to get our brand new DSpace 7 install running and have encountered a new problem, this time with statistics.  Being this new to DSpace, I might be missing something obvious, but I'm not sure what else to try.

At first I had no errors, so I assumed everything was working.  Only I had no stats.  On further investigation I realized I was missing the GeoLocation database and configuration, so I fixed that up.  My configuration for usage stats (as copied into local.cfg) now looks like:

# Solr Statistics Settings
solr-statistics.server = ${solr.server}/statistics
usage-statistics.dbfile = /var/lib/GeoIP/GeoLite2-City.mmdb
usage-statistics.authorization.admin.usage=false
usage-statistics.authorization.admin.search=true
usage-statistics.authorization.admin.workflow=true
usage-statistics.shardedByYear = true

Best I figure, now that it has the configuration, it's trying to log the usage stats.  But now in dspace.log I'm ending up with null pointer exceptions on every page view.  Perhaps someone with more knowledge of DSpace might be able to interpret the stack trace better than I... I'll attach an example as a separate file to keep this message a little cleaner.

Query statistics are also not ending up in Solr, though I'm not getting any errors for that in the logs as I perform searches.

I should mention that I have installed the Solr statistics core and it appears to be functioning correctly, at least insofar as I can tell with a core that has no data in it.  It's probably unhelpful, but I also attached a screenshot of our Solr interface and some empty but functional query results.  I've tried deleting and reinstalling the core.  The Solr discovery index is working perfectly, so I'm pretty sure it's not some general Solr configuration error.

Any ideas for what I can try next would be greatly appreciated!

Michael Schouten
Library IT
MacEwan University

statistics_core.jpg
dspace_stats_error.txt

Mike Schouten

unread,
Jun 14, 2022, 12:31:26 AM6/14/22
to DSpace Technical Support
I managed to track down the source of the problem.  On the off chance someone else encounters this behavior, the solution was to disable the "sharded by year" feature.

usage-statistics.shardedByYear = false

Since I had just activated the geolocation database and enabled view statistics, I didn't have any past sharded years, and apparently it was looking for them and dying when it didn't find any.  Turning off this feature for now got rid of the error and allowed view statistics to be gathered. 

I'm still not getting search statistics, but that's an issue for another day.

Subrat Nanda

unread,
Oct 12, 2023, 6:44:37 AM10/12/23
to DSpace Technical Support
Dear Mike Schouten,

Can it be possible to view usage statistics of geographical maps of a country and city in the localhost server?
I am running the DSpace-CRIS v2023.01.00 on a localhost. I have downloaded and configured the path of dbfile in local.cfg. I have checked the health status in the user interface and the status is ok without any issue. But I can't see any visual map of the country and city under statistics.
Kindly suggest.

Thank you.

Mike Schouten

unread,
Oct 12, 2023, 4:23:25 PM10/12/23
to DSpace Technical Support
Salutations!

Since the posting of this query, we've updated to 7.5, and from what I can tell, the default DSpace statistics page displays geographical data as a table rather than populating a map or visual representation.  The data is all there, it just looks relatively boring.  Here's an example from our instance:  https://roam.macewan.ca/statistics/items/24b6fa20-0782-427c-9e34-a9cc8b6b5bda

The Solr statistics core for DSpace 7 contains everything one would need to populate a map if you've got a good programmer on your team!  And maybe the DSpace guys intend to enhance the statistics page some day.  But from what I can tell, we're stuck with tables for now.

suresh patil

unread,
Nov 30, 2023, 1:33:32 AM11/30/23
to DSpace Technical Support
for city/country based statistics which DB you have used?
Reply all
Reply to author
Forward
0 new messages