Uploaded image for project: 'Apache Cassandra'
  1. Apache Cassandra
  2. CASSANDRA-11381

Node running with join_ring=false and authentication can not serve requests

    XMLWordPrintableJSON

Details

    • Normal

    Description

      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

      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)
      

      The exception thrown from the code

      ResultMessage.Rows rows = authenticateStatement.execute(QueryState.forInternalCalls(), new QueryOptions(consistencyForUser(username),
                                                                                           Lists.newArrayList(ByteBufferUtil.bytes(username))));
      

      Attachments

        Issue Links

          Activity

            People

              mck Michael Semb Wever
              mck Michael Semb Wever
              Michael Semb Wever
              Joel Knighton
              Votes:
              1 Vote for this issue
              Watchers:
              13 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: