3

I have 2 branches: develop and another one in which I make my changes.

Everything was OK until I checked my develop branch and found it was bit ahead of my branch and there where some ruby gem updates.

I checked out my develop branch and wanted to check whats going on with tests, so run RSpec tests, and found that all tests failed, so I decided to try running tests on my branch. When I changed branches I did the bundle update again, and run the tests and they failed all too. Before I updated the gems in develop test where passing.

The tests showed that something is wrong with Solar, so went in console and wanted to index it, and it showed this:

Indexing Irec::Application
rake aborted!
RSolr::Error::Http: RSolr::Error::Http - 500 Internal Server Error
Error:     Server Error</pre></p><h3>Caused by:</h3><pre>java.lang.NullPointerException
    at org.apache.solr.servlet.SolrDispatchFilter.authenticateRequest(SolrDispatchFilter.java:241)
    at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:186)
    at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:179)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
    at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
    at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)
    at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)
    at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)
    at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)

URI: http://localhost:8982/solr/development/update?wt=ruby
Request Headers: {"Content-Type"=>"text/xml"}
Request Data: "<?xml version=\"1.0\" encoding=\"UTF-8\"?><add><doc>

I tried some suggested things I found elsewhere on Stack Overflow, but they didn't fix my issue. Does anybody know how I can fix this error?

Community
  • 1
  • 1
Trusislv1
  • 193
  • 2
  • 4
  • 10
  • What does the log on the Solr side say? – MatsLindh Feb 12 '16 at 11:31
  • 1
    The combination of run-on sentences and the use of "so" make this painful to read. Can you please rewrite it in more formal English? – Wayne Conrad Feb 12 '16 at 11:44
  • @WayneConrad I am not a native speaker of english, neither i use it in daily bases, i don't know how to write right in English, but i gonna fix it, if it helps you to read it. – Trusislv1 Feb 12 '16 at 12:21
  • @MatsLindh when i execute sunspot index command, nothing appears in sunspot logs. – Trusislv1 Feb 12 '16 at 12:21
  • @Trusislv1 I'm talking about the Solr log - is the 500 generated by the solr server or by the rails container? Sounds like it's being generated on the Solr side, so it would give you an actual error message or a hint about why it fails. – MatsLindh Feb 12 '16 at 13:31
  • @MatsLindh you mean somthing like this [image](http://imgur.com/0OQjUzn) and this in solar page [image](http://imgur.com/FRB6KZn)? – Trusislv1 Feb 12 '16 at 14:40
  • @Trusislv1 Seems like you're missing required authentication information? – MatsLindh Feb 12 '16 at 14:42
  • @MatsLindh Where should i look for it? – Trusislv1 Feb 19 '16 at 06:46

2 Answers2

0

I found this question via the error message RSolr::Error::Http: RSolr::Error::Http - 500 Internal Server Error.

I have multiple versions of Java, and don't want to permanently set JAVA_HOME in my shell's config file (e.g. ~/.bash_profile) because solr relies on a version of Java that I do not want to be my default, therefore I set it before starting solr...

JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_261.jdk/Contents/Home

bundle exec rake sunspot:solr:start
user664833
  • 18,397
  • 19
  • 91
  • 140
-1

Solution:

Removed solr map from project and restarted the sunspot:solr.

Trusislv1
  • 193
  • 2
  • 4
  • 10