Aaron, Just for clarification, why it is necessary to set the server rpc address to 127.0.0.1?
On Mon, Apr 22, 2013 at 2:22 AM, aaron morton <aa...@thelastpickle.com>wrote: > Make sure that the server rpc_address is set to 127.0.0.1 > > Cheers > > ----------------- > Aaron Morton > Freelance Cassandra Consultant > New Zealand > > @aaronmorton > http://www.thelastpickle.com > > On 20/04/2013, at 1:47 PM, Techy Teck <comptechge...@gmail.com> wrote: > > I am also running into this problem. I have already enabled > *start_native_transport: > true* > > And by this, I am trying to make a connection- > > private CassandraDatastaxConnection() { > > try{ > cluster = > Cluster.builder().addContactPoint("localhost").build(); > session = cluster.connect("my_keyspace"); > } catch (NoHostAvailableException e) { > throw new RuntimeException(e); > } > } > > And everytime it gives me the same exception- > > *com.datastax.driver.core.exceptions.NoHostAvailableException: All > host(s) tried for query failed (tried: [localhost/127.0.0.1])* > > Any idea how to fix this problem? > > Thanks for the help. > * > * > > > > > On Fri, Apr 19, 2013 at 6:41 AM, Abhijit Chanda <abhijit.chan...@gmail.com > > wrote: > >> @Gabriel, @Wright: thanks, such a silly of me. >> >> >> On Fri, Apr 19, 2013 at 6:48 PM, Keith Wright <kwri...@nanigans.com>wrote: >> >>> Did you enable the binary protocol in Cassandra.yaml? >>> >>> Abhijit Chanda <abhijit.chan...@gmail.com> wrote: >>> >>> >>> Hi, >>> >>> I have downloaded the CQL driver provided by Datastax using >>> <dependency> >>> <groupId>com.datastax.cassandra</groupId> >>> <artifactId>cassandra-driver-core</artifactId> >>> <version>1.0.0-beta2</version> >>> </dependency> >>> >>> Then tried a sample program to connect to the cluster >>> Cluster cluster = Cluster.builder() >>> .addContactPoints(db1) >>> .withPort(9160) >>> .build(); >>> >>> But sadly its returning >>> c*om.datastax.driver.core.exceptions.NoHostAvailableException: >>> All host(s) tried for query failed * >>> * >>> * >>> I am using cassandra 1.2.2 >>> >>> Can any one suggest me whats wrong with that. >>> >>> And i am really sorry for posting datastax java driver related >>> question in this forum, can't find a better place for the instant reaction >>> >>> >>> -Abhijit >>> >> >> >> >> -- >> -Abhijit >> > > > -- -Abhijit