【发布时间】:2014-06-14 15:35:13
【问题描述】:
我在 Ubuntu 上创建了 1 个节点 Cassandra 集群(datastax 企业),我可以通过 cqlsh 连接到该集群,但是当我尝试通过 OpsCenter 或通过 c# 驱动程序从 VS2012 连接时,我收到类似“无法连接到集群”的错误" 或 "所有尝试查询的主机都出错",谁能帮我解决这个错误?
编辑:
我按照“datastax.com/documentation/datastax_enterprise/4.0/…”中给出的说明安装了 datastax Enterprise,并且在 yaml 文件中除了集群名称外,所有键的默认值都具有。当我运行 cqlsh 时,它连接到此消息:
Connected to fptestcluster at localhost:9160.
[cqlsh 4.1.1 | Cassandra 2.0.6.28 | CQL spec 3.1.1 | Thrift protocol 19.39.0]
但如原始问题中所述,使用 OpsCenter 和 C# 驱动程序我无法连接。
【问题讨论】:
-
你能描述得更详细一点吗?可能描述了您如何配置集群?
-
我按照“datastax.com/documentation/datastax_enterprise/4.0/…”中给出的说明安装了datastax Enterprise,并在yaml文件中设置了除集群名称外的所有键的默认值。当我运行 cqlsh 时,它会显示以下消息“连接到 fptestcluster at localhost:9160。[cqlsh 4.1.1 | Cassandra 2.0.6.28 | CQL 规范 3.1.1 | Thrift 协议 19.39.0]”,但正如 OpsCenter 的原始问题中所指定和 C# 驱动程序我无法连接。
-
使用 opscenter 和驱动的端口与使用 cqlsh(thrift 接口)的端口不同。例如,您可以检查本机接口的端口,即使用驱动程序的端口 (9042) 是否可访问。
-
在您的
cassandra.yaml中,您的listen_address设置为什么?
标签: cassandra