配置 cassandra 3.11.2 以接受 ec2 上的远程连接

Configure cassandra 3.11.2 to accept remote connection on ec2

大家好,我尝试了很多发布在不同站点和 Whosebug 上的解决方案,但是 none 对我有用。 我已经对以下 cassandra.yaml 参数进行了实验-

  1. rpc_address
  2. rpc_broadcast_address
  3. listen_address

大多数解决方案都已过时,非常感谢很少的帮助

如聊天中所述,在 cassandra.yaml 中为 listen_address 添加私有 IP 地址时出现错字。由于这个错误,Cassandra 从未启动,因此以下命令没有输出。

nodetool status
  - Failed to connect to '127.0.0.1:7199' - ConnectException: 'Connection refused (Connection refused)

netstat -an | grep 9042 
  - returns nothing

一如既往,首先看错误的地方是cassandra系统日志。并且清楚的指出了下面的问题。

ERROR [main] 2018-05-08 02:01:26,541 CassandraDaemon.java:708 - Exception encountered during startup: Invalid yaml: file:/etc/cassandra/cassan$ 
Error: while scanning a simple key; could not found expected ':'; in 'reader', line 678, column 1: 
# Set rpc_address OR rpc_interfa ...

修复cassandra.yaml文件中的“:”错误后,Cassandra顺利上线。