On 3/3/2015 4:21 AM, Aman Tandon wrote: > I am new to solr-cloud, i have connected the zookeepers located on 3 remote > servers. All the configs are uploaded and linked successfully. > > Now i am stuck to how to start solr in cloud mode using these external > zookeeper which are remotely located. > > Zookeeper is installed at 3 servers and using the 2181 as client port. ON > all three server, solr server along with external zookeeper is present. > > solrcloud1.com (solr + zookeper is present) > solrcloud2.com > solrcloud3.com > > Now i have to start the solr by telling the solr to use the external > zookeeper. So how should I do that.
You simply tell Solr about all your zookeeper servers on startup, using the zkHost property. Here's the format of that property: server1:port,server2:port,server3:port/solr1 The /solr1 part (the ZK chroot) is optional, but I recommend it ... it can be just about any text you like, starting with a forward slash. What this does is put all of SolrCloud's information inside a path in zookeeper, sort of like a filesystem. With no chroot, that information is placed at the "root" of zookeeper. If you want to use a zookeeper ensemble for multiple applications, you're going to need a chroot. Even when multiple applications are not required, I recommend it to keep the zookeeper root clean. You can see some examples of zkHost values in the javadoc for SolrJ: http://lucene.apache.org/solr/5_0_0/solr-solrj/org/apache/solr/client/solrj/impl/CloudSolrClient.html#CloudSolrClient%28java.lang.String%29 Thanks, Shawn