我试过在cassandra.yaml中设置这些:
rpc_address:192.168.1.xx listen_address:192.168.1.xx broadcast_address:192.168.1.xx
rpc_address:0.0.0.0 listen_address:192.168.1.xx broadcast_address:192.168.1.xx
在这两种情况下,我只能从localhost(127.0.0.1)
进行访问但是当我查看nodetool状态时 它显示了这个
[root @ localhost conf] #stodetool status
- 地址加载令牌拥有(有效)主机ID Rack UN 192.168.1.xx 1.23 MB 256 100.0%cedb8433-a3b3-4fb4-bee7-dae6174712ef rack1
如何正确设置外部访问?
答案 0 :(得分:0)
在cassandra.yaml中,将listen_address设置为节点的私有IP地址,将broadcast_address设置为节点的公共地址,将rpc_address设置为“0.0.0.0”
请查看How to configure cassandra for remote connection 和Can't connect to cassandra node from different host
希望这有帮助!
由于