每当在Apache Cassandra 3.9中添加新节点时,我们就会遇到system_auth密钥空间的奇怪问题。我们使用RF = system_auth键空间中的节点数进行网络拓扑复制。
但在新节点引导后,此密钥空间似乎已损坏。假设角色表上的选择显示某些行中的NULL数据。
role | can_login | is_superuser | member_of | salted_hash
---------------------------------+-----------+--------------+-----------+--------------------------------------------------------------
user1 | null | null | null | null
“列出用户”命令导致Java空指针异常。调试日志显示以下信息
ERROR [Native-Transport-Requests-3] 2017-06-27 15:17:02,927 ErrorMessage.java:349 - Unexpected exception during request
java.lang.NullPointerException: null
at org.apache.cassandra.serializers.BooleanSerializer.deserialize(BooleanSerializer.java:33) ~[apache-cassandra-3.9.0.jar:3.9.0]
at org.apache.cassandra.serializers.BooleanSerializer.deserialize(BooleanSerializer.java:24) ~[apache-cassandra-3.9.0.jar:3.9.0]
at org.apache.cassandra.db.marshal.AbstractType.compose(AbstractType.java:115) ~[apache-cassandra-3.9.0.jar:3.9.0]
at org.apache.cassandra.cql3.UntypedResultSet$Row.getBoolean(UntypedResultSet.java:273) ~[apache-cassandra-3.9.0.jar:3.9.0]
at org.apache.cassandra.auth.CassandraRoleManager$1.apply(CassandraRoleManager.java:85) ~[apache-cassandra-3.9.0.jar:3.9.0]
at org.apache.cassandra.auth.CassandraRoleManager$1.apply(CassandraRoleManager.java:81) ~[apache-cassandra-3.9.0.jar:3.9.0]
at org.apache.cassandra.auth.CassandraRoleManager.getRoleFromTable(CassandraRoleManager.java:503) ~[apache-cassandra-3.9.0.jar:3.9.0]
at org.apache.cassandra.auth.CassandraRoleManager.getRole(CassandraRoleManager.java:485) ~[apache-cassandra-3.9.0.jar:3.9.0]
at org.apache.cassandra.auth.CassandraRoleManager.canLogin(CassandraRoleManager.java:298) ~[apache-cassandra-3.9.0.jar:3.9.0]
at org.apache.cassandra.cql3.statements.ListUsersStatement.formatResults(ListUsersStatement.java:51) ~[apache-cassandra-3.9.0.jar:3.9.0]
at org.apache.cassandra.cql3.statements.ListRolesStatement.resultMessage(ListRolesStatement.java:108) ~[apache-cassandra-3.9.0.jar:3.9.0]
at org.apache.cassandra.cql3.statements.ListRolesStatement.execute(ListRolesStatement.java:85) ~[apache-cassandra-3.9.0.jar:3.9.0]
at org.apache.cassandra.cql3.statements.AuthorizationStatement.execute(AuthorizationStatement.java:48) ~[apache-cassandra-3.9.0.jar:3.9.0]
at org.apache.cassandra.cql3.QueryProcessor.processStatement(QueryProcessor.java:188) ~[apache-cassandra-3.9.0.jar:3.9.0]
at org.apache.cassandra.cql3.QueryProcessor.process(QueryProcessor.java:219) ~[apache-cassandra-3.9.0.jar:3.9.0]
at org.apache.cassandra.cql3.QueryProcessor.process(QueryProcessor.java:204) ~[apache-cassandra-3.9.0.jar:3.9.0]
at org.apache.cassandra.transport.messages.QueryMessage.execute(QueryMessage.java:115) ~[apache-cassandra-3.9.0.jar:3.9.0]
at org.apache.cassandra.transport.Message$Dispatcher.channelRead0(Message.java:513) [apache-cassandra-3.9.0.jar:3.9.0]
at org.apache.cassandra.transport.Message$Dispatcher.channelRead0(Message.java:407) [apache-cassandra-3.9.0.jar:3.9.0]
at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105) [netty-all-4.0.39.Final.jar:4.0.39.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:366) [netty-all-4.0.39.Final.jar:4.0.39.Final]
at io.netty.channel.AbstractChannelHandlerContext.access$600(AbstractChannelHandlerContext.java:35) [netty-all-4.0.39.Final.jar:4.0.39.Final]
at io.netty.channel.AbstractChannelHandlerContext$7.run(AbstractChannelHandlerContext.java:357) [netty-all-4.0.39.Final.jar:4.0.39.Final]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [na:1.8.0_131]
at org.apache.cassandra.concurrent.AbstractLocalAwareExecutorService$FutureTask.run(AbstractLocalAwareExecutorService.java:164) [apache-cassandra-3.9.0.jar:3.9.0]
at org.apache.cassandra.concurrent.SEPWorker.run(SEPWorker.java:109) [apache-cassandra-3.9.0.jar:3.9.0]
at java.lang.Thread.run(Thread.java:748) [na:1.8.0_131]
答案 0 :(得分:1)
这似乎是Cassandra 3.9的一个错误,已经在以后的版本Cassandra 3.10中得到修复。这是错误票证https://issues.apache.org/jira/browse/CASSANDRA-12813