title: ElasticSearch... Not So Elastic?
body: <p>I have used this method to build Elastic Search Clusters in the cloud. It works 30%-50% of the time. </p>
  
  <p>I start with 2 centos nodes in 2 servers in Digital Oceans Cloud. I then install ES and set the same cluster name in each config/elasticsearch.yml. Then I also set (uncomment):</p>
  
  <pre><code>discovery.zen.ping.multicast.enabled: false
  </code></pre>
  
  <p>as well as set and uncomment:</p>
  
  <pre><code>discovery.zen.ping.unicast.hosts: ['192.168.10.1:9300', '192.168.10.2:9300']
  </code></pre>
  
  <p>in each of the 2 servers. <a href="https://stackoverflow.com/questions/21195116/elastic-search-clustering-in-the-cloud">SO Reference here</a></p>
  
  <p>Then, to give ES the benefit of the doubt, I <code>service iptables stop</code>, then restart the service on each node. Sometimes the servers see each other and I get a """cluster""" out of elasticsearch, sometimes if not most, the servers dont see each other even though multicast is disabled and specific ip addresses are given in the unicast hosts array that have NO firewall on, and point to each other.</p>
  
  <p>WHY ES Community? Why does a <em>hello world</em> equivalent of elastic search prove to be inelastic to say the least (Let me openly and readily admit this MUST be user error/idiocy else no one would use this technology).</p>
  
  <p>At first I was trying to build a simple 4 node cluster, but goodness gracious the issues that came along with that before indexing a single document were ridiculous. I had a 0% success rate. Some nodes saw some other nodes (via head and paramedic) while others had 'dangling indices' and 'unassigned indexes'. When I googled this I found tons of relevent/similar issues and no workable answers.</p>
  
  <p>Can someone send me an example of how to build an elastic search cluster, that works? </p>
  
  <blockquote>
    <p>@Ben_Lim's Answer: Did everyone who needs this as a resource get that?
    I took 1 node (This is not for Prod) Server1 and changed the following
    in /config/elasticsearch.yml settings:</p>
    
    <ol>
    <li><p>uncomment node.master: true</p></li>
    <li><p>uncomment and set network.host: 192.XXX.1.10</p></li>
    <li><p>uncomment transport.tcp.port: 9300</p></li>
    <li><p>uncomment discovery.zen.ping.multicast.enabled: false</p></li>
    <li><p>uncomment and set discovery.zen.ping.unicast.hosts: ["192.XXX.1.10:9300"]</p></li>
    </ol>
    
    <p>That sets the master, okay, then in each subsequent node (example
    above) that wants to join -- </p>
    
    <ol>
    <li><p>uncomment node.master: false</p></li>
    <li><p>uncomment and set network.host: 192.XXX.1.11</p></li>
    <li><p>uncomment transport.tcp.port: 9301</p></li>
    <li><p>uncomment discovery.zen.ping.multicast.enabled: false</p></li>
    <li><p>uncomment and set discovery.zen.ping.unicast.hosts: ["192.XXX.1.10:9300"]</p></li>
    </ol>
    
    <p>Obviously make sure all nodes have same cluster name and you iptables
    firewalls etc are setup right. </p>
  </blockquote>
  
  <pre><code>NOTE AGAIN -- This is not for prod, but a way to start testing ES in Cloud, you can tighten up the screws from here 
  </code></pre>