无法运行cqlsh;超时创建连接

时间:2014-10-24 21:35:52

标签: cassandra datastax

我无法运行cqlsh:

$ cqlsh  10.230.34.16 9160
Connection error: ('Unable to connect to any servers', {'10.230.34.16': OperationTimedOut('errors=Timed out creating connection, last_host=None',)})

rpc服务正在监听9160,但是cqlsh仍然无法连接到它?

$ netstat -an |grep 9160| grep LISTEN
tcp        0      0 10.230.34.16:9160     0.0.0.0:*               LISTEN     

我能检查的任何想法?

使用datastax cassandra 2.1.0

2 个答案:

答案 0 :(得分:1)

  1. 使用rpc_port检查行上的cassandra.yaml文件:通常默认= 9160
  2. 登录托管cassandra的机器
  3. 尝试cqlsh 127.0.0.1 9160:无论如何都应该没问题
  4. 尝试cqlsh [主机IP] 9160:如果确定,那么cassandra可以从lan访问,如果ko然后cassandra无法从lan访问,只有localhost 127.0.0.1

答案 1 :(得分:1)

有点旧,但万一有人遇到这个问题。

基于此QNA,似乎驱动程序和协议已发生变化。 试试

  

cqlsh 127.0.0.1 9042

它为我解决了这个问题。