Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Ruby

Solr configuration error

I've setup solr on my app and it was working for a while but now it's starting to throw errors and I can't get it running. I'm getting the following errors when I try to do rake sunspot:solr:run

:INFO:oejw.StandardDescriptorProcessor:NO JSP Support for /solr, did not find org.apache.jasper.servlet.JspServlet
Null identity service, trying login service: null
Finding identity service: null

I'm able to access my solr admin page and the logs are displaying these errors:

SolrCore Initialization Failures

development: org.apache.solr.common.SolrException:org.apache.solr.common.SolrException: Error opening new searcher

Logs

21:17:53 SEVERE CachingDirectoryFactory Timeout waiting for all directory ref counts to be released

21:17:53 SEVERE CoreContainer Unable to create core: development
org.apache.solr.common.SolrException: Error opening new searcher
    at org.apache.solr.core.SolrCore.<init>(SolrCore.java:806)
    at org.apache.solr.core.SolrCore.<init>(SolrCore.java:619)
    at org.apache.solr.core.CoreContainer.createFromLocal(CoreContainer.java:1021)
    at org.apache.solr.core.CoreContainer.create(CoreContainer.java:1051)
    at org.apache.solr.core.CoreContainer$3.call(CoreContainer.java:634)
    at org.apache.solr.core.CoreContainer$3.call(CoreContainer.java:629)
    at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
    at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
Caused by: org.apache.solr.common.SolrException: Error opening new searcher
    at org.apache.solr.core.SolrCore.openNewSearcher(SolrCore.java:1415)
    at org.apache.solr.core.SolrCore.getSearcher(SolrCore.java:1527)
    at org.apache.solr.core.SolrCore.<init>(SolrCore.java:781)
    ... 13 more
Caused by: java.io.FileNotFoundException: C:\Sites\LLF\solr\development\data\index\segments_d3 (The system cannot find the file specified)
    at java.io.RandomAccessFile.open(Native Method)
    at java.io.RandomAccessFile.<init>(Unknown Source)
    at org.apache.lucene.store.FSDirectory$FSIndexInput.<init>(FSDirectory.java:409)
    at org.apache.lucene.store.SimpleFSDirectory$SimpleFSIndexInput.<init>(SimpleFSDirectory.java:98)
    at org.apache.lucene.store.SimpleFSDirectory.openInput(SimpleFSDirectory.java:58)
    at org.apache.lucene.store.NRTCachingDirectory.openInput(NRTCachingDirectory.java:232)
    at org.apache.lucene.index.SegmentInfos.read(SegmentInfos.java:285)
    at org.apache.lucene.index.StandardDirectoryReader$1.doBody(StandardDirectoryReader.java:56)
    at org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:783)
    at org.apache.lucene.index.StandardDirectoryReader.open(StandardDirectoryReader.java:52)
    at org.apache.lucene.index.DirectoryReader.open(DirectoryReader.java:87)
    at org.apache.solr.core.StandardIndexReaderFactory.newReader(StandardIndexReaderFactory.java:34)
    at org.apache.solr.search.SolrIndexSearcher.<init>(SolrIndexSearcher.java:124)
    at org.apache.solr.core.SolrCore.openNewSearcher(SolrCore.java:1391)
    ... 15 more

21:17:53 SEVERE CoreContainer null:org.apache.solr.common.SolrException: Unable to create core: development
null:org.apache.solr.common.SolrException: Unable to create core: development

Can someone point me in the right direction to fixing this? Thanks in advance.

1 Answer

Turns out my index got corrupted. Deleting my delete/ directory from my solr directory and reindexing got things working again.