我已经安装了 cassandra 和 apache Thrift。我创建了一个 PHP 测试页面来测试它。当我运行它时返回以下错误。
致命错误:在第 15 行的 /home/dev001/projects/Thrift/gen-php/cassandraTest.php 中找不到类“CassandraClient”
当我通过 cassandra-cli 检查 cassandra 时,它显示以下错误。
power@power-desktop:/home/dev001$ cassandra-cli
org.apache.thrift.transport.TTransportException: java.net.ConnectException: Connection refused
at org.apache.thrift.transport.TSocket.open(TSocket.java:183)
at org.apache.thrift.transport.TFramedTransport.open(TFramedTransport.java:81)
at org.apache.cassandra.cli.CliMain.connect(CliMain.java:79)
at org.apache.cassandra.cli.CliMain.main(CliMain.java:255)
Caused by: java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:391)
at java.net.Socket.connect(Socket.java:579)
at org.apache.thrift.transport.TSocket.open(TSocket.java:178)
... 3 more
Exception connecting to 127.0.0.1/9160. Reason: Connection refused.
Welcome to Cassandra CLI version 1.1.0~rc1
Type 'help;' or '?' for help.
Type 'quit;' or 'exit;' to quit.
[default@unknown]
请告诉我为什么会这样?