我正在尝试从Ruby on Rails应用程序连接到AWS Keyspaces(AWS Cassandra),但是我无法做到这一点。我使用cequel gem并生成了config / cequel.yml,其中包含与以下内容类似的内容:
development:
host: "CONTACT_POINT"
username: "USER"
password: "PASS"
port: 9142
keyspace: key_development
max_retries: 3
retry_delay: 0.5
newrelic: true
ssl: true
server_cert: 'config/certs/AmazonRootCA1.pem'
replication:
class: NetworkTopologyStrategy
datacenter1: 3
datacenter2: 2
durable_writes: false
(凭据在其他应用程序中使用过,它们可以正常工作。)
当我尝试运行时:
rake cequel:keyspace:create
我收到以下错误:
Cassandra::Errors::NoHostsAvailable: All attempted hosts failed: x.xxx.xxx.xxx (Cassandra::Errors::ServerError: Internal Server Error)
答案 0 :(得分:0)
将dc设置为us-east-1。删除复制定义。