[Dspace-tech] Help with Solr on DSpace 3.1

49 views
Skip to first unread message

Nason Bimbe

unread,
Aug 26, 2015, 10:50:31 AM8/26/15
to dspac...@lists.sourceforge.net
We have upgraded from 1.8.2 to 3.1 and since then new items added can not be found via search neither are they visible in the latest submission lists but the items can be accessed directly if one knows the uri. 

When I ran update-discovery-index -f I get the following 

ris:/usr/local/dspace# bin/dspace update-discovery-index -f 
 INFO [main] (DSpaceKernelInit.java:52) - Created new kernel: DSpaceKernel:org.dspace:name=dc341a12-aca7-4e50-a578-4d20d2a909e7,type=DSpaceKernel:lastLoad=null:loadTime=0:running=false:kernel=null 
 INFO [main] (ConfigurationManager.java:1224) - Loading from classloader: file:/usr/local/dspace/config/dspace.cfg 
 INFO [main] (ConfigurationManager.java:1224) - Using dspace provided log configuration (log.init.config) 
 INFO [main] (ConfigurationManager.java:1224) - Loading: /usr/local/dspace/config/log4j.properties 
Exception: Internal Server Error 

Internal Server Error 

request: http://localhost:8080/solr/search/update?wt=javabin&version=2
org.dspace.discovery.SearchServiceException: Internal Server Error 

Internal Server Error 

request: http://localhost:8080/solr/search/update?wt=javabin&version=2
        at org.dspace.discovery.SolrServiceImpl.cleanIndex(SolrServiceImpl.java:418) 
        at org.dspace.discovery.IndexClient.main(IndexClient.java:119) 
        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.common.SolrException: Internal Server Error 

Internal Server Error 

request: http://localhost:8080/solr/search/update?wt=javabin&version=2
        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.AbstractUpdateRequest.process(AbstractUpdateRequest.java:105) 
        at org.apache.solr.client.solrj.SolrServer.deleteByQuery(SolrServer.java:110) 
        at org.dspace.discovery.SolrServiceImpl.cleanIndex(SolrServiceImpl.java:384) 


and in the catalina.out I get this 

07-May-2013 14:51:24 org.apache.solr.core.SolrCore execute 
INFO: [search] webapp=/solr path=/update params={wt=javabin&version=2} status=500 QTime=11291 
07-May-2013 14:51:24 org.apache.solr.common.SolrException log 
SEVERE: org.apache.lucene.store.LockObtainFailedException: Lock obtain timed out: NativeFSLock@./solr/data/index/write.lock 
        at org.apache.lucene.store.Lock.obtain(Lock.java:84) 
        at org.apache.lucene.index.IndexWriter.<init>(IndexWriter.java:1108) 
        at org.apache.solr.update.SolrIndexWriter.<init>(SolrIndexWriter.java:83) 
        at org.apache.solr.update.UpdateHandler.createMainIndexWriter(UpdateHandler.java:101) 
        at org.apache.solr.update.DirectUpdateHandler2.openWriter(DirectUpdateHandler2.java:171) 
        at org.apache.solr.update.DirectUpdateHandler2.deleteByQuery(DirectUpdateHandler2.java:324) 
        at org.apache.solr.update.processor.RunUpdateProcessor.processDelete(RunUpdateProcessorFactory.java:71) 
        at org.apache.solr.update.processor.LogUpdateProcessor.processDelete(LogUpdateProcessorFactory.java:137) 
        at org.apache.solr.handler.XMLLoader.processDelete(XMLLoader.java:256) 
        at org.apache.solr.handler.XMLLoader.processUpdate(XMLLoader.java:202) 
        at org.apache.solr.handler.XMLLoader.load(XMLLoader.java:79) 
        at org.apache.solr.handler.ContentStreamHandlerBase.handleRequestBody(ContentStreamHandlerBase.java:58) 
        at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:129) 
        at org.apache.solr.core.SolrCore.execute(SolrCore.java:1372) 
        at org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:356) 
        at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:252) 
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) 
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) 
        at org.dspace.solr.filters.LocalHostRestrictionFilter.doFilter(LocalHostRestrictionFilter.java:60) 
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) 
        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:298) 
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852) 
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588) 
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489) 
        at java.lang.Thread.run(Thread.java:662) 

I have read through similar problems and possible solutions and not successful. The other thing I have also noticed is that all the solr cores data folders are empty ( [dspace]/solr/search/data, [dspace]/solr/search/data, etc). [dspace]/search contains some files and this is updated whenever I ran dspace index command. 


Regards
Nason

Hilton Gibson

unread,
Aug 26, 2015, 10:50:32 AM8/26/15
to Nason Bimbe, dspace-tech
Hi Nason

"SEVERE: org.apache.lucene.store.LockObtainFailedException: Lock obtain timed out: NativeFSLock@./solr/data/index/write.lock "

I would suspect file permissions as the fault.
To put the app in "/usr/local/dspace" is unusual.
Try the following at your own risk:

chmod 0777 -R /usr/local/dspace/solr

My preference for app location is "/home/dspace" which is on a separate volume/partition.

Regards

hg


------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and
their applications. This 200-page book is written by three acclaimed
leaders in the field. The early access version is available now.
Download your free book today! http://p.sf.net/sfu/neotech_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

Nason Bimbe

unread,
Aug 26, 2015, 10:50:33 AM8/26/15
to Hilton Gibson, dspace-tech
Thanks Hilton,
I have done what you suggested and I am still getting the same error.

Thanks
Nason

Hilton Gibson

unread,
Aug 26, 2015, 10:50:34 AM8/26/15
to Nason Bimbe, dspace-tech
Hi Nason

Then I am out of ideas without access to your server.
Perhaps others on the list can help.

Regards

hg

Kevin Van de Velde

unread,
Aug 26, 2015, 10:50:35 AM8/26/15
to Hilton Gibson, dspace-tech
Hi Nason,

I would suggest removing the write.lock file from the data directory and rerunning the index command, that should fix it.

Hope this helps,


Kind regards,

logo   
Kevin Van de Velde @mire 
2888 Loker Avenue East, Suite 315, Carlsbad, CA. 92010
Esperantolaan 4, Heverlee 3001, Belgium
www.atmire.com
@mire_web_2.jpg

Bram Luyten

unread,
Aug 26, 2015, 10:50:36 AM8/26/15
to Hilton Gibson, dspace-tech
Hi Nason,

do you see any of these write.lock files on your system? You should be able to safely delete them.
Does that help in any way?

SEVERE: org.apache.lucene.store.LockObtainFailedException: Lock obtain timed out: NativeFSLock@./solr/data/index/write.lock 

best regards,

Bram

-- 
logo 
Bram Luyten @mire

2888 Loker Avenue East, Suite 315, Carlsbad, CA. 92010
Esperantolaan 4, Heverlee 3001, Belgium

Nason Bimbe

unread,
Aug 26, 2015, 10:50:38 AM8/26/15
to Bram Luyten, dspace-tech
Hi Bram,
I can't see the write.lock files. see image
Inline images 1
image.png

Nason Bimbe

unread,
Aug 26, 2015, 10:50:39 AM8/26/15
to Bram Luyten, dspace-tech
Hi Bram,
I have now found that the solr folder is actually in /home/dspace/solr/ rather than /usr/local/dspace/solr/. Why the difference because I intended the solr folder to be in /usr/local/dspace/solr?


Thanks
Nason


On 8 May 2013 12:11, Bram Luyten <br...@atmire.com> wrote:

Bram Luyten

unread,
Aug 26, 2015, 10:50:40 AM8/26/15
to Nason Bimbe, dspace-tech
Hi Nason,

just to ensure that I understand you correctly: are you talking about the installation directory, the source directory or the web deployment directory?


Bram


-- 
logo 
Bram Luyten @mire
2888 Loker Avenue East, Suite 315, Carlsbad, CA. 92010
Esperantolaan 4, Heverlee 3001, Belgium
www.atmire.com


Nason Bimbe

unread,
Aug 26, 2015, 10:50:41 AM8/26/15
to Bram Luyten, dspace-tech
Hi Guys,
I think I have solved the problem. This line in solrconfig.xml was uncommented.

<!--<dataDir>${solr.data.dir:./solr/data}</dataDir>-->

Thank you so much for the help. Your question on finding the lock file helped me trace where the solr stuff was being placed.

Best
Nason
Reply all
Reply to author
Forward
0 new messages