如何使用cqlsh连接Cassandra到localhost

如何使用cqlsh连接Cassandra到localhost

本文介绍了如何使用cqlsh连接Cassandra到localhost?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将rpc_port设置为公共IP地址,现在我可以从外部服务器连接到Cassandra。

I set rpc_port to the public IP address, and now I can connect to Cassandra just fine from an outside server.

但是,我无法从Cassandra服务器本身,使用cqlsh

However, I cannot connect from the Cassandra server itself, using cqlsh

我得到一个错误.Thar是:

I am getting an error.Thar are:

 Connection error: Could not connect to localhost:9160

能够从服务器本身连接?

Is there a configuration, I can change to be able to connect from the server itself ?

推荐答案


  1. 检查cassandra.yaml文件

  2. 尝试cqlsh 127.0.0.1 9160:在任何情况下都应该确定
  3. / li>
  4. 尝试cqlsh [主机的IP] 9160:如果确定然后cassandra可从lan,如果ko然后cassandra不能从lan到达只有localhost 127.0.0.1

  1. check the cassandra.yaml file on the line with rpc_port : normally by default = 9160
  2. login to the machine hosting cassandra
  3. try cqlsh 127.0.0.1 9160 : should be ok in any case
  4. try cqlsh [IP of host] 9160 : if ok then cassandra reachable from lan, if ko then cassandra is not reachable from lan but only localhost 127.0.0.1

这篇关于如何使用cqlsh连接Cassandra到localhost?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-23 02:27