Slightly off topic but still related (java instead of erlang).  I just tried using the latest trunk build available on Hudson (2010-07-31_12-31-29) and I'm getting lock ups.

The same code (without the framed transport) was working with a build form 2010-07-07_13-32-16

I'm connecting using the following:
TSocket socket = new TSocket(node, port);
transport = new TFramedTransport(socket);
protocol = new TBinaryProtocol(transport);
client = new Cassandra.Client(protocol);;

// set the keyspace on the client and do get slice stuff

The locked up thread looks like:
"main" prio=5 tid=101801000 nid=0x100501000 runnable [1004fe000]
   java.lang.Thread.State: RUNNABLE
at Method)
- locked <1093daa10> (a
at org.apache.thrift.transport.TTransport.readAll(
at org.apache.thrift.transport.TFramedTransport.readFrame(
at org.apache.thrift.transport.TTransport.readAll(
at org.apache.thrift.protocol.TBinaryProtocol.readAll(
at org.apache.thrift.protocol.TBinaryProtocol.readI32(
at org.apache.thrift.protocol.TBinaryProtocol.readMessageBegin(
at org.apache.cassandra.thrift.Cassandra$Client.recv_get_slice(
at org.apache.cassandra.thrift.Cassandra$Client.get_slice(

On 28 July 2010 17:43, J T <> wrote:

That fixed the problem!

I added the Framed option and like magic things have started working again.


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


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@> thrift_client:start_link("localhost", 9160,
> cassandra_thrift).
> {ok,<0.327.0>}
> (zotonic3989@> {ok,C}=thrift_client:start_link("localhost", 9160,
> cassandra_thrift).
> {ok,<0.358.0>}
> (zotonic3989@> 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