0

如何设置这个?我有一个复制因子为 3 的三节点集群,在启动时出现以下错误:

WARN [NonPeriodicTasks:1] 2013-10-08 14:06:42,751 PasswordAuthenticator.java (line 242) PasswordAuthenticator skipped default user setup: some nodes were not ready
WARN [NonPeriodicTasks:1] 2013-10-08 14:06:42,763 Auth.java (line 223) Skipped default superuser setup: some nodes were not ready

没有创建默认用户,并且尝试使用例如 cqlsh 登录失败:

$ cqlsh mynode myport -u cassandra -p cassandra
Traceback (most recent call last):
  File "/usr/opt/apache-cassandra-2.0.1/bin/cqlsh", line 2031, in <module>
    main(*read_options(sys.argv[1:], os.environ))
  File "/usr/opt/apache-cassandra-2.0.1/bin/cqlsh", line 2017, in main
    display_float_precision=options.float_precision)
  File "/usr/opt/apache-cassandra-2.0.1/bin/cqlsh", line 477, in __init__
    cql_version=cqlver, transport=transport)
  File "/usr/opt/apache-cassandra-2.0.1/bin/../lib/cql-internal-only-1.4.0.zip/cql-1.4.0/cql/connection.py", line 143, in connect
  File "/usr/opt/apache-cassandra-2.0.1/bin/../lib/cql-internal-only-1.4.0.zip/cql-1.4.0/cql/connection.py", line 59, in __init__
  File "/usr/opt/apache-cassandra-2.0.1/bin/../lib/cql-internal-only-1.4.0.zip/cql-1.4.0/cql/thrifteries.py", line 157, in establish_connection
  File "/usr/opt/apache-cassandra-2.0.1/bin/../lib/cql-internal-only-1.4.0.zip/cql-1.4.0/cql/cassandra/Cassandra.py", line 455, in login
  File "/usr/opt/apache-cassandra-2.0.1/bin/../lib/cql-internal-only-1.4.0.zip/cql-1.4.0/cql/cassandra/Cassandra.py", line 476, in recv_login
cql.cassandra.ttypes.AuthenticationException: AuthenticationException(why='Username and/or password are incorrect')
4

4 回答 4

1

错误消息“一些节点尚未准备好”有点误导,因为似乎原因是集群中有两个其他节点启动并运行,但配置为仍使用 AllowAllAuthenticator。在关闭其他节点并使用 PasswordAuthentitor 启动一个节点后,创建默认用户成功:

 INFO [NonPeriodicTasks:1] 2013-10-09 14:44:57,028 PasswordAuthenticator.java (line 237) PasswordAuthenticator created default user 'cassandra'
 INFO [NonPeriodicTasks:1] 2013-10-09 14:44:57,760 Auth.java (line 218) Created default superuser 'cassandra'
于 2013-10-09T11:56:28.637 回答
1

在我的情况下,这是因为数据中心名称已更改,然后由于 Puppet 而被推广到配置文件 (cassandra-topology.properties)。因此,已为 system_auth 配置的 NetworkTopologyStrategy 失败。

于 2014-06-02T11:57:47.743 回答
0

第一次使用这些选项启动节点时,您必须串行更改“身份验证器:”和“授权人:”而不是并行更改。在与上述错误作斗争时,这种方式对我有用。

于 2014-07-23T14:33:25.223 回答
0

您还应该检查 conf/cassandra-topology.properties您是否正在使用PropertyFileSnitch. 它应该在所有节点上都相同

于 2014-08-26T12:48:14.957 回答