title: connecting to cassandra nodes on a datastax cluster on EC2 Ruby on Rails
body: <p>I created a datastax cassandra Enterprise cluster with 2 cassandra nodes, 2 search nodes and 2 Analytics nodes. </p>
  
  <p>Everything seems to work correctly EXCEPT, I can't connect to it from outside. If I'm on node0 server I can run the cassandra-cli and connect to the cassandra nodes on port 9160 but when I tried to connect using <a href="https://github.com/jasonmk/datastax_rails" rel="nofollow">datastax-rails</a> gem, I get "No live servers" I also tried datastax devCenter which tries to connect to the native port 9042 but also didn't work. I'm really puzzled, any help is appreciated. </p>
  
  <p>So after some digging I found some issues</p>
  
  <pre><code>   1. Port 9160 is connected and I can connect to it from telnet node0_ip 9160
     2. when I run rake ds:migrate, I get No live servers in node0_ip 
     3. I tried to connect to 'cassandra' gem instead from IRB and tried 
        a. client = Cassandra.new('example', 'node0_ip:9160')
        b. client.insert(:users, "5", {'screen_name' =&gt; "buttonscat4"})
  
       I got a similar error with ThriftClient::NoServersAvailable: No live servers but this time with all the IPs of all the nodes in the cluster
  
    4. I tried adding "client.disable_node_auto_discovery!" and I was able to connect and add stuff using 'cassandra' Gem. 
  
    5. I also found on https://github.com/cassandra-rb/cassandra/issues/171 that I need to  change your server to bind on a non-loopback address but have no idea what does that mean
  </code></pre>
  
  <p>The question now is how </p>