Amazon ec2 无法连接到EC2上的cassandra服务器?
我已经设置了一个新的EC2实例来在EC2上运行cassandra,已经经历了一系列似乎没有帮助的问题。我正在运行apache-cassandra-2.1.0-rc3 我在EC2实例上打开了端口91609042,说它的IP地址是1.2.3.4 因为这是单节点系统,所以我没有像中所指出的那样打开其他端口 当我尝试使用带有集群配置的python驱动程序连接到此主机时,如下所示:Amazon ec2 无法连接到EC2上的cassandra服务器?,amazon-ec2,cassandra,cassandra-2.0,Amazon Ec2,Cassandra,Cassandra 2.0,我已经设置了一个新的EC2实例来在EC2上运行cassandra,已经经历了一系列似乎没有帮助的问题。我正在运行apache-cassandra-2.1.0-rc3 我在EC2实例上打开了端口91609042,说它的IP地址是1.2.3.4 因为这是单节点系统,所以我没有像中所指出的那样打开其他端口 当我尝试使用带有集群配置的python驱动程序连接到此主机时,如下所示: cluster = Cluster(contact_points=['1.2.3.4',], port=9160) 我得
cluster = Cluster(contact_points=['1.2.3.4',], port=9160)
我得到一个错误:
File "....cluster.py", line 1649, in _reconnect_internal
raise NoHostAvailable("Unable to connect to any servers", errors)
cassandra.cluster.NoHostAvailable: ('Unable to connect to any servers', {'1.2.3.4': error(111, 'Connection refused')})
关于我需要在cassandra.yml文件中使用什么咒语才能允许外部客户端连接在EC2实例上运行的cassandra实例,有什么想法吗?使用以下命令修改cassandra.yaml:
rpc_address: 0.0.0.0
broadcast_rpc_address: <your ec2 private ip address>
rpc_地址:0.0.0.0
广播地址:
在python代码中,应该使用端口9042
请记住,通过这一点,您将打开您的cassandra群集到internet