【问题标题】:Cassandra Authentication issueCassandra 身份验证问题
【发布时间】:2016-01-14 05:44:08
【问题描述】:

cassandra 版本:apache-cassandra-2.1.8

我最近配置了 2 节点集群,其中 Authenticator 设置为 PasswordAuthenticator。当其中一个节点关闭时,我无法登录 Cqlsh 并出现以下错误

Connection error: ('Unable to connect to any servers', 
{'192.168.0.45': AuthenticationFailed(u'Failed to authenticate to 192.168.0.45: code=0100 [Bad credentials] 
message="org.apache.cassandra.exceptions.UnavailableException: Cannot achieve consistency level QUORUM"',)})

system_auth RF 设置为 2,因为我有 2 个节点。

C:\apache-cassandra-2.1.8-bin\apache-cassandra-2.1.8\bin>nodetool status
Starting NodeTool
Datacenter: DC1
================
Status=Up/Down
|/ State=Normal/Leaving/Joining/Moving
--  Address       Load       Tokens  Owns    Host ID                               Rack
UN  192.168.0.45  327.87 KB  256     ?       66a97a0a-d69c-4daf-b0f5-55cb8442d728  RAC1
UN  192.168.0.46  234.28 KB  256     ?       432031fc-eea3-4b02-8d79-f877bbd8afaf  RAC1


KeySpace RF

cassandra@cqlsh> select * from system.schema_keyspaces;

 keyspace_name | durable_writes | strategy_class                              | strategy_options
---------------+----------------+---------------------------------------------+----------------------------
   system_auth |           True | org.apache.cassandra.locator.SimpleStrategy | {"replication_factor":"2"}
        system |           True |  org.apache.cassandra.locator.LocalStrategy |                         {}
 system_traces |           True | org.apache.cassandra.locator.SimpleStrategy | {"replication_factor":"2"}

(3 rows)

我已附上 Cassandra 文件、cassandra.yaml 和 cassandra-topology.properties 文件

【问题讨论】:

    标签: cassandra


    【解决方案1】:

    这可能与此有关:

    "对于大多数 system_auth 查询,Cassandra 使用 LOCAL_ONE 一致性级别,并为默认的 cassandrasuperuser 使用 QUORUM;"

    您是否尝试以用户“cassandra”的身份进行连接?如果是这样,这可能就是它尝试使用一致性级别仲裁的原因。由于您只有两个节点,因此仲裁将是两个节点。

    所以尝试按照here 的说明创建一个不同的用户。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2013-07-23
      • 2015-08-25
      • 2010-11-17
      • 2019-06-19
      • 2018-10-08
      • 2011-02-14
      相关资源
      最近更新 更多