0

I have setup SOLR on a Centos6 server, using Tomcat as a container. Everything is working nicely and I have been able to import document through SolrUpdateCSV into my newly created collection.

I now have two cores: collection1 and vanassem. Collection1 is the default core.

A strange thing happens when I reload Tomcat6: service tomcat6 restart. The vanassem core is not there any more. The directory exists, but SOLR seems to 'forget' it.

When I add a new core through the SOLR admin named 'vanassem' everything is working perfectly again.

I used the following tutorial to install java, tomcat6 and solr on my server: http://andres.jaimes.net/878/setup-lucene-solr-centos-tomcat/

Why would the core go away on a service restart of tomcat6?

Patrick Steenks
  • 612
  • 1
  • 11
  • 24
  • Please let me know if my response helped ? – Arun Jan 03 '14 at 17:47
  • If you're using SolrCloud here, I wonder if Solr's embedded ZK server is persisting collection-core mapping information through a restart. So are you using SolrCloud? How are you managing ZooKeeper? Are either `collection1` or `vanassem` actually a core or is either a SolrCloud collection? (Not sure if this counts as an answer, posting a comment instead.) – Nick Zadrozny Jan 03 '14 at 20:45
  • Hi Nick, I'm not sure if I'm using SolrCloud. I don't intend too. I just want to have several cores set up and be able to index them. – Patrick Steenks Jan 07 '14 at 13:08

3 Answers3

1

What do you mean by solr "forgets" it? If you are talking about it vanassem is not selected in the cores of admin panel, that is expected behavior. Check this way and see what happens : http://localhost:8080/solr/vanassem/select?q=*%3A*&wt=xml&indent=true

If you get the results you are ok. The admin panel does not remember what you selected last, after restarts but cores are functional.

Arun
  • 1,777
  • 10
  • 11
  • By 'forgets' I mean that the core has disappeared from the admin panel. You can also no longer search the core with the select command you gave. It appears that the core is no longer available and that somehow the config of SOLR is overwritten. – Patrick Steenks Jan 03 '14 at 19:21
  • I had never seen something like this, i looked at the link http://andres.jaimes.net/878/setup-lucene-solr-centos-tomcat/ you posted in your question, unless you wrote a script that overrides web.xml or Solr's configuration during restarts (?) this cannot be happening becuase of "service tomcat6 restart" . – Arun Jan 03 '14 at 20:32
  • thanks for your answers, they did point me in the right direction. Apparently there was a problem in my core.properties files (the new way SOLR discovers cores). – Patrick Steenks Jan 07 '14 at 13:09
0

Apparently SOLR has a new way of discoring cores. It does not use solr.xml for this anymore, but instead 'walks' the directories under the main directory and searches for core.properties files.

http://wiki.apache.org/solr/Solr.xml%204.4%20and%20beyond

I guess there is some misconfiguration when setting up a new core. I will try to set up new cores.

Patrick Steenks
  • 612
  • 1
  • 11
  • 24
0

Update the solr config for the cores to be persistent.

In your solr.xml, update <solr> or <solr persistent="false"> to <solr persistent="true">

Alex Z
  • 1,362
  • 15
  • 16