Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auth issues randomly appearing #45

Open
misterquestions opened this issue Oct 19, 2022 · 2 comments
Open

Auth issues randomly appearing #45

misterquestions opened this issue Oct 19, 2022 · 2 comments

Comments

@misterquestions
Copy link

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.

@crackthecodeabhi
Copy link
Owner

crackthecodeabhi commented Oct 19, 2022

@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.

@domgew
Copy link

domgew commented Jan 27, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants