Return-Path: Delivered-To: apmail-cassandra-user-archive@www.apache.org Received: (qmail 4817 invoked from network); 25 Mar 2011 03:48:10 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 25 Mar 2011 03:48:10 -0000 Received: (qmail 31582 invoked by uid 500); 25 Mar 2011 03:48:08 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 31552 invoked by uid 500); 25 Mar 2011 03:48:07 -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 31544 invoked by uid 99); 25 Mar 2011 03:48:07 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 25 Mar 2011 03:48:07 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of tyler@datastax.com designates 74.125.82.42 as permitted sender) Received: from [74.125.82.42] (HELO mail-ww0-f42.google.com) (74.125.82.42) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 25 Mar 2011 03:48:01 +0000 Received: by wwk4 with SMTP id 4so8013939wwk.1 for ; Thu, 24 Mar 2011 20:47:40 -0700 (PDT) MIME-Version: 1.0 Received: by 10.216.135.230 with SMTP id u80mr1374609wei.114.1301024860595; Thu, 24 Mar 2011 20:47:40 -0700 (PDT) Received: by 10.216.30.194 with HTTP; Thu, 24 Mar 2011 20:47:40 -0700 (PDT) X-Originating-IP: [70.124.90.200] In-Reply-To: References: Date: Thu, 24 Mar 2011 22:47:40 -0500 Message-ID: Subject: Re: error connecting to cassandra 0.7.3 From: Tyler Hobbs To: user@cassandra.apache.org Content-Type: multipart/alternative; boundary=0016e6dd9933a8e66b049f4674a2 X-Virus-Checked: Checked by ClamAV on apache.org --0016e6dd9933a8e66b049f4674a2 Content-Type: text/plain; charset=ISO-8859-1 I highly recommend using one of the existing Cassandra clientsinstead of writing your own. On Thu, Mar 24, 2011 at 10:17 AM, Anurag Gujral wrote: > Hi All, > I was able to resolve by making socket open. > Thanks > Anurag > > > On Thu, Mar 24, 2011 at 7:48 AM, Anurag Gujral wrote: > >> Hi All, >> I am using the following code as per suggestion by Ruslan >> tr = new TSocket(url, port,timeout); >> TTransport transport= new TFramedTransport(tr); >> TProtocol proto = new TBinaryProtocol(transport); >> >> client = new Cassandra.Client(proto); >> client.set_keyspace(this.keyspace); >> >> But I am getting the error >> >> at >> org.apache.thrift.transport.TIOStreamTransport.write(TIOStreamTransport.java:142) >> at >> org.apache.thrift.transport.TFramedTransport.flush(TFramedTransport.java:156) >> at >> org.apache.cassandra.thrift.Cassandra$Client.send_set_keyspace(Cassandra.java:414) >> at >> org.apache.cassandra.thrift.Cassandra$Client.set_keyspace(Cassandra.java:403) >> Please suggest why is this an error >> Thanks >> Anurag >> >> >> On Thu, Mar 24, 2011 at 7:15 AM, Anurag Gujral wrote: >> >>> Hi Ruslan >>> where is this framed transport defined. >>> I did TProtocol proto = new TFramedTransport(tr); >>> >>> I am getting >>> annot find symbol >>> [javac] symbol : class TFramedTransport >>> Please Suggest >>> Thanks >>> Anurag >>> >>> On Thu, Mar 24, 2011 at 2:13 AM, ruslan usifov wrote: >>> >>>> and where is transport creation for your thrift interface? Cassandra 0.7 >>>> uses Framed transport as default >>>> >>>> >>>> 2011/3/24 Anurag Gujral >>>> >>>>> >>>>> I am using the following code to create my client. >>>>> >>>>> tr = new TSocket(url, port); >>>>> TProtocol proto = new TBinaryProtocol(tr); >>>>> client = new Cassandra.Client(proto); >>>>> client.set_keyspace(this.keyspace); >>>>> >>>>> I am getting the errors I mentioned below >>>>> Thanks >>>>> Anurag >>>>> >>>>> >>>>> ---------- Forwarded message ---------- >>>>> From: Anurag Gujral >>>>> Date: Thu, Mar 24, 2011 at 1:26 AM >>>>> Subject: error connecting to cassandra 0.7.3 >>>>> To: user@cassandra.apache.org >>>>> >>>>> >>>>> I am using cassandra-0.7.3 and thrift-0.0.5,I wrote a java client using >>>>> thrift 0.0.5 when I try to connect to >>>>> local cassandra server I get the following error >>>>> ERROR com.bluekai.cassandra.validation.ValidationThread - Failed to >>>>> connect to 127.0.0.1. >>>>> org.apache.thrift.transport.TTransportException: Cannot write to null >>>>> outputStream >>>>> >>>>> >>>>> I am able to connect to the local cassandra server using cassandra-cli >>>>> though >>>>> >>>>> Any suggestions >>>>> Thanks >>>>> Anurag >>>>> >>>>> >>>> >>> >> > -- Tyler Hobbs Software Engineer, DataStax Maintainer of the pycassa Cassandra Python client library --0016e6dd9933a8e66b049f4674a2 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable I highly recommend using one of the existing Cassandra clients instead of writing your = own.

On Thu, Mar 24, 2011 at 10:17 AM, An= urag Gujral <anurag.gujral@gmail.com> wrote:
Hi All,
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 I= was able to resolve by making socket open.
Thanks
Anurag


On Thu, Mar= 24, 2011 at 7:48 AM, Anurag Gujral <anurag.gujral@gmail.com>= wrote:
Hi All,
=A0=A0=A0=A0= =A0 I am using the following code as per suggestion by Ruslan
=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0 tr =3D new TSocket(url, port,timeout);
=A0=A0=A0=A0=A0=A0=A0=A0 =A0 TTransport transport=3D new TFramedTransport(t= r);
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 TProtocol proto =3D new TBinaryPro= tocol(transport);

=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 client =3D new Cassandra.Client(proto);=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 client.set_keyspace(this.keyspace);
=
But I am getting the error

at org.apache.thrift.transport= .TIOStreamTransport.write(TIOStreamTransport.java:142)
=A0=A0=A0 at org.apache.thrift.transport.TFramedTransport.flush(TFramedTran= sport.java:156)
=A0=A0=A0 at org.apache.cassandra.thrift.Cassandra$Clien= t.send_set_keyspace(Cassandra.java:414)
=A0=A0=A0 at org.apache.cassandr= a.thrift.Cassandra$Client.set_keyspace(Cassandra.java:403)
Please suggest why is this an error
Thanks
An= urag


On Thu, = Mar 24, 2011 at 7:15 AM, Anurag Gujral <anurag.gujral@gmail.com&= gt; wrote:
Hi Ruslan
where is t= his framed transport defined.
I=A0 did TProtocol proto =3D new TFramedTr= ansport(tr);=A0=A0

I am getting
annot find symbol
=A0=A0=A0 [javac] symbol=A0 : clas= s TFramedTransport
Please Suggest
Thanks
Anurag

On Thu, Ma= r 24, 2011 at 2:13 AM, ruslan usifov <ruslan.usifov@gmail.com>= ; wrote:
and where is transport creation for your thrift interface? Cassandra 0.7 us= es Framed transport as default


2011/3/24 Anurag Gujral <anurag.gujral@gmail.com><= /span>

I am using the foll= owing code to create my client.

=A0tr =3D new TSocket(url, port); TProtocol proto =3D new TBinaryProtocol(tr);
=A0client =3D new Cassandra= .Client(proto);
=A0 client.set_keyspace(this.keyspace);

I am getting the errors I mentioned below
Thanks
Anurag


---------- Forwarded message ----------
From: Anurag Gujral <anurag.gujral@gmail.com>
Date: Thu, Mar 24, 2011 at 1:26 AM
Subject: error connecting to cassandr= a 0.7.3
To: user@cassandra.apache.org


I am using cassandra-0.7.3 and = thrift-0.0.5,I wrote a java client using thrift 0.0.5 when I try to connect= to
local cassandra server I get the following error
ERROR com.bluekai.cassa= ndra.validation.ValidationThread=A0 - Failed to connect to 127.0.0.1.
org.apache.thrift.transport.TTransportException: Cannot write to null outpu= tStream


I am able to connect to the local cassandra server using= cassandra-cli though

Any suggestions
Thanks
Anurag








--
Tyler Hobbs
Software Engineer, DataS= tax
Maintainer of the pycassa Cassandra Python client library
--0016e6dd9933a8e66b049f4674a2--