Java Cassandra Cli拒绝连接

Java Cassandra Cli拒绝连接,java,connection,cassandra,cassandra-0.7,Java,Connection,Cassandra,Cassandra 0.7,我正在试着联系卡桑德拉。我安装了最新的稳定版本apache-cassandra-1.2.4,并将其解压缩到我的桌面上。当我运行cassandra时,它很好地设置了thrift客户端并显示以下内容: sudo cassandra-f 日志: INFO 15:30:34,646 Cassandra version: 1.0.12 INFO 15:30:34,646 Thrift API version: 19.20.0 INFO 15:30:34,646 Loading persisted r

我正在试着联系卡桑德拉。我安装了最新的稳定版本apache-cassandra-1.2.4,并将其解压缩到我的桌面上。当我运行cassandra时,它很好地设置了thrift客户端并显示以下内容:

sudo cassandra-f

日志:

 INFO 15:30:34,646 Cassandra version: 1.0.12
 INFO 15:30:34,646 Thrift API version: 19.20.0
 INFO 15:30:34,646 Loading persisted ring state
 INFO 15:30:34,650 Starting up server gossip
 INFO 15:30:34,661 Enqueuing flush of Memtable-LocationInfo@1117603949(29/36 serialized/live bytes, 1 ops)
 INFO 15:30:34,661 Writing Memtable-LocationInfo@1117603949(29/36 serialized/live bytes, 1 ops)
 INFO 15:30:34,877 Completed flushing /var/lib/cassandra/data/system/LocationInfo-hd-54-Data.db (80 bytes)
 INFO 15:30:34,892 Starting Messaging Service on port 7000
 INFO 15:30:34,901 Using saved token 143186062733850112297005303551620336860
 INFO 15:30:34,903 Enqueuing flush of Memtable-LocationInfo@1282534304(53/66 serialized/live bytes, 2 ops)
 INFO 15:30:34,904 Writing Memtable-LocationInfo@1282534304(53/66 serialized/live bytes, 2 ops)
 INFO 15:30:35,102 Completed flushing /var/lib/cassandra/data/system/LocationInfo-hd-55-Data.db (163 bytes)
 INFO 15:30:35,106 Node localhost/127.0.0.1 state jump to normal
 INFO 15:30:35,107 Bootstrap/Replace/Move completed! Now serving reads.
 INFO 15:30:35,108 Will not load MX4J, mx4j-tools.jar is not in the classpath
 INFO 15:30:35,150 Binding thrift service to localhost/127.0.0.1:9160
 INFO 15:30:35,155 Using TFastFramedTransport with a max frame size of 15728640 bytes.
 INFO 15:30:35,160 Using synchronous/threadpool thrift server on localhost/127.0.0.1 : 9160
 INFO 15:30:35,168 Listening for thrift clients...
现在,当我运行cassandracli-hlocalhost-p9160时,它抛出了错误。我已经检查了端口是否空闲,卡桑德拉正在端口监听:

**


**卡桑德拉压力的记录似乎很粗略。也许在适当的时候这会被纠正。到现在为止,这个命令对我有效

./cassandra-stress write -node <IP_OF_NODE1>
/cassandra应力写入-节点

一旦成功,我们可以尝试输入其他可选参数来调整命令。

我也有同样的错误。现在,一切正常

主要问题是配置错误

我的配置如下:

我的可视机器ip是192.168.11.11。我的卡桑德拉被安装到机器中。因此,我配置了塔尔

listen_address: 192.168.11.11
rpc_address: 0.0.0.0
broadcast_rpc_address: 192.168.11.11

没关系。

选项1:

Run jps command under root user and kill CassandraDaemon if you will see it. After this you will start Cassandra again.
An intermediate firewall is blocking the JVM from making the connection. 
An operating system firewall, or antivirus that is causing the problems as well.
选项2:

Try to connect Cassandra with CQL 
  ./cqlsh 10.234.31.232 9042
最终检查:

Run jps command under root user and kill CassandraDaemon if you will see it. After this you will start Cassandra again.
An intermediate firewall is blocking the JVM from making the connection. 
An operating system firewall, or antivirus that is causing the problems as well.

我认为您安装在windows中,看起来防火墙正在阻止您的连接。

您的日志显示“Cassandra版本:1.0.12”。您是否已从以前的版本升级?你确定是卡桑德拉开始的吗?它是否显示在ps和netstat输出中?cassandra.log中是否有任何内容(与您发布的system.log输出相反)?请尝试使用
cassandra cli-h 127.0.0.1-p 9160而不是localhost。根据您的主机文件,这应该意味着相同的事情,但可能是一个很好的故障排除步骤。解决了问题-Cassandra服务未在上运行,因此导致Cassandra cli关闭。谢谢OP的问题是关于遗留的cassandra cli,而不是cassandra stress。