cassandra-client-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Popescu <al...@datastax.com>
Subject Re: Cassandra-Java-Driver and C* v3.* -- failed to connect
Date Tue, 05 Jan 2016 09:28:52 GMT
Serj, there have been an RC recently which should give you a stable API and
the latest bug fixes:
https://groups.google.com/a/lists.datastax.com/d/msg/java-driver-user/779VHUOVcOM/h7fYfOyOBQAJ

On Tue, Jan 5, 2016 at 11:06 AM, ssivikt@gmail.com <ssivikt@gmail.com>
wrote:

> I've just tried cassandra-driver-core v3.0.0-alpha5 and it works with C*
> 3.1.1. At least it connects to the cluster.
>
>
> On 01/05/2016 11:57 AM, Alex Popescu wrote:
>
>> Hi Serj,
>>
>> Have you tried the 3.0 rc? Due to some changes in the system tables, the
>> older versions of the driver do have problems connecting.
>>
>> On Tue, Jan 5, 2016 at 6:51 AM, ssivikt@gmail.com <ssivikt@gmail.com>
>> wrote:
>>
>> Hi All,
>>> I'm trying to connect to C* v3.1.1 cluster.
>>> It works nice with cqlsh
>>>
>>> /$ cqlsh//
>>> //Connected to Test Cluster at 127.0.0.1:9042.//
>>> //[cqlsh 5.0.1 | Cassandra 3.1.1 | CQL spec 3.3.1 | Native protocol v4]/
>>>
>>> But doesn't work with /cassandra-driver-core/.
>>> I use next mvn deps:
>>>
>>> /<dependency>//
>>> //    <groupId>com.datastax.cassandra</groupId>//
>>> //<artifactId>cassandra-driver-core</artifactId>//
>>> //    <version>3.0.0-rc1</version>//
>>> //</dependency>//
>>> //
>>> //<dependency>//
>>> //    <groupId>org.apache.cassandra</groupId>//
>>> //    <artifactId>cassandra-all</artifactId>//
>>> //    <version>3.1.1</version>//
>>> //</dependency>/
>>>
>>> And connect in the next code:
>>>
>>> /Cluster.Builder builder = Cluster.builder()
>>>          .withProtocolVersion(ProtocolVersion.V4)
>>>          .withPort(9042)
>>>          .addContactPoint("127.0.0.1");
>>>
>>> cluster = builder.build();
>>> Metadata metadata = cluster.getMetadata();/
>>>
>>> And it doesn't work. I get the exception:
>>> /com.datastax.driver.core.exceptions.NoHostAvailableException: All
>>> host(s)
>>> tried for query failed (tried: /127.0.0.1:9042
>>> (com.datastax.driver.core.exceptions.TransportException: [/127.0.0.1]
>>> Cannot connect))//
>>> //    at
>>>
>>> com.datastax.driver.core.ControlConnection.reconnectInternal(ControlConnection.java:231)//
>>> //    at
>>>
>>> com.datastax.driver.core.ControlConnection.connect(ControlConnection.java:77)//
>>> //    at
>>> com.datastax.driver.core.Cluster$Manager.init(Cluster.java:1382)//
>>> //    at com.datastax.driver.core.Cluster.getMetadata(Cluster.java:393)/
>>>
>>> Everything is ok for C* 2.2.4 when I use
>>> /
>>> $ cqlsh
>>> Connected to Test Cluster at 127.0.0.1:9042.
>>> [cqlsh 5.0.1 | Cassandra 2.2.4 | CQL spec 3.3.1 | Native protocol v4]/
>>>
>>> /<dependency>//
>>> //    <groupId>com.datastax.cassandra</groupId>//
>>> //<artifactId>cassandra-driver-core</artifactId>//
>>> //    <version>2.1.9</version>//
>>> //</dependency>//
>>> //
>>> //<dependency>//
>>> //    <groupId>org.apache.cassandra</groupId>//
>>> //    <artifactId>cassandra-all</artifactId>//
>>> //    <version>3.1.1</version>//
>>> //</dependency>/
>>>
>>> /Cluster.Builder builder = Cluster.builder()
>>>          .withPort(9042)
>>>          .addContactPoint("127.0.0.1");
>>>
>>>
>>> /C* java driver isn't ready to use?/
>>> /
>>>
>>> --
>>> Thanks,
>>> Serj
>>>
>>>
>>>
>>
> --
> Thanks,
> Serj
>
>


-- 
Bests,

Alex Popescu | @al3xandru
Sen. Product Manager @ DataStax

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message