Auth issues randomly appearing
Recently when trying to get a key the library failed with a NOAUTH error, however when the client was created, the auth method is invoked as it should be.
The key is set once, however, at a later point seems to fail further operations with the following error:
io.github.crackthecodeabhi.kreds.protocol.KredsRedisDataException: NOAUTH Authentication required.
at io.github.crackthecodeabhi.kreds.protocol.CommandProcessor.decode(Command.kt:70)
at io.github.crackthecodeabhi.kreds.connection.AbstractKredsClient$execute$suspendImpl$$inlined$withReentrantLock$2.invokeSuspend(ExclusiveObject.kt:49)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:570)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664)
In my case I'm only using redis with a password.
@misterquestions can you please set the logging level to trace for this package "io.github.crackthecodeabhi"
and see if you get the below log when you face this issue
logger.trace { "New connection created to $endpoint" }
i suspect, the connection was lost and when it automatically reconnects, the new connection is not authenticated.
If you come across this issue, kedis might be worth a look as there is an option to automatically authenticate when a new connection is established. It however is in very early stages, so proceed with caution.