解决这个常见 Solr 错误的最佳方法是什么?
如果我的计算机已打开一段时间并且我一直在不同的应用程序之间切换,则会出现此错误。
通常,如果我执行 sunspot-solr stop
和 sunspot-solr start
,这就是让我的服务器正常运行所需的全部操作。
但是,如果发生我提到的情况,那么我会得到以下信息:
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_orgapachelucenestoreNIOFSDirectoryprivatevarfoldersDHDHXHq79mEpqXT6vQyzkhaETITmpindex_files_lucene0df3ec9bbc1f2dea7d43b32c37464540writelock__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_orgmortbaycomponentAbstra
我能找到的唯一解决方法就是重新启动计算机。我觉得这有点烦人。
有什么想法吗?
This error comes up if my computer has been on for awhile, and I've been toggling between different applications.
Normally if I perform sunspot-solr stop
and sunspot-solr start
, that is all that is required to get my server up and running happily.
But if the conditions I mentioned occured, then I get this :
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_orgapachelucenestoreNIOFSDirectoryprivatevarfoldersDHDHXHq79mEpqXT6vQyzkhaETITmpindex_files_lucene0df3ec9bbc1f2dea7d43b32c37464540writelock__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_orgmortbaycomponentAbstra
The only workaround I've been able to find is to simply reboot my computer. Which I find is a trifle bit annoying.
Any ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
正如错误所示,您遇到了 I/O 问题。根据 solr-dev 上的旧帖子邮件列表,听起来您的索引目录存在,但索引文件本身不存在。
如果 Solr 找到索引目录,它就假定索引存在并开始尝试加载索引文件。因此,出现错误。
根据启动/停止例程的实际情况,我会看看启动时索引文件会发生什么情况。
Just what the error says, you're encountering I/O problems. Per this old posting on the solr-dev mailing list, it sounds like your index directory exists but the index files themselves do not.
If Solr finds the index directory, it assumes the index exists and starts trying to load index files. Hence, the error.
Depending on the actual scenario with your start/stop routines, I would look at what happens with index files on start.