搜索引擎 solr 报错 404

kitt · 2013年12月19日 · 最后由 xwf286 回复于 2014年06月24日 · 8251 次阅读

Completed 500 Internal Server Error in 211ms

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

Request Data: "<?xml version=\"1.0\" encoding=\"UTF-8\"?>User 100004UserActiveRecord::BaseUserxuehuang"

Backtrace: /usr/local/rvm/gems/ruby-1.9.3-p392/gems/rsolr-1.0.9/lib/rsolr/client.rb:268:in adapt_response' /usr/local/rvm/gems/ruby-1.9.3-p392/gems/rsolr-1.0.9/lib/rsolr/client.rb:175:inexecute' /usr/local/rvm/gems/ruby-1.9.3-p392/gems/rsolr-1.0.9/lib/rsolr/client.rb:161:in send_and_receive' (eval):2:inpost' /usr/local/rvm/gems/ruby-1.9.3-p392/gems/rsolr-1.0.9/lib/rsolr/client.rb:67:in update' /usr/local/rvm/gems/ruby-1.9.3-p392/gems/rsolr-1.0.9/lib/rsolr/client.rb:87:inadd' /usr/local/rvm/gems/ruby-1.9.3-p392/gems/sunspot-2.0.0/lib/sunspot/indexer.rb:106:in add_documents' /usr/local/rvm/gems/ruby-1.9.3-p392/gems/sunspot-2.0.0/lib/sunspot/indexer.rb:30:inadd' /usr/local/rvm/gems/ruby-1.9.3-p392/gems/sunspot-2.0.0/lib/sunspot/session.rb:91:in index' /usr/local/rvm/gems/ruby-1.9.3-p392/gems/sunspot-2.0.0/lib/sunspot/session_proxy/abstract_session_proxy.rb:11:inindex' /usr/local/rvm/gems/ruby-1.9.3-p392/gems/sunspot-2.0.0/lib/sunspot.rb:184:in index'): app/controllers/index_controller.rb:38:injoin_in'

Rendered /usr/local/rvm/gems/ruby-1.9.3-p392/gems/actionpack-3.2.12/lib/action_dispatch/middleware/templates/rescues/_trace.erb (1.2ms) Rendered /usr/local/rvm/gems/ruby-1.9.3-p392/gems/actionpack-3.2.12/lib/action_dispatch/middleware/templates/rescues/_request_and_response.erb (1.1ms) Rendered /usr/local/rvm/gems/ruby-1.9.3-p392/gems/actionpack-3.2.12/lib/action_dispatch/middleware/templates/rescues/diagnostics.erb within rescues/layout (8.5ms)

好好的,也不知道为什么报了这个错,直接浏览器访问都正常

这种问题一般搜 google,我也遇到了这个问题,我的解决方法是:把诸如 path:/solr/production 都注释掉

需要 登录 后方可回复, 如果你还没有账号请 注册新账号