[Dspace-tech] dspace 1.7.2 Discovery error

172 views
Skip to first unread message

Ahmed Maher

unread,
Aug 25, 2015, 4:51:34 PM8/25/15
to dspac...@lists.sourceforge.net
when i run ./dspace update-discovery-index
command 
i have the following error
Exception: Error executing query
org.dspace.discovery.SearchServiceException: Error executing query
        at org.dspace.discovery.SolrServiceImpl.cleanIndex(SolrServiceImpl.java:380)
        at org.dspace.discovery.IndexClient.main(IndexClient.java:120)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.dspace.app.launcher.ScriptLauncher.main(ScriptLauncher.java:183)
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.discovery.SolrServiceImpl.getSolr(SolrServiceImpl.java:105)
        at org.dspace.discovery.SolrServiceImpl.cleanIndex(SolrServiceImpl.java:353)
        ... 6 more
Caused by: org.apache.solr.common.SolrException: Not Found

Not Found

request: http://localhost:8080/solr/search/select?q=search.resourcetype:2 AND search.resourceid:1&wt=javabin&version=1
        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)


and , if i try to open solr admin ttp://localhost:8080/solr/admin
this error appears 
 HTTP Status 404 - missing core name in path
     __________________________________________________________________

   type Status report

   message missing core name in path

   description The requested resource (missing core name in path) is not
   available.
     __________________________________________________________________

  Apache Tomcat/6.0.28


Christian Voelker

unread,
Aug 25, 2015, 5:16:06 PM8/25/15
to listaDspace Tech
Hello,

this issue is not yet completely solved. This is an interim information on the status.

Meanwhile I applied updates to some of the software on my test machine and after that I ran again in exactly the same issue. I checked for the solr URL as well as for file system permissions faults due to my former experience and repeated hints on this list. However no luck. I couldnt find any useful log entries not even when switching to debug logging. I removed the filter that made it impossible to reach solr from a different machine to see the error messages first hand in my browser - no help.

Finally I dropped my database on the test server which was updated from a 1.6 installation and contained a handful of items. We also have some additional date fields configured in input-forms and we use a three letter contry code for metadata. I dont know what exactly was defending discovery index creation, but with a fresh and empty database, discovery index could be initialized.

This is no solution for migrating our live server, because obviously we have to update our current database, but I thought it might be useful for somebody struggling with this issue to know that there are other reasons of failure besides the solr URL being not set properly.

Bye, Christian


Kevin Van de Velde

unread,
Aug 25, 2015, 5:16:18 PM8/25/15
to Antonio Calderón, listaDspace Tech
The reason why a 403 error occurs when attempting to visit the solr url is because there are security limitations (you are only allowed to connect to the solr server by using localhost). If you want to ensure that the discovery search server is up & running you will need to run the following command (this needs to be run on the server where the solr server is running):

wget http://localhost:{port}/{solr.deploy.path}/search/select?q=*:*&rows=0

When running this you should get something along the lines of:

<?xml version="1.0" encoding="UTF-8"?>
<response>
<lst name="responseHeader">
   <int name="status">0</int>
   <int name="QTime">0</int>
   <lst name="params">
      <str name="q">*:*</str>
      <str name="rows">0</str>
   </lst>
</lst>
<result name="response" numFound="3" start="0"/>
</response>
 
This indicates that the discovery server is at least up & running, if you are getting something else could you perhaps send the result so I can take a look at it ?


Kind regards,

Kevin Van de Velde
@mire
Esperantolaan 4 - 3001 Heverlee - Belgium
2888 Loker Avenue East, Suite 305 - Carlsbad, CA 92010 - USA
atmire.com - Institutional Repository Solutions



On 24 August 2011 18:19, Antonio Calderón <neoca...@gmail.com> wrote:
Hi, how are you?

Are you sure that's the default port?

In debian the default port is 8080:

'root@dspace:~# lsof-i: 8080
COMMAND PID USER FD TYPE DEVICE SIZE / OFF NODE NAME
1401 java tomcat6 0t0 25u IPv6 5001 TCP *: http-alt (LISTEN)'

You must do the following:

1. The file dspace-solr-search.cfg should look like:

'###### Search Indexing ##### #####
solr.search.server = http://localhost:8080/solr/search'

2. Change the owner of the directory 'solr', in my installation:

root@dspace:~# chown tomcat6:tomcat6 -R /var/dspace/webapps/solr/

3. Finally:

root@dspace:/var/dspace/bin# ./dspace update-discovery-index

A.

2011/8/24 Christian Voelker <C.Vo...@gmx.net>:
> Hello,
>
> I have the very same problem. How sad, that you did not get an answer.
>
> There is a similar post in the forum, only a few days old, but also not answered:
> <https://wiki.duraspace.org/display/dsforum/Error+occurs+when+turning+on+discovery+feature+of+Dspace>
>
> I bet, that there needs to be something configured in Tomcat regarding rights, but I found no hint in the docs. Also, I have not yet found the place where solr wants to put its index file. So I was not able to make sure that there is no permissions problem.
>
> When trying to access
>
> <http://83.169.21.252:8180/solr/> or
> <http://83.169.21.252:8180/solr/admin> or
> <http://83.169.21.252:8180/solr/search>
>
> I get a 403 error.
>
> Port 8180 is the default port for Tomcat in Debian which is use on my testserver.
> And yes, I have changed 8080 to 8180 in my dspace.cfg:
> dspace.baseUrl = http://83.169.21.252:8180
> And in dspace-solr-search.cfg:
> solr.search.server = http://83.169.21.252:8180/solr/search
>
> I dont know enough about Solr to test locally through CLI. This is the next thing I will try to learn. Still grateful for any hint to get up with this quickly. Where to search in the logs? I have lenghty errors in dspace.log but I dont understand them I bet I have to solve the issue with the discover index first.
>
> Again, thanks for any hints.
>
> Bye, Christian
>> ------------------------------------------------------------------------------
>> EditLive Enterprise is the world's most technically advanced content
>> authoring tool. Experience the power of Track Changes, Inline Image
>> Editing and ensure content is compliant with Accessibility Checking.
>> http://p.sf.net/sfu/ephox-dev2dev_______________________________________________
>> DSpace-tech mailing list
>> DSpac...@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/dspace-tech
>
>
> ------------------------------------------------------------------------------
> EMC VNX: the world's simplest storage, starting under $10K
> The only unified storage solution that offers unified management
> Up to 160% more powerful than alternatives and 25% more efficient.
> Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev
> _______________________________________________
> DSpace-tech mailing list
> DSpac...@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/dspace-tech
>



--
A.

------------------------------------------------------------------------------
EMC VNX: the world's simplest storage, starting under $10K
The only unified storage solution that offers unified management
Up to 160% more powerful than alternatives and 25% more efficient.
Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev
_______________________________________________
DSpace-tech mailing list
DSpac...@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech

Christian Voelker

unread,
Aug 25, 2015, 5:20:52 PM8/25/15
to listaDspace Tech
Hello,

I have the very same problem. How sad, that you did not get an answer.

There is a similar post in the forum, only a few days old, but also not answered:
<https://wiki.duraspace.org/display/dsforum/Error+occurs+when+turning+on+discovery+feature+of+Dspace>

I bet, that there needs to be something configured in Tomcat regarding rights, but I found no hint in the docs. Also, I have not yet found the place where solr wants to put its index file. So I was not able to make sure that there is no permissions problem.

When trying to access

<http://83.169.21.252:8180/solr/> or
<http://83.169.21.252:8180/solr/admin> or
<http://83.169.21.252:8180/solr/search>

I get a 403 error.

Port 8180 is the default port for Tomcat in Debian which is use on my testserver.
And yes, I have changed 8080 to 8180 in my dspace.cfg:
dspace.baseUrl = http://83.169.21.252:8180
And in dspace-solr-search.cfg:
solr.search.server = http://83.169.21.252:8180/solr/search

I dont know enough about Solr to test locally through CLI. This is the next thing I will try to learn. Still grateful for any hint to get up with this quickly. Where to search in the logs? I have lenghty errors in dspace.log but I dont understand them I bet I have to solve the issue with the discover index first.

Again, thanks for any hints.

Bye, Christian


Am 08.06.2011 um 13:13 schrieb Ahmed Maher:

Christian Voelker

unread,
Aug 25, 2015, 5:22:06 PM8/25/15
to Kevin Van de Velde, listaDspace Tech
Hello Kevin,

thanks for providing a command line test.

Well Antonio, thanks for answering as well.

Everthing works now.

While working through your suggestions Kevin, I did again a

chmod -R tomcat55:nogroup /srv/dspace

And after that, I was able to create the index and there were no more errors.
I found the index files under /srv/dspace/solr/search/data as expected.
And I was sure, that I had checked for any strange permissions issues before… …always check twice!!

However, I tried your test after that and got a strange error which
led me to the perception that the URI has to be escaped somehow.
It was split up by the shell in two commands.
When replaying it from the shell history, it was split up in two parts after q=*:*
which made me try ...q=*:*\&rows=0 but without success either.
Then, I was not sure, whether it should really be a colon or a dot as in q=*.*

In the end I gave up to reproduce your result and I only write it down here
for somebody who might read this thread not to think that he is the only one
who cant work it out.

Bye, Christian

Antonio Calderón

unread,
Aug 25, 2015, 5:30:30 PM8/25/15
to Christian Voelker, listaDspace Tech
Hi, how are you?

Are you sure that's the default port?

In debian the default port is 8080:

'root@dspace:~# lsof-i: 8080
COMMAND PID USER FD TYPE DEVICE SIZE / OFF NODE NAME
1401 java tomcat6 0t0 25u IPv6 5001 TCP *: http-alt (LISTEN)'

You must do the following:

1. The file dspace-solr-search.cfg should look like:

'###### Search Indexing ##### #####
solr.search.server = http://localhost:8080/solr/search'

2. Change the owner of the directory 'solr', in my installation:

root@dspace:~# chown tomcat6:tomcat6 -R /var/dspace/webapps/solr/

3. Finally:

root@dspace:/var/dspace/bin# ./dspace update-discovery-index

A.

2011/8/24 Christian Voelker <C.Vo...@gmx.net>:
> ------------------------------------------------------------------------------
> EMC VNX: the world's simplest storage, starting under $10K
> The only unified storage solution that offers unified management
> Up to 160% more powerful than alternatives and 25% more efficient.
> Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev
> _______________________________________________
--
A.

Reply all
Reply to author
Forward
0 new messages