phpcassa icon indicating copy to clipboard operation
phpcassa copied to clipboard

TTransportException: TSocket read 0 bytes

Open micrub opened this issue 12 years ago • 2 comments

While using TBufferedTransport instead of default TFramedTransport like in following example :

$framed = false;
$pool = new ConnectionPool($keyspace,$servers,null,5,5000,5000,10000,null,$framed);
$cf = new ColumnFamily($pool,'User');
$result = $cf->get('1056');
[Thu Jan 31 14:42:09 2013] [error] [client 127.0.0.1] Error connecting to 10.0.0.221: TTransportException: TSocket read 0 bytes

P.S. Also I get same behavior achieved while changing from :

$this->client = new CassandraClient(new \TBinaryProtocolAccelerated($transport));

to

$this->client = new CassandraClient(new \TBinaryProtocol($transport));

micrub avatar Jan 31 '13 12:01 micrub

Did you also make Cassandra use TBufferedTransport through cassandra.yaml? I should note that usage of TBufferedTransport with Cassandra has been deprecated since 0.7 and was dropped in 1.2 entirely, so if you can't get this to work, I'm inclined to remove the $framed option entirely.

thobbs avatar Jan 31 '13 20:01 thobbs

Hi,

unfortunately for this issue , I use cassandra 1.2.

cast-networks avatar Feb 12 '13 15:02 cast-networks