即使我用cassandra的用户ID访问,但为了执行此请求,您必须登录并非匿名。

8

这对我来说是Cassandra 2.1.13的第二天。 我在本地机器上完成了10分钟的Cassandra教程,教程链接为http://www.planetcassandra.org/try-cassandra/

% cqlsh -u cassandra -p cassandra
% // create demo keyspace
% // create users table
% //insert a couple of row in the users table

现在我有一个问题,如下所示。
cassandra@cqlsh:demo> list users;
Unauthorized: code=2100 [Unauthorized] message="You have to be logged in and not anonymous to perform this request"

我使用用户名cassdanra访问Cassandra,为什么会出现这个消息?我需要设置其他东西吗?

1个回答

20

如果您在cassandra.yaml配置设置中也有authenticator: AllowAllAuthenticator,则会出现此消息。即使您以用户cassandra的身份登录,当您具有AllowAllAuthenticator时,它实际上允许所有用户,因此不会检查您是否已登录。要解决此问题,您应更改设置为authenticator: PasswordAuthenticator,然后重新启动Cassandra。


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接