Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

solr zookeper /solr/collections are empty

Solved Go to solution

solr zookeper /solr/collections are empty

Contributor

Hi all.

 

      We have accidently given the command "solrctl init --force" which deletes all existing solr collection entry in zookeeper.

 

     and in the Solr UI there is a SolrCore Initialization Failures for all the collections.. It showing no cores available error

 

     Could you please help us to solve it. We need to recover existing collecitons.

 

Thanks & Regards,

J.Ganesh Kumar.

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Re: solr zookeper /solr/collections are empty

Contributor

Hello pdvorak

 

              Thanks for your reply. We have solved this issue by uploading the collections config files back to the zookeeper using update and reload option in solrcloud. After execting those commands we done solr restart. while restarting the solr elects the collection leaders and placed those informations under /solr/collection in zookeeper.

 

             Just for my understand could you please answer for the below queries.

  1. what do you mean by  "zk data dir" .
  2. Is it creates the snapshot for the config files in zookeeper. 
  3. As I know zookeeper holds only the config files instead of data. then what "zk data dir" holds?

 

2 REPLIES 2

Re: solr zookeper /solr/collections are empty

Super Collaborator
If you have done an init --force, then the collection config information is unfortunately deleted in ZK (this is a destructive command that will remove everything under /solr znode).

You might be able to look at the zk data dir and see if there are any snapshots and logs prior to the date that you deleted the data. You may be able to copy the data dir to a dev server and remove the current log and snapshot and start up the zk instance to review the data. See here for more information:

https://zookeeper.apache.org/doc/r3.1.2/zookeeperAdmin.html#sc_filemanagement

More links that may provide useful information:
https://groups.google.com/forum/#!topic/marathon-framework/EfhJ9A_6myc

http://zookeeper-user.578899.n2.nabble.com/How-to-restore-a-snapshot-after-an-accidental-ZKclenup-td...

I would suggest not trying to restore a snapshot for the running cluster, as you don't know what changes have been made since the solrctl init --force was executed.

-pd
Highlighted

Re: solr zookeper /solr/collections are empty

Contributor

Hello pdvorak

 

              Thanks for your reply. We have solved this issue by uploading the collections config files back to the zookeeper using update and reload option in solrcloud. After execting those commands we done solr restart. while restarting the solr elects the collection leaders and placed those informations under /solr/collection in zookeeper.

 

             Just for my understand could you please answer for the below queries.

  1. what do you mean by  "zk data dir" .
  2. Is it creates the snapshot for the config files in zookeeper. 
  3. As I know zookeeper holds only the config files instead of data. then what "zk data dir" holds?