[Dspace-tech] SOLR problem Dspace 3.x

13 views
Skip to first unread message

Hernan Carvajal Briceño

unread,
Aug 26, 2015, 12:14:59 PM8/26/15
to dspace-tech
Hi,

I've installed Dspace 3.x and when I try to execute the following command:

/usr/share/dspace/bin/dspace oai import

I'm getting the following error.

[root@dspace-d1 dspace]# /usr/share/dspace/bin/dspace oai import
 INFO [main] (DSpaceKernelInit.java:52) - Created new kernel: DSpaceKernel:org.dspace:name=b71ace5d-2ed0-4727-8118-ff63b84f7569,type=DSpaceKernel:lastLoad=null:loadTime=0:running=false:kernel=null
 INFO [main] (ConfigurationManager.java:1224) - Loading from classloader: file:/usr/share/dspace/config/dspace.cfg
 INFO [main] (ConfigurationManager.java:1224) - Using dspace provided log configuration (log.init.config)
 INFO [main] (ConfigurationManager.java:1224) - Loading: /usr/share/dspace/config/log4j.properties
OAI 2.0 manager action started
org.dspace.xoai.solr.exceptions.DSpaceSolrIndexerException: Error executing query
        at org.dspace.xoai.app.XOAI.index(XOAI.java:160)
        at org.dspace.xoai.app.XOAI.main(XOAI.java:439)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at org.dspace.app.launcher.ScriptLauncher.main(ScriptLauncher.java:183)
Caused by: org.dspace.xoai.solr.exceptions.DSpaceSolrException: Error executing query
        at org.dspace.xoai.solr.DSpaceSolrSearch.query(DSpaceSolrSearch.java:39)
        at org.dspace.xoai.app.XOAI.index(XOAI.java:134)
        ... 6 more
Caused by: org.apache.solr.client.solrj.SolrServerException: Error executing query
        at org.apache.solr.client.solrj.request.QueryRequest.process(QueryRequest.java:95)
        at org.apache.solr.client.solrj.SolrServer.query(SolrServer.java:118)
        at org.dspace.xoai.solr.DSpaceSolrSearch.query(DSpaceSolrSearch.java:34)
        ... 7 more
Caused by: org.apache.solr.common.SolrException: Not Found

Not Found

        at org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request(CommonsHttpSolrServer.java:435)
        at org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request(CommonsHttpSolrServer.java:244)
        at org.apache.solr.client.solrj.request.QueryRequest.process(QueryRequest.java:89)
        ... 9 more


The SOLR server is up and runnig. I've checket it in the Web browser:
I can execute querys from there.
Any ideas?

Thanks in advance for your help!

Hernán


--
Hernán Carvajal Briceño.
hernan.h...@gmail.com

Andrea Schweer

unread,
Aug 26, 2015, 12:15:00 PM8/26/15
to Hernan Carvajal Briceño, dspace-tech
Hi Hernán,


On 30/01/14 12:41, Hernan Carvajal Briceño wrote:
Caused by: org.apache.solr.common.SolrException: Not Found

Not Found

        at org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request(CommonsHttpSolrServer.java:435)
        at org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request(CommonsHttpSolrServer.java:244)
        at org.apache.solr.client.solrj.request.QueryRequest.process(QueryRequest.java:89)
        ... 9 more


The SOLR server is up and runnig. I've checket it in the Web browser:
I can execute querys from there.
Any ideas?

Looks like you left out a 'solr' when you told OAI where to connect. I'd expect to see
http://localhost/solr/oai/select?q=*:*
rather than
http://localhost/oai/select?q=*:*
as given in your error message.

What is your value of solr.server in [dspace-src]/build.properties? I'd expect it to be
Also, what is your value of solr.url in [dspace-src]/dspace/config/modules/oai.cfg? This should be
solr.url=${solr.server}/oai

Just to be extra certain, also check the oai core in solr (the url you gave goes to the search/discovery core):
http://localhost/solr/oai/admin/

cheers,
Andrea

-- 
Dr Andrea Schweer
IRR Technical Specialist, ITS Information Systems
The University of Waikato, Hamilton, New Zealand

Hernan Carvajal Briceño

unread,
Aug 26, 2015, 12:15:56 PM8/26/15
to Andrea Schweer, dspace-tech
Hi Andrea,

Thanks for your reply and help!!

Here is what I've got:

Looks like you left out a 'solr' when you told OAI where to connect. I'd expect to see
http://localhost/solr/oai/select?q=*:*
rather than
http://localhost/oai/select?q=*:*
as given in your error message.

Yes indeed, very strange. I didn't noticed this detail. I'm looking where could be the misconfiguration.


What is your value of solr.server in [dspace-src]/build.properties? I'd expect it to be
solr.server=http://localhost/solr
Also, what is your value of solr.url in [dspace-src]/dspace/config/modules/oai.cfg? This should be
solr.url=${solr.server}/oai

The values on those file are correct as espected.

Just to be extra certain, also check the oai core in solr (the url you gave goes to the search/discovery core): 
http://localhost/solr/oai/admin/

I can access to the URL with no problem.

I still looking where could be the problem. Must be a detail!!

Thank you again. I hope you, or anyone else, could help me.

My best regards,

Hernán





2014-01-29 Andrea Schweer <sch...@waikato.ac.nz>:

Andrea Schweer

unread,
Aug 26, 2015, 12:15:59 PM8/26/15
to Hernan Carvajal Briceño, dspace-tech
Hi Hernán,


On 31/01/14 07:51, Hernan Carvajal Briceño wrote:
What is your value of solr.server in [dspace-src]/build.properties? I'd expect it to be
solr.server=http://localhost/solr
Also, what is your value of solr.url in [dspace-src]/dspace/config/modules/oai.cfg? This should be
solr.url=${solr.server}/oai

          
The values on those file are correct as espected.

That's odd. Just to be sure, what's in those files in the [dspace] directory? Are the values correct there? The solr.url in [dspace]/dspace/config/modules/oai.cfg should be the full URL (ie, http://localhost/solr/oai (ie the ${solr.server} should have been replaced with the value of solr.server from build.properties).

Or just do a mvn package / ant update run to ensure the files in [dspace] are up to date, then try again.
Reply all
Reply to author
Forward
0 new messages