Reply
Sri
New Contributor
Posts: 4
Registered: ‎12-18-2017

How to start solr in clustering mode

[ Edited ]

Hi

 

   We have cloudera 5.11 with solr 4.10 version. I want start the SOLR in clustering mode so I could make use of carrot2 integration and cluster the result  set. I have set the Dsolr.clustering.enabled=True in Java Configuaration Options for Solr Server. 

 

 

I can see the change in CATALINA_OPTS too as below. But when I restart the SOLR server it fails with the error saying "Unrecognized VM option 'CMSParallelRemarkEnabled-XX:Dsolr.clustering.enabled=true'
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit."

 

 

+CATALINA_OPTS=-Djava.net.preferIPv4Stack=true -Dsolr.hdfs.blockcache.enabled=true -Dsolr.hdfs.blockcache.direct.memory.allocation=true -Dsolr.hdfs.blockcache.blocksperbank=16384 -Dsolr.hdfs.blockcache.slab.count=1 -DzkClientTimeout=15000 -Xms209715200 -Xmx209715200 -XX:MaxDirectMemorySize=268435456 -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=70 -XX:+CMSParallelRemarkEnabled-XX:Dsolr.clustering.enabled=true -XX:OnOutOfMemoryError={{AGENT_COMMON_DIR}}/killparent.sh

 

Can you please guide me on how to start the SOLR with clustering enabled.

 

Thanks

S

Cloudera Employee
Posts: 246
Registered: ‎01-09-2014

Re: How to start solr in clustering mode

Solr clustering is enabled by default, you don't need to make any changes to enable it.

 

-pd

Sri
New Contributor
Posts: 4
Registered: ‎12-18-2017

Re: How to start solr in clustering mode

Thanks for the reply. How do I know if clustering is enabled and if it using Carrot2 libraries for resultset clustering.

 

--Sri

Highlighted
New Contributor
Posts: 1
Registered: ‎05-08-2018

Re: How to start solr in clustering mode

CLustering in solr is not working by default. What config changes need to be made? when I try below url, I see an error. 

 

  http://<ip address>:8983/solr/knowledgebase/clustering?q=*:*&wt=json

 

HTTP Status 404 - /solr/knowledgebase/clustering

 

The requested resource is not available.

 

 

 

New Contributor
Posts: 5
Registered: ‎08-08-2018

Re: How to start solr in clustering mode

Its enabled by default, not need to make a change.

If you've used CM to install the solr service on the other cluster machines, auto-configs are done by the CM and zookeeper will be aware of these servers

 

So

1. generate solr configs(schema.xml and solrconfig.xml) as instructed in the documentation, and customize according to schema

2. Make the files available to Solr, upload the contents of the config (instanceDir) to zookeeper

3. Then create the collection and specify the number of shards, these shouldn't exceed the number of solr servers

 

Go to solr admin page of any of the nodes, check under Cloud, you should be able to view some sort of mapping

 collection_name -> shard <number> -> node_hostname

Announcements