Return-Path: Delivered-To: apmail-cassandra-user-archive@www.apache.org Received: (qmail 74243 invoked from network); 28 Jul 2010 07:44:17 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 28 Jul 2010 07:44:17 -0000 Received: (qmail 64506 invoked by uid 500); 28 Jul 2010 07:44:15 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 64374 invoked by uid 500); 28 Jul 2010 07:44:12 -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 64357 invoked by uid 99); 28 Jul 2010 07:44:11 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 28 Jul 2010 07:44:11 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of jt4websites@googlemail.com designates 209.85.216.178 as permitted sender) Received: from [209.85.216.178] (HELO mail-qy0-f178.google.com) (209.85.216.178) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 28 Jul 2010 07:43:59 +0000 Received: by qyk34 with SMTP id 34so2954809qyk.9 for ; Wed, 28 Jul 2010 00:43:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type; bh=6gfrqlhb8CG5JdKNaknT5gyNB47JhvfNKbhXGChyKkA=; b=PLguO1ozC0MMAOeQ9i/ZqQM1tvqNWfHewcBygOwsC+5c5QwWxEa88w9DaTYHWfU7mL ZKQzEqH1N0/MazNKLfVeiMtRiHYtup/n7iMZ7lJx1/8s8YnPkKiuRnKkkc6g671m8Jmk fwnnlAUZbLmNBatzg3Dix30fZwjsvFuAdQPwI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=ID9iC1akE4TIYsCxwKfLCW09FeMinoi9EeIqCo/XI3rbVZKtXOXgsw7so20ERnH7d5 BXQHdw9sMIwJCIPQSk1vqq7pUMzZt4fr/E89ibWKsAvZGjfQR2Zt48hVW7BkeADCW1Qr bMPn38DGOPfCHQJN9coe4o9UfO2XapoEpa4cg= MIME-Version: 1.0 Received: by 10.224.11.146 with SMTP id t18mr8364369qat.120.1280303018124; Wed, 28 Jul 2010 00:43:38 -0700 (PDT) Received: by 10.220.180.65 with HTTP; Wed, 28 Jul 2010 00:43:37 -0700 (PDT) In-Reply-To: References: Date: Wed, 28 Jul 2010 08:43:37 +0100 Message-ID: Subject: Re: Upgrading to Cassanda 0.7 Thrift Erlang From: J T To: user@cassandra.apache.org Content-Type: multipart/alternative; boundary=0015175cd11c99ab35048c6dc626 X-Virus-Checked: Checked by ClamAV on apache.org --0015175cd11c99ab35048c6dc626 Content-Type: text/plain; charset=ISO-8859-1 Hi, That fixed the problem! I added the Framed option and like magic things have started working again. Example: thrift_client:start_link("localhost", 9160, cassandra_thrift, [ { framed, true } ] ) JT. On Tue, Jul 27, 2010 at 10:04 PM, Jonathan Ellis wrote: > trunk is using framed thrift connections by default now (was unframed) > > On Tue, Jul 27, 2010 at 11:33 AM, J T wrote: > > Hi, > > I just tried upgrading a perfectly working Cassandra 0.6.3 to Cassandra > 0.7 > > and am finding that even after re-generating the erlang thrift bindings > that > > I am unable to perform any operation. > > I can get a connection but if I try to login or set the keyspace I get a > > report from the erlang bindings to say that the connection is closed. > > I then tried upgrading to a later version of thrift but still get the > same > > error. > > e.g. > > (zotonic3989@127.0.0.1)1> thrift_client:start_link("localhost", 9160, > > cassandra_thrift). > > {ok,<0.327.0>} > > (zotonic3989@127.0.0.1)2> {ok,C}=thrift_client:start_link("localhost", > 9160, > > cassandra_thrift). > > {ok,<0.358.0>} > > (zotonic3989@127.0.0.1)3> thrift_client:call( C, set_keyspace, [ > <<"Test">> > > ]). > > =ERROR REPORT==== 27-Jul-2010::03:48:08 === > > ** Generic server <0.358.0> terminating > > ** Last message in was {call,set_keyspace,[<<"Test">>]} > > ** When Server state == {state,cassandra_thrift, > > {protocol,thrift_binary_protocol, > > {binary_protocol, > > > {transport,thrift_buffered_transport,<0.359.0>}, > > true,true}}, > > 0} > > ** Reason for termination == > > ** {{case_clause,{error,closed}}, > > [{thrift_client,read_result,3}, > > {thrift_client,catch_function_exceptions,2}, > > {thrift_client,handle_call,3}, > > {gen_server,handle_msg,5}, > > {proc_lib,init_p_do_apply,3}]} > > ** exception exit: {case_clause,{error,closed}} > > in function thrift_client:read_result/3 > > in call from thrift_client:catch_function_exceptions/2 > > in call from thrift_client:handle_call/3 > > in call from gen_server:handle_msg/5 > > in call from proc_lib:init_p_do_apply/3 > > The cassandra log seems to indicate that a connection has been made > > (although thats only apparent by a TRACE log message saying that a logout > > has been done). > > The cassandra-cli program is able to connect and function normally so I > can > > only assume that there is a problem with the erlang bindings. > > Has anyone else had any success using 0.7 from Erlang ? > > JT. > > > > -- > Jonathan Ellis > Project Chair, Apache Cassandra > co-founder of Riptano, the source for professional Cassandra support > http://riptano.com > --0015175cd11c99ab35048c6dc626 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi,

That fixed the problem!

I a= dded the Framed option and like magic things have started working again.

Example:

thrift_client:start_link("localhost", 9160, cassandra_thrift= , [ { framed, true } ] )

JT.

<= /div>

On Tue, Jul 27, 2010 at 10:04 PM, = Jonathan Ellis <j= bellis@gmail.com> wrote:
trunk is using framed thrift connections by= default now (was unframed)

On Tue, Jul 27, 2010 at 11:33 AM, J T <jt4websites@googlemail.com> wrote:
> Hi,
> I just tried upgrading a perfectly working Cassandra 0.6.3 to Cassandr= a 0.7
> and am finding that even after re-generating the erlang thrift binding= s that
> I am unable to perform any operation.
> I can get a connection but if I try to login or set the keyspace I get= a
> report from the erlang bindings to say that the connection is closed.<= br> > I then tried upgrading to a later version of thrift but still get the = same
> error.
> e.g.
> (zotonic3989@127.0.0.1)1&= gt; thrift_client:start_link("localhost", 9160,
> cassandra_thrift).
> {ok,<0.327.0>}
> (zotonic3989@127.0.0.1)2&= gt; {ok,C}=3Dthrift_client:start_link("localhost", 9160,
> cassandra_thrift).
> {ok,<0.358.0>}
> (zotonic3989@127.0.0.1)3&= gt; thrift_client:call( C, set_keyspace, [ <<"Test">>=
> =A0]).
> =3DERROR REPORT=3D=3D=3D=3D 27-Jul-2010::03:48:08 =3D=3D=3D
> ** Generic server <0.358.0> terminating
> ** Last message in was {call,set_keyspace,[<<"Test">= ;>]}
> ** When Server state =3D=3D {state,cassandra_thrift,
> =A0=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 {protocol,thrift_bi= nary_protocol,
> =A0=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0{binary_protocol= ,
> =A0=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 {transport,thri= ft_buffered_transport,<0.359.0>},
> =A0=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 true,true}}, > =A0=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 0}
> ** Reason for termination =3D=3D
> ** {{case_clause,{error,closed}},
> =A0=A0 =A0[{thrift_client,read_result,3},
> =A0=A0 =A0 {thrift_client,catch_function_exceptions,2},
> =A0=A0 =A0 {thrift_client,handle_call,3},
> =A0=A0 =A0 {gen_server,handle_msg,5},
> =A0=A0 =A0 {proc_lib,init_p_do_apply,3}]}
> ** exception exit: {case_clause,{error,closed}}
> =A0=A0 =A0 in function =A0thrift_client:read_result/3
> =A0=A0 =A0 in call from thrift_client:catch_function_exceptions/2
> =A0=A0 =A0 in call from thrift_client:handle_call/3
> =A0=A0 =A0 in call from gen_server:handle_msg/5
> =A0=A0 =A0 in call from proc_lib:init_p_do_apply/3
> The cassandra log seems to indicate that a connection has been made > (although thats only apparent by a TRACE log message saying that a log= out
> has been done).
> The cassandra-cli program is able to connect and function normally so = I can
> only assume that there is a problem with the erlang bindings.
> Has anyone else had any success using 0.7 from Erlang ?
> JT.



--
Jonathan Ellis
Project Chair, Apache Cassandra
co-founder of Riptano, the source for professional Cassandra support
http://riptano.com

--0015175cd11c99ab35048c6dc626--