我創建了包含2個cassandra節點,2個搜索節點和2個Analytics節點的datastax cassandra Enterprise羣集。連接到EC2上的datastax羣集上的cassandra節點Ruby on Rails
一切似乎正常工作除了,我無法從外部連接到它。如果我在node0服務器上,我可以運行cassandra-cli並連接到端口9160上的cassandra節點,但是當我嘗試使用datastax-rails gem連接時,我得到「沒有活動服務器」我也試過了嘗試連接到的datastax devCenter本地端口9042,但也沒有工作。我真的很困惑,任何幫助表示讚賞。
所以一些挖後,我發現了一些問題
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
現在的問題是
因此,我打開該端口,我似乎從telnet連接到它,但當我運行耙ds:創建我仍然得到錯誤「沒有活服務器」我還應該包括我的datastax.yml文件設置開發: 服務器:[ 「xx.xx.xx.xxx:9160」] 密鑰空間: 「my_dse_ks」 strategy_class: 「org.apache.cassandra.locator.SimpleStrategy」 strategy_options:{ 「replication_factor」: 「2」} connection_options: 超時:10個 重試次數:2個 server_max_requests:1000 Solr的: 端口:8983 路徑:/ Solr的 –
你能實際上包括在你的問題的文件嗎? – Rico
我用更多的信息更新了這個問題 –