2011-12-01 2 views
1

나는 sunspot_mongo gem으로 solr을 가졌습니다. 나는 실행 태양 흑점을하려고 할 때 : 몽고를 : 나는 중지 레이크 태양 흑점과 SOLR 시작했다작업 흑점의 오류 : mongo : 몽고트가있는 Sunspot Solr의 색인 생성

reindexing House 
rake aborted! 
RSolr::Error::Http - 500 Internal Server Error 
Error: java.io.FileNotFoundException: no segments* file found in [email protected]/home/ubuntu/Desktop/PROJECT/solr/data/development/index: files: 

java.lang.RuntimeException: java.io.FileNotFoundException: no segments* file found in [email protected]/home/ubuntu/Desktop/PROJECT/solr/data/development/index: files: 
at org.apache.solr.core.SolrCore.getSearcher(SolrCore.java:1068) 
at org.apache.solr.update.DirectUpdateHandler2.commit(DirectUpdateHandler2.java:418) 
at org.apache.solr.update.processor.RunUpdateProcessor.processCommit(RunUpdateProcessorFactory.java:85) 
at org.apache.solr.handler.XMLLoader.processUpdate(XMLLoader.java:169) 
at org.apache.solr.handler.XMLLoader.load(XMLLoader.java:69) 
at org.apache.solr.handler.ContentStreamHandlerBase.handleRequestBody(ContentStreamHandlerBase.java:54) 
at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:131) 
at org.apache.solr.core.SolrCore.execute(SolrCore.java:1316) 

Request Data: "<?xml version=\"1.0\" encoding=\"UTF-8\"?><commit/>" 

: :이 오류가 색인화 SOLR : 중지하고 내가 얻을 : 내가 함께 SOLR를 시작

java version "1.6.0_20" 
OpenJDK Runtime Environment (IcedTea6 1.9.10) (6b20-1.9.10-0ubuntu1~10.10.2) 
OpenJDK Client VM (build 19.0-b09, mixed mode, sharing) 
Successfully stopped Solr ... 

을 명령 레이크 흑점은 : SOLR : 시작 내가 얻을 :

java version "1.6.0_20" 
OpenJDK Runtime Environment (IcedTea6 1.9.10) (6b20-1.9.10-0ubuntu1~10.10.2) 
OpenJDK Client VM (build 19.0-b09, mixed mode, sharing) 
Successfully started Solr ... 

편집

감사하지만 작동하지 않습니다. 나는 인덱스 폴더를 삭제하고 난 태양 흑점을 다시 실행 한 : SOLR :을 시작하고 나는 새로운 레지스터를 만들 시도하거나 태양 흑점을 실행할 때 : SOLR :

c43d1f7f8a62a2ff6fed0bddcce1a574 :

reindexing House 
rake aborted! 
RSolr::Error::Http - 500 Internal Server Error 
Error: no segments* file found in [email protected]/home/ubuntu/Desktop/PROJECT/solr/data/development/index: files: lucene-c43d1f7f8a62a2ff6fed0bddcce1a574-write.lock 

java.io.FileNotFoundException: no segments* file found in [email protected]/home/ubuntu/Desktop/PROJECT/solr/data/development/index: files: lucene-c43d1f7f8a62a2ff6fed0bddcce1a574-write.lock 
at org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:655) 
at org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:538) 
at org.apache.lucene.index.SegmentInfos.read(SegmentInfos.java:306) 
at org.apache.lucene.index.IndexWriter.init(IndexWriter.java:1577) 
at org.apache.lucene.index.IndexWriter.<init>(IndexWriter.java:1402) 
at org.apache.solr.update.SolrIndexWriter.<init>(SolrIndexWriter.java:190) 
at org.apache.solr.update.UpdateHandler.createMainIndexWriter(UpdateHandler.java:98) 
at org.apache.solr.update.DirectUpdateHandler2.openWriter(DirectUpdateHandler2.java:173) 

Request Data: "<?xml version=\"1.0\" encoding=\"UTF-8\"?><add><doc><field name=\"id\">House 4ed7c2f31d41c8327e000006</field><field name=\"type\">House</field><field name=\"class_name\">House</field><field name=\"content_text\">This is a new house</field></doc></add>" 

항상이 나타납니다 시작

#searchable do 
    #text :content 
    #end 
: 내 모델이 댓글을 달았 그러나

을 -write.lock

레이크 작업이 정상적으로 작동하고 오류는 표시하지 않지만 모델의 인덱스는 지정하지 않습니다.

어떤 아이디어 ??

+1

Solr은 인덱스 폴더에있는 세그먼트 파일을 찾습니다 (있는 경우). 인덱스 폴더를 삭제하면 Solr 시작시 세그먼트 파일이있는 인덱스 폴더를 다시 만들어야합니다. – Jayendra

답변

10

색인이 손상되었습니다. Solr을 중지하고 solr/data/development/index 폴더를 삭제 한 다음 sunspot:solr:start을 다시 실행하여 다시 만드십시오. 닉 언급 인덱스 폴더를 삭제 게다가

+0

작동하지 않음 :(결과를 내 게시물에 편집했습니다! – hyperrjas

+0

좋은 소식! 우리는 정전이 있었고 인덱스가 손상된 것처럼 보였습니다.이 시간 동안 3 시간 동안 고생했습니다. – Francois

5

@hyperrjas

, 당신은 찾을 실행 ps aux | grep 'solr'에 의해, 이미 시작 SOLR 프로세스를 중지해야합니다. 이제는 효과가있다.

+0

내 머리를 일부 금지했습니다. 시간! tx! – Francois