Bug:  NullPointerException in cassandra.audit.AuditLogManager.querySuccess when querying endpoints via mgmtapi
Status: Resolved
Priority: Normal
Resolution: Invalid
Created: 10/May/23 16:25
Resolved: 23/Jun/23 14:28

 NullPointerException in cassandra.audit.AuditLogManager.querySuccess when querying endpoints via mgmtapi

 

cassandra version: 4.1.1

cassandra.yaml:audit_logging_options:
cassandra.yaml-  enabled: true
cassandra.yaml-  logger:
cassandra.yaml:    - class_name: FileAuditLogger

 

When querying endpoints (/api/v0/metadata/endpoints) via mgmtapi, 200 OK is returned.  However, NPE is reported by AuditLogManager.
{code:java}
ERROR [epollEventLoopGroup-5-3] 2023-05-10 15:53:30,301 NoSpamLogger.java:111 - Failed notifying listeners
java.lang.NullPointerException: null
        at org.apache.cassandra.audit.AuditLogManager.querySuccess(AuditLogManager.java:244)
        at org.apache.cassandra.cql3.QueryEvents.notifyQuerySuccess(QueryEvents.java:78)
        at org.apache.cassandra.transport.messages.QueryMessage.execute(QueryMessage.java:117)
        at org.apache.cassandra.transport.Message$Request.execute(Message.java:254)
        at org.apache.cassandra.transport.UnixSocketServer41x$UnixSockMessage.channelRead0(UnixSocketServer41x.java:106)
        at org.apache.cassandra.transport.UnixSocketServer41x$UnixSockMessage.channelRead0(UnixSocketServer41x.java:86)
        at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:99)
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
        at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103)
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
        at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103)
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
        at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:324)
        at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:296)
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
        at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410)
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
        at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919)
        at io.netty.channel.epoll.AbstractEpollStreamChannel$EpollStreamUnsafe.epollInReady(AbstractEpollStreamChannel.java:795)
        at io.netty.channel.epoll.EpollDomainSocketChannel$EpollDomainUnsafe.epollInReady(EpollDomainSocketChannel.java:138)
        at io.netty.channel.epoll.EpollEventLoop.processReady(EpollEventLoop.java:480)
        at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:378)
        at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989)
        at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
        at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
        at java.base/java.lang.Thread.run(Thread.java:829)
 {code}