Search is broken
Search gives a 404 page now: go to http://researchr.org/search, type “hello” -> http://researchr.org/search/publication/hello “That page does not exist! Maybe you can find what you are looking for using the search page.”
Submitted by Lennart Kats on 19 March 2011 at 12:16
Issue Log
This is the exception. Apparently something has gone wrong with creating the search index; Sander?
exception occured while handling request URL: http://researchr.org/search/publication/hello
exception message: Unable to reopen IndexReader
org.hibernate.search.SearchException: Unable to reopen IndexReader
at org.hibernate.search.reader.SharingBufferReaderProvider$PerDirectoryLatestReader.refreshAndGet(SharingBufferReaderProvider.java:268)
at org.hibernate.search.reader.SharingBufferReaderProvider.openReader(SharingBufferReaderProvider.java:146)
at org.hibernate.search.query.FullTextQueryImpl.buildSearcher(FullTextQueryImpl.java:769)
at org.hibernate.search.query.FullTextQueryImpl.list(FullTextQueryImpl.java:321)
at webdsl.generated.domain.Publication.static_searchPublication(Publication.java:5792)
at webdsl.generated.templates.searchPublicationStringInt_Template.initializeLocalVars(searchPublicationStringInt_Template.java:904)
at utils.TemplateServlet.tryInitializeTemplate(TemplateServlet.java:160)
at utils.TemplateServlet.render(TemplateServlet.java:61)
at webdsl.generated.templates.search_localBody0IntStringString_Template.renderInternal(search_localBody0IntStringString_Template.java:820)
at utils.TemplateServlet.render(TemplateServlet.java:69)
at webdsl.generated.templates.localMenuPage_body0_Template.renderInternal(localMenuPage_body0_Template.java:505)
at utils.TemplateServlet.render(TemplateServlet.java:69)
at webdsl.generated.templates.main_Template.renderInternal(main_Template.java:346)
at utils.TemplateServlet.render(TemplateServlet.java:69)
at webdsl.generated.templates.localMenuPage_Template.renderInternal(localMenuPage_Template.java:185)
at utils.TemplateServlet.render(TemplateServlet.java:69)
at webdsl.generated.templates.search_Template.renderInternal(search_Template.java:383)
at utils.TemplateServlet.render(TemplateServlet.java:69)
at webdsl.generated.templates.SearchPage.render(SearchPage.java:230)
at webdsl.generated.templates.SearchPage.serve(SearchPage.java:154)
at utils.DispatchServletHelper.handlePage(DispatchServletHelper.java:1033)
at utils.DispatchServletHelper.doServe(DispatchServletHelper.java:992)
at utils.DispatchServlet.doGet(DispatchServlet.java:205)
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.valves.AccessLogValve.invoke(AccessLogValve.java:555)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190)
at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:291)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:774)
at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:703)
at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:896)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.io.FileNotFoundException: /var/indexes/researchr/webdsl.generated.domain.Publication/_3pz.cfs (No such file or directory)
at java.io.RandomAccessFile.open(Native Method)
at java.io.RandomAccessFile.(RandomAccessFile.java:212)
at org.apache.lucene.store.SimpleFSDirectory$SimpleFSIndexInput$Descriptor.(SimpleFSDirectory.java:78)
at org.apache.lucene.store.SimpleFSDirectory$SimpleFSIndexInput.(SimpleFSDirectory.java:108)
at org.apache.lucene.store.NIOFSDirectory$NIOFSIndexInput.(NIOFSDirectory.java:94)
at org.apache.lucene.store.NIOFSDirectory.openInput(NIOFSDirectory.java:70)
at org.apache.lucene.index.CompoundFileReader.(CompoundFileReader.java:70)
at org.apache.lucene.index.SegmentReader$CoreReaders.(SegmentReader.java:114)
at org.apache.lucene.index.SegmentReader.get(SegmentReader.java:652)
at org.apache.lucene.index.SegmentReader.get(SegmentReader.java:613)
at org.apache.lucene.index.DirectoryReader.(DirectoryReader.java:228)
at org.apache.lucene.index.ReadOnlyDirectoryReader.(ReadOnlyDirectoryReader.java:32)
at org.apache.lucene.index.DirectoryReader.doReopen(DirectoryReader.java:440)
at org.apache.lucene.index.DirectoryReader.access$000(DirectoryReader.java:43)
at org.apache.lucene.index.DirectoryReader$2.doBody(DirectoryReader.java:432)
at org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:683)
at org.apache.lucene.index.DirectoryReader.doReopenNoWriter(DirectoryReader.java:428)
at org.apache.lucene.index.DirectoryReader.doReopen(DirectoryReader.java:386)
at org.apache.lucene.index.DirectoryReader.reopen(DirectoryReader.java:348)
at org.hibernate.search.reader.SharingBufferReaderProvider$PerDirectoryLatestReader.refreshAndGet(SharingBufferReaderProvider.java:265)
… 40 more
Also related: WebDSL/300: Don’t report Error 404 (Not Found) for server errors…
I would first try restarting tomcat, and if that doesn’t help, shut down tomcat and delete the /var/indexes/researchr directory, then run the indexing again and start tomcat.
Fixed; apparently I did not follow the correct protocol, which is:
- remove /var/indexes/researchr
- restart tomcat (which regenerates the directory)
- then run the reindex script
(I’m running reindex now)
I was also running reindexing yesterday (see https://yellowgrass.org/issue/researchr/249). I had fixed the original indexing problem with the duplicate keys. The above exception was probably caused by the reindexing still being in progress.
No, it was due to the fact that I did not observe the right protocol. After removing the index directory, tomcat should be restarted to initialize the directory. Only then should the reindex script be run. The index directory was corrupted.
Log in to post comments