Return-Path: X-Original-To: apmail-cassandra-user-archive@www.apache.org Delivered-To: apmail-cassandra-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id CAB8AF55F for ; Sat, 20 Apr 2013 01:48:07 +0000 (UTC) Received: (qmail 26662 invoked by uid 500); 20 Apr 2013 01:48:05 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 26624 invoked by uid 500); 20 Apr 2013 01:48:05 -0000 Mailing-List: contact user-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cassandra.apache.org Delivered-To: mailing list user@cassandra.apache.org Received: (qmail 26615 invoked by uid 99); 20 Apr 2013 01:48:05 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 20 Apr 2013 01:48:05 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,NORMAL_HTTP_TO_IP,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of comptechgeeky@gmail.com designates 209.85.212.178 as permitted sender) Received: from [209.85.212.178] (HELO mail-wi0-f178.google.com) (209.85.212.178) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 20 Apr 2013 01:48:00 +0000 Received: by mail-wi0-f178.google.com with SMTP id hq17so1652890wib.11 for ; Fri, 19 Apr 2013 18:47:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:mime-version:in-reply-to:references:from:date:message-id :subject:to:content-type; bh=c7Vmv9Ej5hJZzgDTbame656irmbp7TF3X+Q6esk1XwE=; b=hjJZRVq7tzoLHt71+aVcsS5bm5s74LLwCGcmnpbLI5ynC0iN0dAeYgLMK/toeynVF2 CiI1ciR6KHJ9EJwfNG3p9j3gCpQb62gX1dWNIpBXlQc9JLbsdx2U4oSnLzPOuqCOWW48 DrwYmUFnUG3qr+KGvpsiftIDklYA+1+lfmUDBr+w33HIiSFuQ+UyKXvDnfdvRPac+Jwg XDvMAEfQ7CaaKS2kk7C82c0uh+xd8z6llVDwDDTsxxZ1EAkntyxGE6AZ8YJYt/aMlo/p kldsLp1RQyolvNElj4S3HjNL7SN9KBTgBa5DvJ1P9jNMu65VX9fn6hVpgi0UqD5HmQCa xJ5w== X-Received: by 10.180.109.197 with SMTP id hu5mr30223629wib.22.1366422459537; Fri, 19 Apr 2013 18:47:39 -0700 (PDT) MIME-Version: 1.0 Received: by 10.180.91.11 with HTTP; Fri, 19 Apr 2013 18:47:19 -0700 (PDT) In-Reply-To: References: From: Techy Teck Date: Fri, 19 Apr 2013 18:47:19 -0700 Message-ID: Subject: Re: Datastax Java Driver connection issue To: user Content-Type: multipart/alternative; boundary=e89a8f2356f75060e804dac10544 X-Virus-Checked: Checked by ClamAV on apache.org --e89a8f2356f75060e804dac10544 Content-Type: text/plain; charset=ISO-8859-1 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 wrote: > @Gabriel, @Wright: thanks, such a silly of me. > > > On Fri, Apr 19, 2013 at 6:48 PM, Keith Wright wrote: > >> Did you enable the binary protocol in Cassandra.yaml? >> >> Abhijit Chanda wrote: >> >> >> Hi, >> >> I have downloaded the CQL driver provided by Datastax using >> >> com.datastax.cassandra >> cassandra-driver-core >> 1.0.0-beta2 >> >> >> 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 > --e89a8f2356f75060e804dac10544 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
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-

=A0=A0=A0 private Cassand= raDatastaxConnection() {

=A0=A0=A0 =A0=A0=A0 try{
=A0=A0=A0 =A0=A0=A0 =A0=A0=A0 cluster =3D C= luster.builder().addContactPoint("localhost").build();
=A0=A0= =A0 =A0=A0=A0 =A0=A0=A0 session =3D cluster.connect("my_keyspace"= );=A0=A0=A0 =A0=A0=A0 =A0=A0=A0
=A0=A0=A0 =A0=A0=A0 } catch (NoHostAvai= lableException e) {
=A0=A0=A0 =A0=A0=A0 =A0=A0=A0 throw new RuntimeException(e);
=A0=A0=A0 = =A0=A0=A0 }
=A0=A0=A0 }

And everytime it gives me the same = exception-

com.datastax.driver= .core.exceptions.NoHostAvailableException: All host(s) tried for query fail= ed (tried: [localhost/127.0.0.1])

Any idea how to fix this problem?

Thanks for the hel= p.
=





On Fri, Apr 19, 2013 a= t 6:41 AM, Abhijit Chanda <abhijit.chanda0@gmail.com> wrote:
@Gabriel, @Wright: thanks, = such a silly of me.=A0


On Fri, Apr 19, 2013 at 6:48 PM, Keith Wrigh= t <kwright@nanigans.com> wrote:
Did=
 you enable the binary protocol in Cassandra.yaml?

Abhijit Chanda <abhijit.chanda0@gmail.com> wrote:

Hi,

I have downloaded the CQL driver provided by Datastax using=A0
=A0 =A0 =A0 =A0<dependency>
=A0 =A0 =A0 =A0 =A0 =A0 <groupId>com.datastax.cassandra</grou= pId>
=A0 =A0 =A0 =A0 =A0 =A0 <artifactId>cassandra-driver-core</ar= tifactId>
=A0 =A0 =A0 =A0 =A0 =A0 <version>1.0.0-beta2</version>
=A0 =A0 =A0 =A0 </dependency>

Then tried a sample program to connect to the cluster
Cluster cluster =3D Cluster.builder()
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 .addContactPoints(db1)
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 .withPort(9160)
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 .build();

But sadly its=A0returning=A0com.datastax.driver.core.exceptions.NoH= ostAvailableException: All host(s) tried for query failed=A0=A0=A0

I am using cassandra 1.2.2

Can any one suggest me whats wrong with that.=A0

And i am really sorry for posting =A0datastax java driver related ques= tion in this forum, can't find a better place for the instant reaction= =A0


-Abhijit



--
-Abhij= it

--e89a8f2356f75060e804dac10544--