2
votes

I am using 3 node cassandra 2.1.14 and using authenticator: PasswordAuthenticator.

But when trying to create a user by logging in as cassandra/cassandra. Is there something i need got fix in the set up?

cassandra@cqlsh> create user test with password 'test' superuser;

ServerError:

message="java.lang.RuntimeException: org.apache.cassandra.exceptions.UnavailableException: Cannot achieve consistency level LOCAL_ONE">

The system log shows:

ERROR [SharedPool-Worker-1] 2016-06-27 07:17:36,538 ErrorMessage.java:251 - Unexpected exception during request java.lang.RuntimeException: org.apache.cassandra.exceptions.UnavailableException: Cannot achieve consistency level LOCAL_ONE at org.apache.cassandra.auth.Auth.selectUser(Auth.java:276) ~[apache-cassandra-2.1.14.jar:2.1.14] at org.apache.cassandra.auth.Auth.isExistingUser(Auth.java:86) ~[apache-cassandra-2.1.14.jar:2.1.14] at org.apache.cassandra.cql3.statements.CreateUserStatement.validate(CreateUserStatement.java:55) ~[apache-cassandra-2.1.14.jar:2.1.14] at org.apache.cassandra.cql3.QueryProcessor.processStatement(QueryProcessor.java:236) ~[apache-cassandra-2.1.14.jar:2.1.14] at org.apache.cassandra.cql3.QueryProcessor.process(QueryProcessor.java:260) ~[apache-cassandra-2.1.14.jar:2.1.14] at org.apache.cassandra.transport.messages.QueryMessage.execute(QueryMessage.java:122) ~[apache-cassandra-2.1.14.jar:2.1.14] at org.apache.cassandra.transport.Message$Dispatcher.channelRead0(Message.java:439) [apache-cassandra-2.1.14.jar:2.1.14] at org.apache.cassandra.transport.Message$Dispatcher.channelRead0(Message.java:335) [apache-cassandra-2.1.14.jar:2.1.14] at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105) [netty-all-4.0.23.Final.jar:4.0.23.Final] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333) [netty-all-4.0.23.Final.jar:4.0.23.Final] at io.netty.channel.AbstractChannelHandlerContext.access$700(AbstractChannelHandlerContext.java:32) [netty-all-4.0.23.Final.jar:4.0.23.Final] at io.netty.channel.AbstractChannelHandlerContext$8.run(AbstractChannelHandlerContext.java:324) [netty-all-4.0.23.Final.jar:4.0.23.Final] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [na:1.8.0_77] at org.apache.cassandra.concurrent.AbstractTracingAwareExecutorService$FutureTask.run(AbstractTracingAwareExecutorService.java:164) [apache-cassandra-2.1.14.jar:2.1.14] at org.apache.cassandra.concurrent.SEPWorker.run(SEPWorker.java:105) [apache-cassandra-2.1.14.jar:2.1.14] at java.lang.Thread.run(Thread.java:745) [na:1.8.0_77]

1
Could you share your table schema? What does nodetool status print?TheMP

1 Answers

1
votes

I just ran into this while attempting to roll a whole ring to PasswordAuthenticator at once. Not sure why it would fail to accheive local one, but I rolled back to only one node enabled for auth and was able to proceed.

So roll back, enable PasswordAuthentication on one node, create your new account, update the replication on system_auth (to all nodes), set and forget your cassandra password and then do a rolling restart enabling auth on the rest of the ring.