DataStax Devcenter无法连接到远程cassandra数据库 [英] DataStax Devcenter fails to connect to the remote cassandra database

查看:1122
本文介绍了DataStax Devcenter无法连接到远程cassandra数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

操作系统:CentOS 6.4(服务器)

OS: CentOS 6.4 (server)

我已经在我的服务器上成功安装了(yum install dsc20)cassandra数据库层,并且可以使用CQL SHel (cqlsh)。但我需要使用DataStax的DevCenter软件远程运行查询。所以我在一个单独的工作站中安装它(DevCenter)。 (CentOS 6.4 - 桌面),并尝试添加一个新连接,以连接到cassandra db。

I have successfully installed (yum install dsc20) the cassandra database layer in my server and can connect to it using the CQL SHel (cqlsh). But I need to run queries remotely using the DataStax's DevCenter software. So I installed it (DevCenter) in a separate workstation. (CentOS 6.4 - desktop) and tried to add a new connection in order to connect to the cassandra db.

所以我给了CentOS 6.4 - (其中cassandra数据库正在运行)为主机和端口为9160.但是当测试连接它失败。

So I gave the IP of the "CentOS 6.4 - server" (in which cassandra database is running) for the host and the port as 9160. But when testing the connection it fails.

我也试图关闭防火墙在服务器,(/etc/init.d/iptables停止)。但是没有运气。

I also tried to turn off the firewall in the server, (/etc/init.d/iptables stop). But was no luck.

我相信这可能是由于一些配置错误,我不能弄清楚。我会感激的,如果有人可以给我一个解决方案,因为我正在研究这个,没有找到任何答案。非常感谢您提前。

I'm sure this may be due to some misconfiguration which I cannot figure out. I'll be grateful, if someone can give me a solution for this as I was researching for this and found no answers. Thank you very much in advance.

推荐答案

DataStax DevCenter建立在DataStax Java驱动程序之上,具有相同的连接要求作为驱动程序。即:

DataStax DevCenter being built on top of the DataStax Java driver has the same connectivity requirements as the driver. Namely:


  1. start_native_transport:true

  2. rpc_address :从客户端可以访问的IP或主机名

  3. 集群中的计算机接受端口 / code>( native_transport_port 配置选项)

  1. start_native_transport: true
  2. rpc_address: IP or hostname reachable from the client
  3. Machines in the cluster accept connections on port 9042 (the native_transport_port config option)



rpc_address 设置为专用IP或 0.0.0.0 ,DevCenter将不知道要连接到哪个节点。

If rpc_address is set to either a private IP or to 0.0.0.0, DevCenter will not know what node to connect to.

如果您的集群有多个节点,并且这些节点使用 rpc_address:0.0.0.0 ,即使您配置DevCenter

If your cluster has multiple nodes and these are using rpc_address: 0.0.0.0, even if you configure DevCenter with the IP(s) of a couple of nodes, it will still have issues discovering the other nodes in the cluster.

cassandra.yaml 有评论/警告关于使用 rpc_address:0.0.0.0


请注意,如果你想在所有接口上监听,则允许指定0.0.0.0
,但这会破坏依赖于节点自动发现的客户端

Note that unlike ListenAddress above, it is allowed to specify 0.0.0.0 here if you want to listen on all interfaces, but that will break clients that rely on node auto-discovery.

:可能在将来DevCenter可能能够忽略/过滤掉配置了 rpc_address的集群中的节点: 0.0.0.0

Note: it is possible that in the future DevCenter might be able to ignore/filter out nodes in the cluster configured with rpc_address: 0.0.0.0.

这篇关于DataStax Devcenter无法连接到远程cassandra数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆