kallaspriit / Cassandra-PHP-Client-Library

Cassandra PHP-based client library for managing and querying your Cassandra cluster
http://cassandra-php-client-library.com
103 stars 25 forks source link

Related to thrift_protocol.so? #12

Open ekaleido opened 12 years ago

ekaleido commented 12 years ago

Been getting this in my apache logs when trying to run some test work...

[Mon Dec 19 19:48:30 2011] [error] [client 170.40.160.26] PHP Fatal error: Uncaught exception 'cassandra_InvalidRequestException' in /var/www/test/thrift/packages/cassandra/Cassandra.php:1571\nStack trace:\n#0 /var/www/test/thrift/packages/cassandra/Cassandra.php(1571): thrift_protocol_read_binary(Object(TBinaryProtocolAccelerated), 'cassandra_Cassa...', false)\n#1 /var/www/test/thrift/packages/cassandra/Cassandra.php(1547): cassandra_CassandraClient->recv_system_add_keyspace()\n#2 [internal function]: cassandra_CassandraClient->system_add_keyspace(Object(cassandra_KsDef))\n#3 /var/www/test/Cassandra.php(968): call_user_func_array(Array, Array)\n#4 /var/www/test/Cassandra.php(1253): Cassandra->call('system_add_keys...', Object(cassandra_KsDef))\n#5 /var/www/test/casstest.php(31): Cassandra->createKeyspace('CassandraTest')\n#6 {main}\n\nNext exception 'CassandraMaxRetriesException' with message 'Failed calling "system_add_keyspace" the maximum of 5 times' in /var/www/test/Cassandra.php:976\nStack trace:\n#0 /var/www/test/Cassandra.php(1253): Cassandra->call('system_add_keys...', Object(cassandra in /var/www/test/Cassandra.php on line 976, referer: http://www/test/test.html

kallaspriit commented 12 years ago

This error usually means that you're trying to make and invalid query. What version are you using and what's the keyspace definition you're trying to create?

gykhauth commented 12 years ago

I've received the same error when I tried to run the Example php. It throws an exception at here:

$cassandra->createKeyspace('CassandraExample');

saying: Failed calling "system_add_keyspace" the maximum of 5 times

I'm using Cassandra 1.1.1 on Windows 7 localhost (for testing purpose) with Apache 2.2.2 and PHP 5.3.14. Do I need to change anything in Cassandra in order to run the Example php?