【问题标题】:Sunspot solr NO JSP connection errorSunspot solr NO JSP 连接错误
【发布时间】:2014-07-17 22:01:58
【问题描述】:

在我的应用程序中,我安装了 sunspot solr,并且运行良好,直到几天前。现在突然之间我什至无法开始我的 solr 开发。每次我运行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

我没有对我的设置进行任何更改,我已经尝试了this question 的建议,但似乎没有任何效果。有谁知道这个错误是什么意思,我该如何解决?

宝石文件

gem 'sunspot_solr'
gem 'sunspot_rails', github: 'sunspot/sunspot', branch: 'master'

sunspot.yml

production:
  solr:
    hostname: websolr_url
    port: 8983
    log_level: WARNING
    path: /solr/production
    # read_timeout: 2
    # open_timeout: 0.5

development:
  solr:
    hostname: localhost
    port: 8983
    log_level: INFO
    path: /solr/development

test:
  solr:
    hostname: localhost
    port: 8983
    log_level: WARNING
    path: /solr/test

****编辑****

这是我从/solr 管理页面得到的错误。我对 solr 很陌生,不知道如何解决这个问题。

SolrCore Initialization Failures

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

日志

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

【问题讨论】:

    标签: ruby-on-rails solr sunspot sunspot-rails


    【解决方案1】:

    这不是太阳黑子造成的,而是您的 Solr 实例配置错误造成的。 Solr 需要JSP 支持才能为其管理页面提供服务(库查询这些页面以获取有关架构的信息等)。如果管理界面由于任何原因不可用,这将使库因上述消息而被拒之门外。

    在客户端调试任何内容之前,请确保您能够通过常规浏览器访问您安装的/solr(或安装它的位置)。对于捆绑的码头,您还需要转移 important settings in an .ini file。您的应用容器的日志可能会告诉您更多信息(可能您的容器中缺少 JSP 支持、缺少 .jar 等)。

    【讨论】:

    • @iamdhunt 似乎您的索引已损坏(或者您已经有一个空的data/ 目录)。删除data/(包括目录)并重新索引。
    • 谢谢!这解决了我的问题
    • @MatsLindh 谢谢!这对我有用。删除data/目录
    【解决方案2】:

    最干净的方法是从头开始:

    • 删除整个/solr目录
    • 重新安装
    • 启动 solr 服务器以重新创建您的 /solr 目录
    • 重新索引
    • 添加您拥有的任何自定义配置

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-04-07
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-03-15
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多