WSO2 API Manager与solr有关

时间:2017-03-07 10:56:12

标签: solr wso2 wso2-am

我已经设置了与WSO2 Identity Server集成的WSO2 API Manager的新设置。启动WSO2 API Manager时,我开始收到以下错误:

 SolrIndexWriter was not closed prior to finalize(), indicates a bug -- POSSIBLE RESOURCE LEAK!!! {org.apache.solr.update.SolrIndexWriter}
TID: [-1] [] [2017-03-07 10:38:31,745] ERROR {org.apache.solr.update.SolrIndexWriter} -  Error closing IndexWriter {org.apache.solr.update.SolrIndexWriter}
java.lang.NullPointerException
    at org.apache.lucene.index.IndexWriter.doFlush(IndexWriter.java:3010)
    at org.apache.lucene.index.IndexWriter.flush(IndexWriter.java:2978)
    at org.apache.lucene.index.IndexWriter.shutdown(IndexWriter.java:970)
    at org.apache.lucene.index.IndexWriter.close(IndexWriter.java:1015)
    at org.apache.solr.update.SolrIndexWriter.close(SolrIndexWriter.java:130)
    at org.apache.solr.update.SolrIndexWriter.finalize(SolrIndexWriter.java:183)
    at java.lang.System$2.invokeFinalize(System.java:1213)
    at java.lang.ref.Finalizer.runFinalizer(Finalizer.java:98)
    at java.lang.ref.Finalizer.access$100(Finalizer.java:34)
    at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:210)
TID: [-1] [] [2017-03-07 10:38:32,198] ERROR {org.apache.solr.core.CoreContainer} -  Error creating core [registry-indexing]: Error opening new searcher {org.apache.solr.core.CoreContainer}
org.apache.solr.common.SolrException: Error opening new searcher
    at org.apache.solr.core.SolrCore.<init>(SolrCore.java:815)
    at org.apache.solr.core.SolrCore.<init>(SolrCore.java:658)
    at org.apache.solr.core.CoreContainer.create(CoreContainer.java:637)
    at org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:381)
    at org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:375)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at org.apache.solr.common.util.ExecutorUtil$MDCAwareThreadPoolExecutor$1.run(ExecutorUtil.java:148)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.solr.common.SolrException: Error opening new searcher
    at org.apache.solr.core.SolrCore.openNewSearcher(SolrCore.java:1657)
    at org.apache.solr.core.SolrCore.getSearcher(SolrCore.java:1769)
    at org.apache.solr.core.SolrCore.initSearcher(SolrCore.java:911)
    at org.apache.solr.core.SolrCore.<init>(SolrCore.java:788)
    ... 9 more
Caused by: org.apache.lucene.index.IndexNotFoundException: no segments* file found in NRTCachingDirectory(MMapDirectory@C:\wso2\wso2am-1.10.0\solr\data\index lockFactory=org.apache.lucene.store.NativeFSLockFactory@2d38ca50; maxCacheMB=48.0 maxMergeSizeMB=4.0): files: [_od3a_Lucene50_0.tim, _od3a.fnm, write.lock, _od3a.nvd, _od3a_1.liv, _od3a_Lucene50_0.pos, _od3a.fdx, _od3a_Lucene50_0.doc, _od3a.si, _od3a.fdt, _od3a_Lucene50_0.tip, _od3a.nvm]
    at org.apache.lucene.index.IndexWriter.<init>(IndexWriter.java:825)
    at org.apache.solr.update.SolrIndexWriter.<init>(SolrIndexWriter.java:78)
    at org.apache.solr.update.SolrIndexWriter.create(SolrIndexWriter.java:65)
    at org.apache.solr.update.DefaultSolrCoreState.createMainIndexWriter(DefaultSolrCoreState.java:273)
    at org.apache.solr.update.DefaultSolrCoreState.getIndexWriter(DefaultSolrCoreState.java:116)
    at org.apache.solr.core.SolrCore.openNewSearcher(SolrCore.java:1626)
    ... 12 more

任何人都有任何想法吗?

1 个答案:

答案 0 :(得分:7)

如果索引未正确发生,可能会发生这种情况。您可以尝试重做索引,如下所示。

  1. 备份驻留在/ solr中的solr文件夹,然后从API Manager主目录位置删除。
  2. 打开/repository/conf/registry.xml
  3. 在indexingConfiguration标记下有一个名为lastAccessTimeLocation的值。默认值为
  4.   

    / _系统/本地/存储库/组件/ org.wso2.carbon.registry /索引/的LastAccessTime

    将该值更改为

      

    / _系统/本地/存储库/组件/ org.wso2.carbon.registry /索引/ lastaccesstime1

    1. 启动服务器