Dspace-CRIS Item view and Download count problem

338 views
Skip to first unread message

Yen-Tang Chen

unread,
Feb 7, 2017, 8:56:29 PM2/7/17
to DSpace Technical Support
Dear all

Installation environment

      jdk1.8.0_101
      postgresSQL 9.5
      tomcat 8.0.37  
      dspace-cris_5.6.1
     

Item view and Download count are 0 . (view_download.png , view_download_02.png)
But Administration Tools > Statistics
Item view and Download count still exist (view_download_01.png)

I only changed the postgres pg_hba.conf settings.


# "local" is for Unix domain socket connections only
local   all         all                               trust
# IPv4 local connections
host    all         all         127.0.0.1/32          trust

changed =>
# IPv4 local connections:
host    all         all        IP/32          md5

After Item view and Download count are 0 .....



How do I show the Item view and Download count?


Sincerely yours, Yen-Tang Chen


************************************************************************************************
Yen-Tang Chen
Lib. Information Technology Services Div., NTU Library, http://www.lib.ntu.edu.tw/en
office: No. 1, Sec 4, Roosevelt Road, Taipei 10617, Taiwan, R.O.C.
TEL:886-2-33662291
EMAIL:exia...@gmail.com
************************************************************************************************
view_download.png
view_download_01.png
view_download_02.png

Fazio Riccardo

unread,
Feb 8, 2017, 3:33:16 AM2/8/17
to Yen-Tang Chen, DSpace Technical Support

Dear Yen-Tang Chen,

You should launch the script "view-and-download-retrieve" to retrieve the metrics on the view/download;
you will find it in the bin folder of your installation dir.
cd [dspace-dir]/bin
./view-and-download-retrieve


You can also put this script in crontab, https://wiki.duraspace.org/display/DSPACECRIS/jobs+in+CRONTAB


I hope this helps

Regards

Riccardo

--
You received this message because you are subscribed to the Google Groups "DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dspace-tech...@googlegroups.com.
To post to this group, send email to dspac...@googlegroups.com.
Visit this group at https://groups.google.com/group/dspace-tech.
For more options, visit https://groups.google.com/d/optout.

-- 
Riccardo Fazio
DSpace and DSpace-CRIS developer

4Science,  www.4science.it (an Itway Group Company)

office: Via Edoardo D'Onofrio 304, 00155 Rome, Italy
tel: +39 3339341798

Yen-Tang Chen

unread,
Feb 8, 2017, 4:42:23 AM2/8/17
to DSpace Technical Support, exia...@gmail.com, Riccard...@4science.it

Dear Riccardo Fazio


I’m grateful for your advice.

I have tried this method run script "view-and-download-retrieve
 
Item view and Download count are 0.....

I don't know how to slove the problem…

Yen-Tang Chen

unread,
Feb 8, 2017, 8:11:14 PM2/8/17
to DSpace Technical Support, exia...@gmail.com, Riccard...@4science.it
Dear all

The question has been solved, I look at the dspace.log Error message  (view_download_001, view_download_001)


ERROR org.dspace.app.cris.batch.ScriptStatsMetrics @ org.postgresql.util.PSQLException: FATAL: no pg_hba.conf entry for host "127.0.0.1", user "dspace-cris", database "dspace-cris", SSL off
org.dspace.discovery.SearchServiceException: org.postgresql.util.PSQLException: FATAL: no pg_hba.conf entry for host "127.0.0.1", user "dspace-cris", database "dspace-cris", SSL off
    at org.dspace.discovery.SolrServiceImpl.search(SolrServiceImpl.java:2585)
    at org.dspace.app.cris.discovery.CrisSearchService.renewMetricsCache(CrisSearchService.java:1026)
    at org.dspace.app.cris.statistics.plugin.StatsPercentileIndicatorsPlugin.buildIndicator(StatsPercentileIndicatorsPlugin.java:95)
    at org.dspace.app.cris.batch.ScriptStatsMetrics.main(ScriptStatsMetrics.java:134)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.dspace.app.launcher.ScriptLauncher.runOneCommand(ScriptLauncher.java:226)
    at org.dspace.app.launcher.ScriptLauncher.main(ScriptLauncher.java:78)
Caused by: org.apache.solr.client.solrj.impl.HttpSolrServer$RemoteSolrException: org.postgresql.util.PSQLException: FATAL: no pg_hba.conf entry for host "127.0.0.1", user "dspace-cris", database "dspace-cris", SSL off
    at org.apache.solr.client.solrj.impl.HttpSolrServer.executeMethod(HttpSolrServer.java:552)
    at org.apache.solr.client.solrj.impl.HttpSolrServer.request(HttpSolrServer.java:210)
    at org.apache.solr.client.solrj.impl.HttpSolrServer.request(HttpSolrServer.java:206)
    at org.apache.solr.client.solrj.request.QueryRequest.process(QueryRequest.java:91)
    at org.apache.solr.client.solrj.SolrServer.query(SolrServer.java:301)
    at org.dspace.discovery.SolrServiceImpl.search(SolrServiceImpl.java:2580)
    ... 9 more

    
I don't put the host "127.0.0.1" IP into pg_hba.conf settings

So I changed the postgres pg_hba.conf settings.


# "local" is for Unix domain socket connections only
local   all         all                               trust

# IPv4 local connections:
host    all         all        IP/32          md5

host    all         all        127.0.0.1/32      trust


I’m grateful for your advice.

view_download_001.png
view_download_002.png

Pascarelli Luigi Andrea

unread,
Feb 9, 2017, 3:57:51 AM2/9/17
to Yen-Tang Chen, DSpace Technical Support

Dear Yan-Tang Chen,

please read https://wiki.duraspace.org/display/DSDOC5x/Installing+DSpace#InstallingDSpace-RelationalDatabase:(PostgreSQLorOracle) and check the follow points:

1) edit the postgresql.conf line referred what IP address(es) to listen on; in addition to listen_addresses = localhost you can add all addresses that postgres need to listen; in any case if you have a secure server that host database the only rule to insert is listen_addresses = '*'

2) the above documentation assumes that the database is installed in the same host of the web application (and in case of DSpace-CRIS also SOLR web application); pg_hba.conf should be configured like this

host all all 127.0.0.1 255.255.255.255 md5
# please add also the following row only if you have solr webapplication installed in a different server (otherwise the above configuration row is enought)
# host all all <insert_here_solr_ip_mask/submask> md5

3) check the file called database.properties ([solr-config]\search\conf\database.properties) where you can find info on the connection between solr and database

All modifications to postgresql.conf and pg_hba.con requires a restart of the postgres service.

Hope this helps you.

Regards,

Luigi Andrea
--
You received this message because you are subscribed to the Google Groups "DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dspace-tech...@googlegroups.com.
To post to this group, send email to dspac...@googlegroups.com.
Visit this group at https://groups.google.com/group/dspace-tech.
For more options, visit https://groups.google.com/d/optout.

-- 
Luigi Andrea Pascarelli

DSpace and DSpace-CRIS Committer

4Science,  www.4science.it 

office: Via Edoardo D'Onofrio 304, 00155 Roma, Italy
tel: +39 333 934 1782
skype: l_a_p82
linkedin: luigiandreapascarelli

an Itway Group Company 
Italy, France, Spain, Portugal, Greece, Turkey, Lebanon, Qatar, U.A.Emirates

====================================
Save a tree. Don't print this e-mail unless it's really necessary.

DISCLAIMER: The information contained in this message is confidential, can be legally protected by local Laws, 
and must be exclusively used by the recipient. The publication, use, distribution, printing or unauthorized copy 
of the content of this message is strictly forbidden and it can be illegal. If you received this message by mistake, 
please destroy it and notify it to the sender.
Reply all
Reply to author
Forward
0 new messages