문제

I am working with Solr for multiple high scale productions environment configurations on Windows. Recently I have faced with a very weird issue involving Solr, where indexing works fine into Solr, but when either server or windows server is restarted the core goes offline and no longer loads.

After spending lot of hours and tried with lot of things I got it working, but wants to understand why its like that.. that only this installation has this issue.. why other Solr instances are working fine?

Note that my issue is fixed with the change described below, however I want to understand the cause of the issue and therefore need some authoritative answer on its behavior.

I have modified few things into Solrconfig.xml specifically one of the request handler that I changed while all other elements in the file are exact same.

Older solrconfig.xml has following:

<requestHandler name="/select" class="solr.SearchHandler" >

     <lst name="defaults">
      <str name="echoParams">explicit</str>
      <int name="rows">2000</int>
      <str name="field">Name</str>
      <str name="spellcheck">on</str>     
      <str name="spellcheck.collate">true</str>
      <str name="spellcheck.dictionary">default</str>
      <str name="spellcheck.dictionary">wordbreak</str>
      <str name="spellcheck.maxCollations">5</str> 
      <str name="spellcheck.count">5</str>
      <str name="spellcheck.alternativeTermCount">2</str>
      <str name="spellcheck.maxResultsForSuggest">5</str>
      <str name="spellcheck.maxCollationTries">5</str>
     </lst>

    <arr name="last-components">
      <str>spellcheck</str>
    </arr>


 </requestHandler>

New / Updated solrconfig.xml has following:

<requestHandler name="/select" class="solr.SearchHandler" >

     <lst name="defaults">
      <str name="echoParams">explicit</str>
      <int name="rows">2000</int>
      <str name="field">Name</str>
      <str name="spellcheck">on</str>     
      <str name="spellcheck.collate">true</str>
      <str name="spellcheck.dictionary">default</str>
      <str name="spellcheck.dictionary">wordbreak</str>
      <str name="spellcheck.maxcollations">5</str> 
      <str name="spellcheck.count">5</str>
      <str name="spellcheck.alternativetermcount">2</str>
      <str name="spellcheck.maxresultsforsuggest">5</str>
      <str name="spellcheck.maxcollationtries">5</str>
     </lst>

    <arr name="last-components">
      <str>spellcheck</str>
    </arr>


 </requestHandler>

I'm using this on Windows Server 2008 R2 using Tomcat 7.0 and Solr 4.7.

If you noticed carefully, the only lines changed are following:

<str name="spellcheck.maxcollations">5</str> 
      <str name="spellcheck.count">5</str>
      <str name="spellcheck.alternativetermcount">2</str>
      <str name="spellcheck.maxresultsforsuggest">5</str>
      <str name="spellcheck.maxcollationtries">5</str>
     </lst>

And there too... the camel capitals cases are changed to small case. Surprisingly changing this fixed the issue!

My Questions ares:

Does it make any effect how Solr works? Are Solr config files sensitive to case?

If it is, then why it works fine with many other installations? And why only this instillation had this issue?

Is it related to Solr / Tomcat or the Version of OS ?

Update on 14 June 2014

We were getting following error logged into catalina log file on restart. I originally didn't posted it because it doesn't seem familiar to the problem we're receiving. But this might give you some hint, so adding it here:

SEVERE: The web application [/solr] created a ThreadLocal with key of type [org.apache.solr.schema.DateField.ThreadLocalDateFormat] (value [org.apache.solr.schema.DateField$ThreadLocalDateFormat@1362773]) and a value of type [org.apache.solr.schema.DateField.ISO8601CanonicalDateFormat] (value [org.apache.solr.schema.DateField$ISO8601CanonicalDateFormat@6b2ed43a]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.

도움이 되었습니까?

해결책

To answer the first question, solr is indeed case sensitive in both it's confix and schema xml's . What this means is that the following params will get default values :

spellcheck.maxcollations : 1
pellcheck.alternativetermcount : null
spellcheck.maxresultsforsuggest : null
spellcheck.maxcollationtries : 0

The good part is that there is a lot of code dealing with special cases such as null references for the params. the bad part is that I can't figure out how this behavior changed during the last solr releases , but it should have nothing to do with the OS.

Also, the error you posted seems to get thrown after the application is closed. Are you sure there are no other errors being logged prior to that?

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top