即使我使用cassandra userid访问此请求,您也必须登录并且不能匿名在cassandra中执行此请求

use*_*895 2 cassandra-2.1

对我来说,这是Cassandra 2.1.13 day2。我已经经历了10分钟。我的本地计算机上的http://www.planetcassandra.org/try-cassandra/上的cassandra教程。

% cqlsh -u cassandra -p cassandra
% // create demo keyspace
% // create users table
% //insert a couple of row in the users table
Run Code Online (Sandbox Code Playgroud)

现在我有一个问题,如下所示。

cassandra@cqlsh:demo> list users;
Unauthorized: code=2100 [Unauthorized] message="You have to be logged in and not anonymous to perform this request"
Run Code Online (Sandbox Code Playgroud)

我使用用户名cassdanra访问cassandra,为什么出现此消息?我需要设置其他内容吗?

Rob*_*ses 5

如果您还在cassandra.yaml配置设置中显示此消息authenticator: AllowAllAuthenticator。即使您以user身份登录cassandra,当拥有AllowAllAuthenticator该用户时,它实际上允许所有用户使用,因此不检查您是否已登录。要克服此消息,您应该将设置更改为authenticator: PasswordAuthenticator,然后重新启动cassandra。