[ https://issues.apache.org/jira/browse/CASSANDRA-11381?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16036497#comment-16036497 ]
mck commented on CASSANDRA-11381: --------------------------------- {quote}The 3.0 branch looks like it is an older version of the patch than the 2.2, 3.11, and trunk patches - it's missing the atomic guard ensuring we only run the set up one. Is this just an oversight?{quote} Yes, thanks for catching that. Has been corrected. {quote}The new exception looks good, but the condition is too restrictive. {quote} The condition has been changed to use {{StorageService.instance.getTokenMetadata().sortedTokens().isEmpty()}}. -- All four patches updated (and rebased): || branch || testall || dtest || | [cassandra-2.2_11381|https://github.com/michaelsembwever/cassandra/tree/mck/cassandra-2.2_11381] | [testall|https://circleci.com/gh/michaelsembwever/cassandra/tree/mck%2Fcassandra-2.2_11381] | [dtest|https://builds.apache.org/view/A-D/view/Cassandra/job/Cassandra-devbranch-dtest/] | | [cassandra-3.0_11381|https://github.com/michaelsembwever/cassandra/tree/mck/cassandra-3.0_11381] | [testall|https://circleci.com/gh/michaelsembwever/cassandra/tree/mck%2Fcassandra-3.0_11381] | [dtest|https://builds.apache.org/view/A-D/view/Cassandra/job/Cassandra-devbranch-dtest/ | | [cassandra-3.11_11381|https://github.com/michaelsembwever/cassandra/tree/mck/cassandra-3.11_11381] | [testall|https://circleci.com/gh/michaelsembwever/cassandra/tree/mck%2Fcassandra-3.11_11381] | [dtest|https://builds.apache.org/view/A-D/view/Cassandra/job/Cassandra-devbranch-dtest/] | | [trunk_11381|https://github.com/michaelsembwever/cassandra/tree/mck/trunk_11381] | [testall|https://circleci.com/gh/michaelsembwever/cassandra/tree/mck%2Ftrunk_11381] | [dtest|https://builds.apache.org/view/A-D/view/Cassandra/job/Cassandra-devbranch-dtest/] | All dtests are waiting on [INFRA-14153|https://issues.apache.org/jira/browse/INFRA-14153]. > Node running with join_ring=false and authentication can not serve requests > --------------------------------------------------------------------------- > > Key: CASSANDRA-11381 > URL: https://issues.apache.org/jira/browse/CASSANDRA-11381 > Project: Cassandra > Issue Type: Bug > Reporter: mck > Assignee: mck > Fix For: 2.2.x, 3.0.x, 3.11.x, 4.x > > > Starting up a node with {{-Dcassandra.join_ring=false}} in a cluster that has > authentication configured, eg PasswordAuthenticator, won't be able to serve > requests. This is because {{Auth.setup()}} never gets called during the > startup. > Without {{Auth.setup()}} having been called in {{StorageService}} clients > connecting to the node fail with the node throwing > {noformat} > java.lang.NullPointerException > at > org.apache.cassandra.auth.PasswordAuthenticator.authenticate(PasswordAuthenticator.java:119) > at > org.apache.cassandra.thrift.CassandraServer.login(CassandraServer.java:1471) > at > org.apache.cassandra.thrift.Cassandra$Processor$login.getResult(Cassandra.java:3505) > at > org.apache.cassandra.thrift.Cassandra$Processor$login.getResult(Cassandra.java:3489) > at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:39) > at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:39) > at com.thinkaurelius.thrift.Message.invoke(Message.java:314) > at > com.thinkaurelius.thrift.Message$Invocation.execute(Message.java:90) > at > com.thinkaurelius.thrift.TDisruptorServer$InvocationHandler.onEvent(TDisruptorServer.java:695) > at > com.thinkaurelius.thrift.TDisruptorServer$InvocationHandler.onEvent(TDisruptorServer.java:689) > at com.lmax.disruptor.WorkProcessor.run(WorkProcessor.java:112) > at > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) > at java.lang.Thread.run(Thread.java:745) > {noformat} > The exception thrown from the > [code|https://github.com/apache/cassandra/blob/cassandra-2.0.16/src/java/org/apache/cassandra/auth/PasswordAuthenticator.java#L119] > {code} > ResultMessage.Rows rows = > authenticateStatement.execute(QueryState.forInternalCalls(), new > QueryOptions(consistencyForUser(username), > > Lists.newArrayList(ByteBufferUtil.bytes(username)))); > {code} -- This message was sent by Atlassian JIRA (v6.3.15#6346) --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org