连接到Cassandra的节点在EC2上的Ruby on Rails的一个datastax集群节点、集群、连接到、datastax

由网友(歐美范|▍耀眼的青春)分享简介:我创建了2卡桑德拉节点,2个搜索节点和2分析节点的datastax卡桑德拉企业集群。 I created a datastax cassandra Enterprise cluster with 2 cassandra nodes, 2 search nodes and 2 Analytics nodes. 一切似...

我创建了2卡桑德拉节点,2个搜索节点和2分析节点的datastax卡桑德拉企业集群。

I created a datastax cassandra Enterprise cluster with 2 cassandra nodes, 2 search nodes and 2 Analytics nodes.

一切似乎都正常除了工作,我无法从外部连接到它。如果我NODE0服务器上我可以运行卡桑德拉,CLI,并连接到Cassandra的节点上的端口9160,但是当我试图用的 datastax护栏的宝石,我得到没有Live服务器我也试过datastax devCenter它试图连接到本机端口9042,但也没有工作。我真的很纳闷,任何帮助是AP preciated。

Everything seems to work correctly EXCEPT, I can't connect to it from outside. If I'm on node0 server I can run the cassandra-cli and connect to the cassandra nodes on port 9160 but when I tried to connect using datastax-rails gem, I get "No live servers" I also tried datastax devCenter which tries to connect to the native port 9042 but also didn't work. I'm really puzzled, any help is appreciated.

所以,一些挖后,我发现了一些问题。

So after some digging I found some issues

   1. Port 9160 is connected and I can connect to it from telnet node0_ip 9160
   2. when I run rake ds:migrate, I get No live servers in node0_ip 
   3. I tried to connect to 'cassandra' gem instead from IRB and tried 
      a. client = Cassandra.new('example', 'node0_ip:9160')
      b. client.insert(:users, "5", {'screen_name' => "buttonscat4"})

     I got a similar error with ThriftClient::NoServersAvailable: No live servers but this time with all the IPs of all the nodes in the cluster

  4. I tried adding "client.disable_node_auto_discovery!" and I was able to connect and add stuff using 'cassandra' Gem. 

  5. I also found on https://github.com/cassandra-rb/cassandra/issues/171 that I need to  change your server to bind on a non-loopback address but have no idea what does that mean

现在的问题是如何

The question now is how

推荐答案

听起来像是你需要打开你的EC2安全组外端口9160.具体的安全组,你的 NODE0 正在使用。

Sounds like you need to open up your EC2 security group to the outside on port 9160. Specifically the security group that your node0 is using.

您可以在这里找到更多关于他们的信息:

You can find more information about them here:

的http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-network-security.html

阅读全文

相关推荐

最新文章