【问题标题】:Error when trying to alter keyspace replication factor with cassandra for system_auth尝试使用 cassandra 为 system_auth 更改密钥空间复制因子时出错
【发布时间】:2014-03-06 05:17:01
【问题描述】:

我正在尝试增加我在 cassandra 中的复制因子,因为出于安全相关原因,这是必要的:

http://www.datastax.com/docs/datastax_enterprise3.0/security/security_keyspace_replication#security-keyspace-replication

当我执行命令时:

ALTER KEYSPACE "system_auth" WITH REPLICATION { 'class' : 'SimpleStrategy', 'replication_factor' : 2}; 

我得到错误:

Bad Request: line 1:46 missing '=' at {

有人知道这是为什么吗?我对此感到困惑

【问题讨论】:

    标签: cassandra cassandra-2.0


    【解决方案1】:

    alter KEYSPACE system_auth WITH replication = { 'class' : 'SimpleStrategy', 'replication_factor' : 2};

    http://cassandra.apache.org/doc/cql3/CQL.html#createKeyspaceStmt

    【讨论】:

    • 说system_auth不存在正常吗?我什至可以查看我定义的键空间吗?
    【解决方案2】:

    我收到了类似的错误,这是我为使事情正常工作所经历的步骤。

    关于我的设置:在 AWS 中运行四个 Cassandra 服务器。他们被命名为(非原始)cass1cass4

    1. cassandra.yaml 更改为cass1。我设置了authenticator: PasswordAuthenticatorauthorizer: CassandraAuthorizer
    2. cass1 上重新启动 Cassandra。
    3. 使用cqlsh -u cassandra -p cassandra登录
    4. 运行了一个不同 ALTER TABLE,而不是推荐的@mikhail-stepura。我用过:alter KEYSPACE system_auth WITH replication = { 'class' : 'NetworkTopologyStrategy', 'us-east' : 4};
      • 运行他的,我发现我无法在cass2cass4 上进行身份验证。我会收到两条错误消息之一:要么
        • Connection error: ('Unable to connect to any servers', {'127.0.0.1': AuthenticationFailed(u'Failed to authenticate to 127.0.0.1: code=0100 [Bad credentials] message="org.apache.cassandra.exceptions.UnavailableException: Cannot achieve consistency level QUORUM"',)})
        • Connection error: ('Unable to connect to any servers', {'127.0.0.1': error(111, 'ECONNREFUSED')})
    5. 我在cass2cass4 上复制了对cassandra.yaml 的更改,并在每台服务器上重新启动了Cassandra。
    6. 瞧!我可以在所有服务器上登录 Cassandra。

    【讨论】:

      猜你喜欢
      • 2021-06-28
      • 2017-06-15
      • 2014-04-08
      • 1970-01-01
      • 2016-04-18
      • 1970-01-01
      • 1970-01-01
      • 2014-11-11
      • 2019-02-23
      相关资源
      最近更新 更多