PHP Cassandra和CodeIgniter错误无法建立连接,因为目标计算机主动拒绝它。 [10061]

时间:2015-09-14 13:22:46

标签: php cassandra

有人知道PHP CodeIgniter和cassandra吗?我从PHPCassa下载了phpcass。

错误

  

致命错误:未捕获的异常' NoServerAvailable'使用消息'尝试连接到每个服务器两次,但所有尝试都失败了。最后一个错误是:异常' TException'消息' TSocket:无法连接到192.168.0.1:9160(无法建立连接,因为目标计算机主动拒绝它。[10061])'在C:\ xampp \ htdocs \ CSIgniter \ application \ libraries \ phpcassa \ thrift \ transport \ TSocket.php:229堆栈跟踪:#0 C:\ xampp \ htdocs \ CSIgniter \ application \ libraries \ phpcassa \ thrift \ transport \ TFramedTransport .php(83):TSocket-> open()#1 C:\ xampp \ htdocs \ CSIgniter \ application \ libraries \ phpcassa \ connection.php(71):TFramedTransport-> open()#2 C:\ xampp \ htdocs \ CSIgniter \ application \ libraries \ phpcassa \ connection.php(220):ConnectionWrapper-> __ construct(' fifthdi',' 192.168.0.1:916 ...', NULL,true,5000,5000)#3 C:\ xampp \ htdocs \ CSIgniter \ application \ libraries \ phpcassa \ connection.php(256):ConnectionPool-> make_conn()#4 C:\ xampp \ htdocs \ CSIgniter \ application \ libraries \ phpcassa \ connection.php(350):第231行的C:\ xampp \ htdocs \ CSIgniter \ application \ libraries \ phpcassa \ connection.php中的连接

这是cassandra.php代码

$servers[] = '192.168.0.1:9160';//If omitted, the port defaults to 9160.
//$servers[] = '127.0.0.2:9160';
//$servers[] = '127.0.0.3:9160';
$config['cassandra_servers'] = $servers;
$config['keyspace'] = "fifthdi";
$config['default_cf'] = "Standard1";
//set of column families your application uses and you want to have initialied and cached
$config['init_cf'] = array("Standard1"); //set of configs to initalize by default
$config['max_retries'] = 5;
$config['send_timeout'] = 5000;
$config['recv_timeout'] = 5000;
$config['recycle'] = 10000;
//if needed then array("username"=>user1,"password"=>pass); replaces NULL
$config['credentials'] = NULL;
$config['framed_transport'] = true;

0 个答案:

没有答案