You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Abhijit Chanda <ab...@gmail.com> on 2013/04/19 15:16:53 UTC

Datastax Java Driver connection issue

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

Re: Datastax Java Driver connection issue

Posted by Gabriel Ciuloaica <gc...@gmail.com>.
Have you started the native transport on cassandra nodes?

Look into cassandra.yaml file, for native.transport. By default is disabled.

Br,
Gabi
On 4/19/13 4:16 PM, Abhijit Chanda 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