I noticed the following error occasionally pop up in my database logging:
2021/09/08 14:06:49.920|SLDBConnection|SLDataGateway.Repositories|INF|0|18|2021-09-08T14:06:49.920|WARN |DataGateway.Cassandra|CassandraConnection.ExecuteSyncInner (BatchInsertion)
Query: Cassandra.BatchStatement
Exception:Cassandra.UnauthorizedException: Unable to perform authorization of permissions: Unable to perform authorization of super-user permission: Operation timed out - received only 0 responses.
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Cassandra.Tasks.TaskHelper.WaitToComplete(Task task, Int32 timeout)
at Cassandra.Session.Execute(IStatement statement)
at SLCassandraClassLibrary.DBGateway.Cassandra.StorageManagers.SingleNode.CassandraConnection.ExecuteSyncInner(IStatement CQLquery, String debugMessage, Action`1 unhandledExceptionHandler)
Even when using the default superuser from Cassandra and using the default replicaiton for the authentication keyspace, I keep getting this exception.
I have not yet noticed anything wrong on my DMA, but if there was a problem with the user, I'd expect to see more issues, so I'm rather confused what this error means, especially on simple batch inserts.
Can someone elaborate?
This exception gets thrown when a query is launched, but the cassandra fails to resolve the permissions this users has.
To do so, cassandra will ping the System_auth table and see what is stored in there. Depending on the user and the DMA setup the amount of nodes expected to respond can differ. But 0 is never good.
The error does not give much in the way of why the node fails, but generally it is because the replica is unavailable (either due to timeouts, or due to it being offline), inspecting the cassandra logs could yield more info.
As a sidenote, using the default Cassandra superuser will make the issue worse as this one always reverts to Quorum for its permissions, whilst other users will be checked through a consistencyLevel of One.
Another thing to keep in mind is to check if the System_auth table has a correct replication setting. Under the default settings, the check will fail if the sole replica-node is unavailable. Generally setting the System_auth replication to 3-5 nodes per datacenter is recommended
Thank you, I’ll go back to using a different superuser then.
I had the issue before I switched to the default Cassandra superuser though. I switched because I thought that would improve the situation ^^;