-
Notifications
You must be signed in to change notification settings - Fork 991
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
Own RedisCredentialsProvider
causes issue with protocol handshake on Redis 5
#2234
Comments
You should see something like:
|
Sure, I included two below ...both for the same redis db. The first one is the trace when using Note i also logged a call to
ImmediateRedisCredentialsProvider:
|
I did a little more digging.... When This of course isn't a problem when using an Would it make sense to update private static boolean isUnknownCommand(Throwable error) {
if(!isRedisException(error) && error.getCause() != null) {
return isUnknownCommand(error.getCause());
}
return isRedisException(error) && LettuceStrings.isNotEmpty(error.getMessage())
&& ((error.getMessage().startsWith("ERR") && error.getMessage().contains("unknown")));
}
private static boolean isRedisException(Throwable error) {
return error instanceof RedisException;
} ava.util.concurrent.CompletionException: io.lettuce.core.RedisCommandExecutionException: ERR unknown command `HELLO`, with args beginning with: `3`, `AUTH`, `testUser`, `testUserPassword`,
at java.base/java.util.concurrent.CompletableFuture.encodeRelay(CompletableFuture.java:368)
at java.base/java.util.concurrent.CompletableFuture.completeRelay(CompletableFuture.java:377)
at java.base/java.util.concurrent.CompletableFuture$UniRelay.tryFire(CompletableFuture.java:1097)
at java.base/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:510)
at java.base/java.util.concurrent.CompletableFuture.completeExceptionally(CompletableFuture.java:2162)
at io.lettuce.core.protocol.AsyncCommand.doCompleteExceptionally(AsyncCommand.java:139)
at io.lettuce.core.protocol.AsyncCommand.completeResult(AsyncCommand.java:120)
at io.lettuce.core.protocol.AsyncCommand.complete(AsyncCommand.java:111)
at io.lettuce.core.protocol.CommandWrapper.complete(CommandWrapper.java:63)
at io.lettuce.core.protocol.CommandHandler.complete(CommandHandler.java:747)
at io.lettuce.core.protocol.CommandHandler.decode(CommandHandler.java:682)
at io.lettuce.core.protocol.CommandHandler.channelRead(CommandHandler.java:599)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:442)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)
at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:440)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919)
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:166)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:788)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:724)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:650)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:562)
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997)
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:833)
Caused by: io.lettuce.core.RedisCommandExecutionException: ERR unknown command `HELLO`, with args beginning with: `3`, `AUTH`, `testUser`, `testUserPassword`,
at io.lettuce.core.internal.ExceptionFactory.createExecutionException(ExceptionFactory.java:147)
at io.lettuce.core.internal.ExceptionFactory.createExecutionException(ExceptionFactory.java:116)
... 22 more |
Thanks a lot for investigating. I wonder why For the time being, please configure to use the |
Thanks, will do. And I'll see if I can understand more on why our 6.2.5 redis doesn't support HELLO command. |
RedisCredentialsProvider
causes issue with protocol handshake on Redis 5
We now unwrap potentially wrapped exceptions to be able to inspect the cause. This can happen in an async flow when the HELLO command invocation fails.
We now unwrap potentially wrapped exceptions to be able to inspect the cause. This can happen in an async flow when the HELLO command invocation fails.
That's fixed now. |
Bug Report
Current Behavior
Howdy - I get a
RedisConnectionException
when using aRedisCredentialsProvider
trying to connect over SSL. If I use anImmediateRedisCredentialsProvider
instead, the ssl connection works fine.Also, the same
RedisCredentialsProvider
instance that fails with ssl connection, works fine for non-ssl connection.I included some simple code that i used to recreate the issue.
Stack trace
Input Code
Input Code
Expected behavior/code
I would expect connectivity to work equally well whether I use a
RedisCredentialsProvider
that returns aMono<RedisCredentials>
, or anImmediateRedisCredentialsProvider
that return aRedisCredentials
Environment
Possible Solution
Additional context
The text was updated successfully, but these errors were encountered: