RSolr :: Error :: Http - 404 Not Found

时间:2013-11-18 07:45:55

标签: solr ruby-on-rails-4

当我试图运行“rake sunspot:solr:reindex”时出现以下错误。有谁知道如何解决这个问题?它曾经一直运行到最近。

RSolr::Error::Http - 404 Not Found
Error:     Not Found

Request Data: "<?xml version=\"1.0\" encoding=\"UTF-8\"?><delete><query>type:Place</query></delete>"

Backtrace: /usr/local/rvm/gems/ruby-2.0.0-p247/gems/rsolr-1.0.9/lib/rsolr/client.rb:268:in `adapt_response'
/usr/local/rvm/gems/ruby-2.0.0-p247/gems/rsolr-1.0.9/lib/rsolr/client.rb:175:in `execute'
/usr/local/rvm/gems/ruby-2.0.0-p247/gems/rsolr-1.0.9/lib/rsolr/client.rb:161:in `send_and_receive'
/usr/local/rvm/gems/ruby-2.0.0-p247/bundler/gems/sunspot-d013ad3c9f86/sunspot_rails/lib/sunspot/rails/solr_instrumentation.rb:16:in `block in send_and_receive_with_as_instrumentation'
/usr/local/rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.0.0/lib/active_support/notifications.rb:159:in `block in instrument'
/usr/local/rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.0.0/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/usr/local/rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.0.0/lib/active_support/notifications.rb:159:in `instrument'
/usr/local/rvm/gems/ruby-2.0.0-p247/bundler/gems/sunspot-d013ad3c9f86/sunspot_rails/lib/sunspot/rails/solr_instrumentation.rb:15:in `send_and_receive_with_as_instrumentation'
(eval):2:in `post'

https://gist.github.com/DerekChia/36ebe381451b2c4cf18d

的完整错误代码

1 个答案:

答案 0 :(得分:4)

我是solr的新手,并且在开发过程中遇到同样的问题。当我把所有东西都当作sudo运行时,它开始时没有任何问题:

$ sudo bundle exec rake sunspot:solr:start
$ sudo bundle exec rake sunspot:solr:reindex

然后我可以在http://localhost:8982/solr

查看solr服务器

因此,它看起来像是一个权限问题,以避免以root用户身份运行它。

相关问题