无法重新索引太阳黑子SOLR - 错误 - RSolr ::错误:: Http - 500内部服务器错误

xir*_*epe 13 ruby solr ruby-on-rails sunspot

每次我尝试重新索引使用...

耙太阳黑子:solr:reindex

这些错误消息始终显示:

错误 - RSolr ::错误:: Http - 500内部服务器错误 - 正在重试...错误 - RSolr ::错误:: Http - 500内部服务器错误 - 忽略...错误 - RSolr ::错误:: Http - 500内部服务器错误 - 正在重试...错误 - RSolr ::错误:: Http - 500内部服务器错误 - 忽略...

我试图停止然后开始使用...

rake sunspot:solr:stop
rake sunspot:solr:start
Run Code Online (Sandbox Code Playgroud)

但什么都没发生.

现在每次我尝试在localhost中运行我的应用程序...

这是错误:

RSolr::Error::Http - 500 Internal Server Error
Error: 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: 

 <abortOnConfigurationError>false</abortOnConfigurationError>

in null

-------------------------------------------------------------

Request Data: "<?xml version=\"1.0\" encoding=\"UTF-8\"?><delete><query>type:Trip</query></delete>"
Run Code Online (Sandbox Code Playgroud)

比我在终端中更详细的错误消息.

我尝试了很多来自网络的解决方案,例如将Abort Configuration设置为false,但没有任何反应.

错误仍然存​​在.

任何工作将不胜感激.

pro*_*ons 34

解决方案:

  1. rake sunspot:solr:stop
  2. rm -rvf solr (删除你的/ solr目录)
  3. rake sunspot:solr:start
  4. rake sunspot:solr:reindex

请享用

  • 如果你接受我的解决方案,如果它对你有所帮助,我会喜欢它吗? (4认同)

Min*_*ing 6

基于@professormeowingtons提供的答案,在生产中对我有用的是:

  1. $ rake sunspot:solr:stop RAILS_ENV=production
  2. $ rm -rvf solr # delete your /solr directory
  3. $ sudo reboot # reboot the machine RAILS_ENV=production
  4. $ rake sunspot:solr:start RAILS_ENV=production
  5. $ rake sunspot:solr:reindex RAILS_ENV=production


s01*_*ist 0

这意味着您的配置文件有问题并且 solr 无法启动。检查太阳黑子日志。