[Dspace-tech] Internal server error while doing keyword search

42 views
Skip to first unread message

ribin...@niist.res.in

unread,
Aug 26, 2015, 10:54:37 AM8/26/15
to DSpac...@lists.sourceforge.net
Hi,

I am getting the below error while I am doing keyword search in Collections and Communities of dspace. I am a newbie and please help me out:

2013-05-22 12:18:37,064 INFO org.dspace.app.webui.servlet.CommunityListServlet @ anonymous:session_id=3A68B48FDB6F78295600FECEE2757233:ip_addr=10.10.100.1:view_community_list:
2013-05-22 12:18:39,803 INFO org.dspace.app.webui.servlet.DSpaceServlet @ anonymous:session_id=3A68B48FDB6F78295600FECEE2757233:ip_addr=10.10.100.1:view_collection:collection_id=17
2013-05-22 12:18:39,803 INFO org.dspace.browse.BrowseEngine @ anonymous:session_id=3A68B48FDB6F78295600FECEE2757233:ip_addr=10.10.100.1:browse_mini:
2013-05-22 12:18:45,504 WARN org.dspace.app.webui.servlet.InternalErrorServlet @ :session_id=3A68B48FDB6F78295600FECEE2757233:internal_error:-- URL Was: http://ir.niist.res.in:8080/jspui/simple-search?query=biodiesel
-- Method: GET
-- Parameters were:
-- query: "biodiesel"

java.io.IOException: read past EOF
at org.apache.lucene.store.BufferedIndexInput.refill(BufferedIndexInput.java:146)
at org.apache.lucene.store.BufferedIndexInput.readByte(BufferedIndexInput.java:38)
at org.apache.lucene.store.IndexInput.readInt(IndexInput.java:66)
at org.apache.lucene.index.SegmentInfos$2.doBody(SegmentInfos.java:357)
at org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:636)
at org.apache.lucene.index.SegmentInfos.readCurrentVersion(SegmentInfos.java:349)
at org.apache.lucene.index.IndexReader.getCurrentVersion(IndexReader.java:350)
at org.apache.lucene.index.IndexReader.getCurrentVersion(IndexReader.java:334)
at org.apache.lucene.index.IndexReader.getCurrentVersion(IndexReader.java:319)
at org.dspace.search.DSQuery.getSearcher(DSQuery.java:482)
at org.dspace.search.DSQuery.doQuery(DSQuery.java:148)
at org.dspace.app.webui.servlet.SimpleSearchServlet.doDSGet(SimpleSearchServlet.java:242)
at org.dspace.app.webui.servlet.DSpaceServlet.processRequest(DSpaceServlet.java:151)
at org.dspace.app.webui.servlet.DSpaceServlet.doGet(DSpaceServlet.java:99)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:602)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:679)


Is it something related to permission issues in any files/folder in the backend? I am running Dspace 1.5.2 in Ubuntu 12.04


Regards,

Ribin Jones S.B
IT LAB, Knowledge Resource Centre
CSIR - NIIST (National Institute for Interdisciplinary Science and Technology), Govt. of India
Pappanamcode, Thiruvananthapuram - 695019
Kerala, India
www.niist.res.in
Mob: +91 9895226242


helix84

unread,
Aug 26, 2015, 10:54:37 AM8/26/15
to ribin...@niist.res.in, dspace-tech
On Wed, May 22, 2013 at 8:59 AM, <ribin...@niist.res.in> wrote:
> java.io.IOException: read past EOF
> at org.apache.lucene.store.BufferedIndexInput.refill(BufferedIndexInput.java:146)
> at org.apache.lucene.store.BufferedIndexInput.readByte(BufferedIndexInput.java:38)

Hi Ribin,

it seems like this issue in Lucene:
https://issues.apache.org/jira/browse/LUCENE-2729

> Is it something related to permission issues in any files/folder in the backend? I am running Dspace 1.5.2 in Ubuntu 12.04

Probably not, but it never hurts to run
chown -R [dspace-user]:[dspace-group] [dspace]/search

It seems your lucene index has become corrupted for some reason. It's
no big deal, it can be easily recreated. Stop Tomcat and run
[dspace]/bin/dspace index-init -r -v

This can take a while but the error should go away after you start
Tomcat. If the error ever occurs again, don't hesitate to contact us
and we'll try to investigate further.


Regards,
~~helix84

Compulsory reading: DSpace Mailing List Etiquette
https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette

ribin...@niist.res.in

unread,
Aug 26, 2015, 10:54:41 AM8/26/15
to hel...@centrum.sk, dspace-tech
I am new to this whole thing...Could you pls be specific on solving this issue?

Regards,

Ribin Jones S.B
IT LAB, Knowledge Resource Centre
CSIR - NIIST (National Institute for Interdisciplinary Science and Technology), Govt. of India
Pappanamcode, Thiruvananthapuram - 695019
Kerala, India
www.niist.res.in
Mob: +91 9895226242

helix84

unread,
Aug 26, 2015, 10:54:42 AM8/26/15
to ribin...@niist.res.in, dspace-tech
Stop Tomcat and run the following command (replace [dspace] with your
DSpace installation directory):

[dspace]/bin/dspace index-init -r -v

Then start Tomcat.

ribin...@niist.res.in

unread,
Aug 26, 2015, 10:54:44 AM8/26/15
to hel...@centrum.sk, dspace-tech
I get the below while doing that:

root@itlab:/home/dspace/bin# /home/dspace/bin/index-init -r -v
Creating browse index
Creating search index
Exception in thread "main" java.io.IOException: read past EOF
at org.apache.lucene.store.BufferedIndexInput.refill(BufferedIndexInput. java:146)
at org.apache.lucene.store.BufferedIndexInput.readByte(BufferedIndexInpu t.java:38)
at org.apache.lucene.store.IndexInput.readInt(IndexInput.java:66)
at org.apache.lucene.index.SegmentInfos.read(SegmentInfos.java:207)
at org.apache.lucene.index.IndexFileDeleter.<init>(IndexFileDeleter.java :168)
at org.apache.lucene.index.IndexWriter.init(IndexWriter.java:722)
at org.apache.lucene.index.IndexWriter.<init>(IndexWriter.java:452)
at org.dspace.search.DSIndexer.openIndex(DSIndexer.java:778)
at org.dspace.search.DSIndexer.createIndex(DSIndexer.java:422)
at org.dspace.search.DSIndexer.main(DSIndexer.java:536)


Below is the log when I again try keyword searching. I still don't get any search results..(see the attached screenshot)

2013-05-22 13:50:31,782 ERROR org.dspace.search.DSQuery @ Unable to use speficied sort option: type/relevance
2013-05-22 13:50:31,783 INFO org.dspace.app.webui.servlet.SimpleSearchServlet @ anonymous:session_id=5E0432E316E66A9CCD5C65D9D1A99660:ip_addr=10.10.100.1:search:collection_id=17,query="biodiesel",results=(0,0,0)


Ribin Jones S.B
IT LAB, Knowledge Resource Centre
CSIR - NIIST (National Institute for Interdisciplinary Science and Technology), Govt. of India
Pappanamcode, Thiruvananthapuram - 695019
Kerala, India
www.niist.res.in
Mob: +91 9895226242

----- Original Message -----
From: "helix84" <hel...@centrum.sk>
To: "ribin jones" <ribin...@niist.res.in>
Cc: "dspace-tech" <DSpac...@lists.sourceforge.net>
Sent: Wednesday, May 22, 2013 1:39:47 PM
Subject: Re: [Dspace-tech] Internal server error while doing keyword search

search.jpg

helix84

unread,
Aug 26, 2015, 10:54:44 AM8/26/15
to ribin...@niist.res.in, dspace-tech
That means that the error is also triggered when indexing, not just
when querying the index. Try this to fix the index structure:

java -cp /home/dspace/lib/lucene-core-3.5.0.jar
-ea:org.apache.lucene... org.apache.lucene.index.CheckIndex
/home/dspace/search -fix

This assumes DSpace 3. If you're using an older version, lucene-core
version may also be different.

ribin...@niist.res.in

unread,
Aug 26, 2015, 10:54:46 AM8/26/15
to hel...@centrum.sk, dspace-tech
I get the below error:

root@itlab:/home/dspace/log# java -cp /home/dspace/lib/lucene-core-2.3.0.jar-ea:org.apache.lucene... org.apache.lucene.index.CheckIndex /home/dspace/search/ -fix
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/lucene/index/CheckIndex
Caused by: java.lang.ClassNotFoundException: org.apache.lucene.index.CheckIndex
at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
Could not find the main class: org.apache.lucene.index.CheckIndex. Program will exit.

Our Dspace is version 1.5.2 and lucene 2.3 ...Pls chk whether the syntax of the command I have given above is correct.

Regards,

Ribin Jones S.B
Scientist
IT LAB, Knowledge Resource Centre
CSIR - NIIST (National Institute for Interdisciplinary Science and Technology), Govt. of India
Pappanamcode, Thiruvananthapuram - 695019
Kerala, India
www.niist.res.in
Mob: +91 9895226242

----- Original Message -----
From: "helix84" <hel...@centrum.sk>
To: "ribin jones" <ribin...@niist.res.in>
Cc: "dspace-tech" <DSpac...@lists.sourceforge.net>
Sent: Wednesday, May 22, 2013 2:14:20 PM
Subject: Re: [Dspace-tech] Internal server error while doing keyword search

helix84

unread,
Aug 26, 2015, 10:54:47 AM8/26/15
to ribin...@niist.res.in, dspace-tech
On Wed, May 22, 2013 at 10:54 AM,  <ribin...@niist.res.in> wrote:
> root@itlab:/home/dspace/log# java -cp /home/dspace/lib/lucene-core-2.3.0.jar-ea:org.apache.lucene... org.apache.lucene.index.CheckIndex /home/dspace/search/ -fix

There should be a space before -ea. Here's the full command for you:

java -cp /home/dspace/lib/lucene-core-2.3.0.jar -ea:org.apache.lucene... org.apache.lucene.index.CheckIndex /home/dspace/search/ -fix

ribin...@niist.res.in

unread,
Aug 26, 2015, 10:54:50 AM8/26/15
to hel...@centrum.sk, dspace-tech
Did that...It says:

root@itlab:/home/dspace/log# java -cp /home/dspace/lib/lucene-core-2.3.0.jar -ea:org.apache.lucene... org.apache.lucene.index.CheckIndex /home/dspace/search/ -fix

Opening index @ /home/dspace/search/

Segments file=segments_x4 numSegments=0 version=FORMAT_SHARED_DOC_STORE [Lucene 2.3]
No problems were detected with this index.

But still my keyword searching problem exists.

Regards,

Ribin Jones S.B
Scientist
IT LAB, Knowledge Resource Centre
CSIR - NIIST (National Institute for Interdisciplinary Science and Technology), Govt. of India
Pappanamcode, Thiruvananthapuram - 695019
Kerala, India
www.niist.res.in
Mob: +91 9895226242

----- Original Message -----
From: "helix84" <hel...@centrum.sk>
To: "ribin jones" <ribin...@niist.res.in>
Cc: "dspace-tech" <DSpac...@lists.sourceforge.net>
Sent: Wednesday, May 22, 2013 2:32:01 PM
Subject: Re: [Dspace-tech] Internal server error while doing keyword search


Hilton Gibson

unread,
Aug 26, 2015, 10:54:51 AM8/26/15
to ribin...@niist.res.in, dspace-tech
Ok. To be clear you are using Ubuntu 12.04 with DSpace 1.5.2 and want the XMLUI to be the default.


The wiki guide is a step-by-step procedure for the installation and setup of an institutional repository, based Ubuntu 12.04 LTS and DSpace 1.8.2.

It has been used quite extensively and a PDF version is available from here: http://hdl.handle.net/10019.1/79321

All these materials are free to use and distribute as you please,

Cheers

hg



------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may
_______________________________________________
DSpace-tech mailing list
DSpac...@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech
List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette



--
Hilton Gibson
Systems Administrator
JS Gericke Library
Room 1025C
Stellenbosch University
Private Bag X5036
Stellenbosch
7599
South Africa

helix84

unread,
Aug 26, 2015, 10:54:52 AM8/26/15
to ribin...@niist.res.in, dspace-tech
OK, try this:

1) stop Tomcat
2) mv /home/dspace/search /home/dspace/search.bak
3) mkdir /home/dspace/search
4) /home/dspace/bin/dspace index-init -r -v
5) start Tomcat

ribin...@niist.res.in

unread,
Aug 26, 2015, 10:54:53 AM8/26/15
to Hilton Gibson, dspace-tech
Hi,

I had a working dspace and suddenly it stopped working..I am trying to fix it.

Ribin Jones S.B
Scientist

ribin...@niist.res.in

unread,
Aug 26, 2015, 10:54:56 AM8/26/15
to hel...@centrum.sk, dspace-tech
Great...It worked!!!

Thanks very much. :)

Ribin Jones S.B
Scientist
IT LAB, Knowledge Resource Centre
CSIR - NIIST (National Institute for Interdisciplinary Science and Technology), Govt. of India
Pappanamcode, Thiruvananthapuram - 695019
Kerala, India
www.niist.res.in
Mob: +91 9895226242

----- Original Message -----
From: "helix84" <hel...@centrum.sk>
To: "ribin jones" <ribin...@niist.res.in>
Cc: "dspace-tech" <DSpac...@lists.sourceforge.net>
Sent: Wednesday, May 22, 2013 2:46:21 PM
Subject: Re: [Dspace-tech] Internal server error while doing keyword search

Reply all
Reply to author
Forward
0 new messages