title: Why cant I connect to cassandra
body: <p>I have a basic cassandra setup on my laptop, its up and I can connect to it using the command line tools, however in java, the following fails:</p>
  
  <pre><code>Cluster cluster = new Cluster.Builder().addContactPoints("localhost").withPort(9160).build();
  </code></pre>
  
  <p>Any clues would be really helpful, thanks! The error is:</p>
  
  <pre><code>com.datastax.driver.core.exceptions.NoHostAvailableException: All host(s) tried for query failed (tried: localhost/127.0.0.1 ([localhost/127.0.0.1] Unexpected error during transport initialization (com.datastax.driver.core.TransportException: [localhost/127.0.0.1] Channel has been closed)))
      at com.datastax.driver.core.ControlConnection.reconnectInternal(ControlConnection.java:186)
  </code></pre>