phpcassa
phpcassa copied to clipboard
TTransportException: TSocket read 0 bytes
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));
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.
Hi,
unfortunately for this issue , I use cassandra 1.2.