cassandra - phpcassa fail connect to server -
cassandra - phpcassa fail connect to server -
i install cassandra on ubuntu, set in conf file
listen_address: 200.166.107.170
rpc_address: 213.186.117.170
rpc_port: 9160
then seek run php code other machine
cassandraconn::add_node('200.166.107.170', 9160);
$users = new cassandracf('keyspace1', 'users');
$users->insert('1', array('email' => 'hoan.tonthat@gmail.com', 'password' => 'test'));
and result have this
fatal error: uncaught exception 'exception' message 'could not connect cassandra server' in c:\inetpub\wwwroot\phpcassa.php:85 stack trace: #0 c:\inetpub\wwwroot\phpcassa.php(283): cassandraconn::get_client() #1 c:\inetpub\wwwroot\cassandra_test.php(31): cassandracf->insert('1', array) #2 {main} thrown in c:\inetpub\wwwroot\phpcassa.php on line 85
what can cause of error? thanks
ensure using version of phpcassa distributed thobbs:
https://github.com/thobbs/phpcassa tutorial on how started: http://thobbs.github.com/phpcassa/tutorial.htmlfrom tutorial:
$servers = array("192.168.2.1:9160"); $pool = new connectionpool("keyspace1", $servers); $column_family = new columnfamily($pool, 'columnfamily1');
failing this, version of apache cassandra using?
** update **
turns out trying connect cassandra on listen_address , not rpc_address. 213.186.117.170:9160 1 should connect on , not other used cassandra - cassandra communication.
cassandra phpcassa
Comments
Post a Comment