title: Setting up solr cloud on two machines
body: <p>Enviornment - solr-8.9.0, java version &quot;11.0.12&quot; 2021-07-20 LTS, apache-zookeeper-3.6.1-bin/</p>
  <p>To set-up solrCloud i have done following steps-</p>
  <p>Setting-up Zookeeper on Node 1</p>
  <pre><code>a. Go inside &lt;ZK_HOME&gt;/conf directory.
  b. Make a copy of zoo_sample.cfg &amp; rename to zoo.cfg (or mv zoo_sample.cfg to zoo.cfg)
  c. Edit zoo.cfg and modify data_dir parameter to a directory location where you would like Zookeeper to store its data.
  dataDir=&lt;ZK_HOME&gt;/conf/data
  d. Now start Zookeeper with command
  ./bin/zkServer.sh start
  </code></pre>
  <p>Solr Setup on Node 1 / Machine 1</p>
  <pre><code>a. Create directory solr-8.9.0/server/solr/node1/solr/.
  b. Copy default zoo.cfg &amp; solr.xml from solr-8.9.0/server/solr to solr5.x.x/server/solr/node1/solr/
  c. Now lets start Solr using below command (basically you want to start in cloud mode with Zookeeper)
  ./bin/solr start -cloud -s solr-8.9.0/server/solr/node1/solr  -p 8983 -z &lt;Node1 IP&gt;:2181 -m 2g
  </code></pre>
  <p>Solr Setup on Node 2 / Machine 2</p>
  <pre><code>a. Create directory solr-8.9.0/server/solr/node1/solr/.
  b. Copy default zoo.cfg &amp; solr.xml from solr-8.9.0/server/solr to solr5.x.x/server/solr/node1/solr/
  c. ./solr start -cloud -s solr-8.9.0/server/solr/node1/solr  -p 8983 -z &lt;Node1 IP&gt;:2181 -m 2g 
  </code></pre>
  <p>Upload configs to Zookeeper</p>
  <pre><code>a. ./server/scripts/cloud-scripts/zkcli.sh -zkhost &lt;Node1 IP&gt;:2181 -cmd upconfig -confname _defaults -confdir solr-8.9.0/server/solr/configsets/_defaults/conf
  </code></pre>
  <p>Creating a collection</p>
  <pre><code>http://&lt;Node1 IP&gt;:8983/solr/admin/collections?action=CREATE&amp;name=&lt;myCollection&gt;&amp;numShards=2&amp;replicationFactor=2&amp;maxShardsPerNode=2&amp;collection.configName=_defaults
  </code></pre>
  <p>But i am getting following error while creation of collection</p>
  <pre><code>{
    &quot;responseHeader&quot;:{
  &quot;status&quot;:400,
  &quot;QTime&quot;:1213},
    &quot;failure&quot;:{
  &quot;$Node2:8983_solr&quot;:&quot;org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException:Error from server at http://$Node2:8983/solr: Path /home/solr/solr-8.9.0/server/solr/node1/solr/myCollection_shard1_replica_n2 must be relative to SOLR_HOME, SOLR_DATA_HOME coreRootDirectory. Set system property 'solr.allowPaths' to add other allowed paths.&quot;,
  &quot;$Node2:8983_solr&quot;:&quot;org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException:Error from server at http://$Node2:8983/solr: Path /home/solr/solr-8.9.0/server/solr/node1/solr/myCollection_shard2_replica_n6 must be relative to SOLR_HOME, SOLR_DATA_HOME coreRootDirectory. Set system property 'solr.allowPaths' to add other allowed paths.&quot;,
  &quot;127.0.1.1:8983_solr&quot;:&quot;org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException:Error from server at http://127.0.1.1:8983/solr: Path /data/Lucene/solr/solrcloud/solr-8.9.0/server/solr/node1/solr/myCollection_shard2_replica_n4 must be relative to SOLR_HOME, SOLR_DATA_HOME coreRootDirectory. Set system property 'solr.allowPaths' to add other allowed paths.&quot;,
  &quot;127.0.1.1:8983_solr&quot;:&quot;org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException:Error from server at http://127.0.1.1:8983/solr: Path /data/Lucene/solr/solrcloud/solr-8.9.0/server/solr/node1/solr/myCollection_shard1_replica_n1 must be relative to SOLR_HOME, SOLR_DATA_HOME coreRootDirectory. Set system property 'solr.allowPaths' to add other allowed paths.&quot;},
  &quot;Operation create caused exception:&quot;:&quot;org.apache.solr.common.SolrException:org.apache.solr.common.SolrException: Underlying core creation failed while creating collection: myCollection&quot;,
    &quot;exception&quot;:{
  &quot;msg&quot;:&quot;Underlying core creation failed while creating collection: myCollection&quot;,
  &quot;rspCode&quot;:400},
    &quot;error&quot;:{
  &quot;metadata&quot;:[
    &quot;error-class&quot;,&quot;org.apache.solr.common.SolrException&quot;,
    &quot;root-error-class&quot;,&quot;org.apache.solr.common.SolrException&quot;],
  &quot;msg&quot;:&quot;Underlying core creation failed while creating collection: myCollection&quot;,
  &quot;code&quot;:400}}
  </code></pre>
  <p>Why above error was occurred? What steps i am missing while setting up solrCloud on 2 machines with 1 zookeeper instance? Could someone help me find the missing piece?</p>