RSolr::Error::InvalidRubyResponse - 200 OK

别来无恙 提交于 2019-12-10 03:24:36

问题


I am getting following error even after starting forreman and starting sunspot:solr :

RSolr::Error::InvalidRubyResponse - 200 OK
Error: <result status="1">java.lang.NullPointerException
    at org.apache.solr.handler.XmlUpdateRequestHandler.doLegacyUpdate(XmlUpdateRequestHandler.java:129)
    at org.apache.solr.servlet.SolrUpdateServlet.doPost(SolrUpdateServlet.java:87)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
    at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
    at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1221)
    at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:297)
    at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1212)
    at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:399)
    at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)

Request Data: "<?xml version=\"1.0\" encoding=\"UTF-8\"?><add><doc><field name=\"id\">User 1</field><field name=\"type\">User</field><field name=\"type\">ActiveRecord::Base</field><field name=\"class_name\">User</field><field name=\"name_s\">K12 Administrator</field><field name=\"username_s\">admin</field><field name=\"id_i\">1</field><field name=\"role_s\">admin</field><field boost=\"1.5\" name=\"name_text\">K12 Administrator</field><field name=\"username_text_text\">admin</field></doc></add>"

Does anyone know why am I getting this this error? Please help me.

Thank you


回答1:


I was getting this as well. My background was that I installed Solr locally and ignored everything in the solr subdirectories. So the contents of solr/pids where ignored but the file structure of solr/pids remained.

I deployed this to our dev server and encountered the above errors.

The solution turned out to be simple. The solr directory needs to be created fresh in a new environment.

  1. rake sunspot:solr:stop
  2. Delete your /solr directory.
  3. rake sunspot:solr:start
  4. rake sunspot:solr:reindex

courtesy of Can't reindex Sunspot SOLR - Error - RSolr::Error::Http - 500 Internal Server Error



来源:https://stackoverflow.com/questions/16651829/rsolrerrorinvalidrubyresponse-200-ok

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!