使用太阳黑子突然在Rails应用程序中获得Solr“SEVERE:REFCOUNT ERROR”错误

时间:2012-01-24 20:02:47

标签: ruby-on-rails solr sunspot

我的应用开始显示如下错误:

RSolr::RequestError in ProjectsController#index

Solr Response: Severe_errors_in_solr_configuration__Check_your_log_files_for_more_detailed_information_on_what_may_be_wrong__If_you_want_solr_to_continue_after_configuration_errors_change____abortOnConfigurationErrorfalseabortOnConfigurationError__in_null___javalangRuntimeException_javaioFileNotFoundException_no_segments_file_found_in_orgapachelucenestoreNIOFSDirectoryUsersrobertProjectsOfficeCodeofficesolrdatadevelopmentindex_files__at_orgapachesolrcoreSolrCoregetSearcherSolrCorejava1068__at_orgapachesolrcoreSolrCoreinitSolrCorejava579__at_orgapachesolrcoreCoreContainer$InitializerinitializeCoreContainerjava137__at_orgapachesolrservletSolrDispatchFilterinitSolrDispatchFilterjava83__at_orgmortbayjettyservletFilterHolderdoStartFilterHolderjava99__at_orgmortbaycomponentAbstractLifeCyclestartAbstractLifeCyclejava40__at_orgmortbayjettyservletServletHandlerinitializeServletHandlerjava594__at_orgmortbayjettyservletContextstartContextContextjava139__at_orgmortbayjettywebappWebAppContextstartContextWebAppContextjava1218__at_orgmortbayjettyhandlerContextHandlerdoStartContextHandlerjava500__at_orgmortbayjettywebappWebAppContextdoStartWebAppContextjava448__at_orgmortbaycomponentAbstractLifeCyclestartAbstractLifeCyclejava40__at_orgmortbayjettyhandlerHandlerCollectiondoStartHandlerCollectionjava147__at_orgmortbayjettyhandlerContextHandlerCollectiondoStartContextHandlerCollectionjava161__at_orgmortbaycomponentAbstractLifeCyclestartAbstractLifeCyclejava40__at_orgmortbayjettyhandlerHandlerCollectiondoStartHandlerCollectionjava147__at_orgmortbaycomponentAbstractLifeCyclestartAbstractLifeCyclejava40__at_orgmortbayjettyhandlerHandlerWrapperdoStartHandlerWrapperjava117__at_orgmortbayjettyServerdoStartServerjava210__at_orgmortbaycomponentAbstractLifeCyclestartAbstractLifeCyclejava40_

当我运行$ rake sunspot:solr:reindex时,我收到了类似的错误。在我的〜/ log / sunspot-solr-development.log文件中,我看到以下内容:

SEVERE: REFCOUNT ERROR: unreferenced org.apache.solr.core.SolrCore@78497062 (null) has a reference count of 1

我环顾四周但找不到解决方案。我在Mac OS X上运行localhost。有什么想法吗?感谢。

更新:运行$ rake sunspot:solr:start后,我注意到〜/ log / sunspot-solor-development.log中存在以下错误:https://gist.github.com/1672392

2 个答案:

答案 0 :(得分:0)

我不知道问题是什么,但是我运行了以下内容,它现在可以运行了:

$ rake sunspot:solr:stop
$ rake sunspot:solr:run
    (in /Users/robert/Projects/Office/Code/office)
    2012-01-24 15:48:21.212::INFO:  Logging to STDERR via org.mortbay.log.StdErrLog
    2012-01-24 15:48:21.351::INFO:  jetty-6.1.3
    2012-01-24 15:48:21.419::INFO:  Extract jar:file:/Users/robert/.rvm/gems/ruby-1.9.2-p180/gems/sunspot-1.2.1/solr/webapps/solr.war!/ to /var/folders/3l/3lUM0t5IHDOLLXJAQqlW2U+++TM/-Tmp-/Jetty_0_0_0_0_8982_solr.war__solr__-2c5peu/webapp
    2012-01-24 15:48:22.902::INFO:  Started SocketConnector @ 0.0.0.0:8982
$ (Ctrl-C to shut down solr)
    ^C2012-01-24 15:50:02.149::INFO:  Shutdown hook executing
    2012-01-24 15:50:02.178::INFO:  Shutdown hook complete
$ rake sunspot:solr:start
    (in /Users/robert/Projects/Office/Code/office)
$ rake sunspot:solr:reindex
    (in /Users/robert/Projects/Office/Code/office)

答案 1 :(得分:-1)

Solr服务器启动未正确启动。重启jboss服务器。